summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui/favicon_source.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-21 19:37:06 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-21 19:37:06 +0000
commita9f56629c59ad46837dc2b83444ac4578280ffa8 (patch)
treed27d41c5327cc38ab90094614f97afee9b892460 /chrome/browser/ui/webui/favicon_source.cc
parent72ca2f71ab6843b124383ab7b81f4da4bd702c03 (diff)
downloadchromium_src-a9f56629c59ad46837dc2b83444ac4578280ffa8.zip
chromium_src-a9f56629c59ad46837dc2b83444ac4578280ffa8.tar.gz
chromium_src-a9f56629c59ad46837dc2b83444ac4578280ffa8.tar.bz2
sync: Add --enable-sync-sessions-v2 and necessary plumbing to use SessionsSyncManager.
Not a fully working solution as SSM doesn't listen to session changes after the initial association, but does work across restarts. Adds OpenTabsUIDelegate to a) reduce SessionModelAssociator proliferation and b) allow swapping in a SessionsSyncManager if the command line flag is passed. The changes in non sync/ files are basically s/SessionModelAssociator/OpenTabsUIDelegate. There are a few places I didn't make that change yet (such as OnSyncCycleComplete in ProfileSyncService), which I'll have to do in a follow up as SSM supports more of the bells-and-whistles in session sync. BUG=98892 R=pkasting@chromium.org, rlarocque@chromium.org, yfriedman@chromium.org TBR=tburkard@chromium.org, asargent@chromium.org, yfriedman@chromium.org, dbeam@chromium.org, pkasting@chromium.org for chrome/browser/prerender for chrome/browser/extensions/api for chrome/browser/android and chrome/browser/ui/webui/ntp/android for chrome/browser/ui/webui/ntp for remainder of chrome/browser/ui Review URL: https://codereview.chromium.org/74653002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui/favicon_source.cc')
-rw-r--r--chrome/browser/ui/webui/favicon_source.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc
index d5744ac..765b804 100644
--- a/chrome/browser/ui/webui/favicon_source.cc
+++ b/chrome/browser/ui/webui/favicon_source.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_io_context.h"
-#include "chrome/browser/sync/glue/session_model_associator.h"
+#include "chrome/browser/sync/open_tabs_ui_delegate.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/favicon/favicon_url_parser.h"
@@ -143,13 +143,13 @@ bool FaviconSource::HandleMissingResource(const IconRequest& request) {
// If the favicon is not available, try to use the synced favicon.
ProfileSyncService* sync_service =
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_);
- browser_sync::SessionModelAssociator* associator = sync_service ?
- sync_service->GetSessionModelAssociator() : NULL;
+ browser_sync::OpenTabsUIDelegate* open_tabs = sync_service ?
+ sync_service->GetOpenTabsUIDelegate() : NULL;
scoped_refptr<base::RefCountedMemory> response;
- if (associator &&
- associator->GetSyncedFaviconForPageURL(request.request_path.spec(),
- &response)) {
+ if (open_tabs &&
+ open_tabs->GetSyncedFaviconForPageURL(request.request_path.spec(),
+ &response)) {
request.callback.Run(response.get());
return true;
}