Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/sync/glue/session_change_processor.cc

Issue 10960057: Enable all registered types by default on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/glue/session_change_processor.h" 5 #include "chrome/browser/sync/glue/session_change_processor.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 21 matching lines...) Expand all
32 using content::BrowserThread; 32 using content::BrowserThread;
33 using content::NavigationController; 33 using content::NavigationController;
34 using content::WebContents; 34 using content::WebContents;
35 35
36 namespace browser_sync { 36 namespace browser_sync {
37 37
38 namespace { 38 namespace {
39 39
40 // The URL at which the set of synced tabs is displayed. We treat it differently 40 // The URL at which the set of synced tabs is displayed. We treat it differently
41 // from all other URL's as accessing it triggers a sync refresh of Sessions. 41 // from all other URL's as accessing it triggers a sync refresh of Sessions.
42 static const char kNTPOpenTabSyncURL[] = "chrome://newtab/#opentabs"; 42 static const char kNTPOpenTabSyncURL[] = "chrome://newtab/#open_tabs";
43 43
44 // Extract the source SyncedTabDelegate from a NotificationSource originating 44 // Extract the source SyncedTabDelegate from a NotificationSource originating
45 // from a NavigationController, if it exists. Returns |NULL| otherwise. 45 // from a NavigationController, if it exists. Returns |NULL| otherwise.
46 SyncedTabDelegate* ExtractSyncedTabDelegate( 46 SyncedTabDelegate* ExtractSyncedTabDelegate(
47 const content::NotificationSource& source) { 47 const content::NotificationSource& source) {
48 TabContents* tab = TabContents::FromWebContents( 48 TabContents* tab = TabContents::FromWebContents(
49 content::Source<NavigationController>(source).ptr()->GetWebContents()); 49 content::Source<NavigationController>(source).ptr()->GetWebContents());
50 if (!tab) 50 if (!tab)
51 return NULL; 51 return NULL;
52 return tab->synced_tab_delegate(); 52 return tab->synced_tab_delegate();
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 notification_registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED, 366 notification_registrar_.Add(this, chrome::NOTIFICATION_FAVICON_CHANGED,
367 content::Source<Profile>(profile_)); 367 content::Source<Profile>(profile_));
368 } 368 }
369 369
370 void SessionChangeProcessor::StopObserving() { 370 void SessionChangeProcessor::StopObserving() {
371 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 371 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
372 notification_registrar_.RemoveAll(); 372 notification_registrar_.RemoveAll();
373 } 373 }
374 374
375 } // namespace browser_sync 375 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698