Mandoline: fix the issue of same-URL navigation.
commit143f0071ab9197af4b5ec163606ee716e0be3793
authoryzshen <yzshen@chromium.org>
Wed, 26 Aug 2015 22:13:17 +0000 (26 15:13 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 26 Aug 2015 22:13:59 +0000 (26 22:13 +0000)
treecdcd4f4567a0db572d0e4a3a18e4d9b936e8225b
parenta93c58151c01a8ccc6d98697f04c851f8992ef92
Mandoline: fix the issue of same-URL navigation.

Sometimes, typing the same URL as the current one into the omnibox doesn't load the page again (but loses the previous load).

This is actually caused by three bugs:
- The identity used for application instance registration and lookup are actually constructed differently. So the application manager is confused. In some cases, it creates/registers multiple instances under the same identity.

- HTMLDocumentApplicationDelegate doesn't retain the application while waiting for URL load completion. So if there is no other HTMLDocumentOOPIF instances are alive, the app will be shutdown.

- When an app for "about:blank" already exists, it is reused and we end up in HTMLDocumentApplicationDelegate::ConfigureIncomingConnection(), trying to fetch the URL. We cannot fetch the URL using mojo::URLLoader because it is not an actual Web resource.

BUG=524539

Review URL: https://codereview.chromium.org/1313253002

Cr-Commit-Position: refs/heads/master@{#345694}
components/html_viewer/html_document_application_delegate.cc
components/html_viewer/html_document_application_delegate.h
mojo/shell/application_manager.cc
mojo/shell/application_manager_unittest.cc
mojo/shell/identity.cc
mojo/shell/identity.h