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

Side by Side Diff: chrome/browser/sync/sessions/sync_sessions_web_contents_router.h

Issue 2824073002: [sync] Prevent sessions flare on startup (Closed)
Patch Set: Disable test on android Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_H_ 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_H_
6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_H_ 6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_H_
7 7
8 #include "base/callback_list.h" 8 #include "base/callback_list.h"
9 9
10 // Android has no BrowserList or TabStripModel, so we exclude code that refers 10 // Android has no BrowserList or TabStripModel, so we exclude code that refers
(...skipping 18 matching lines...) Expand all
29 // class is responsible for notifying Sessions Sync when local tabs are 29 // class is responsible for notifying Sessions Sync when local tabs are
30 // modified. It does this by forwarding the events pushed to it by individual 30 // modified. It does this by forwarding the events pushed to it by individual
31 // WebContentsObservers, which are scoped to a single WebContents/tab. 31 // WebContentsObservers, which are scoped to a single WebContents/tab.
32 class SyncSessionsWebContentsRouter : public LocalSessionEventRouter, 32 class SyncSessionsWebContentsRouter : public LocalSessionEventRouter,
33 public KeyedService { 33 public KeyedService {
34 public: 34 public:
35 explicit SyncSessionsWebContentsRouter(Profile* profile); 35 explicit SyncSessionsWebContentsRouter(Profile* profile);
36 36
37 // Notify the router that the tab corresponding to |web_contents| has been 37 // Notify the router that the tab corresponding to |web_contents| has been
38 // modified in some way. 38 // modified in some way.
39 void NotifyTabModified(content::WebContents* web_contents); 39 void NotifyTabModified(content::WebContents* web_contents,
40 bool page_load_completed);
40 // Inject a flare that can be used to start sync. See the comment for 41 // Inject a flare that can be used to start sync. See the comment for
41 // StartSyncFlare in syncable_service.h for more. 42 // StartSyncFlare in syncable_service.h for more.
42 void InjectStartSyncFlare(syncer::SyncableService::StartSyncFlare flare); 43 void InjectStartSyncFlare(syncer::SyncableService::StartSyncFlare flare);
43 44
44 // SessionsSyncManager::LocalEventRouter implementation. 45 // SessionsSyncManager::LocalEventRouter implementation.
45 void StartRoutingTo(LocalSessionEventHandler* handler) override; 46 void StartRoutingTo(LocalSessionEventHandler* handler) override;
46 void Stop() override; 47 void Stop() override;
47 48
48 // KeyedService implementation. 49 // KeyedService implementation.
49 void Shutdown() override; 50 void Shutdown() override;
(...skipping 13 matching lines...) Expand all
63 #if !defined(OS_ANDROID) 64 #if !defined(OS_ANDROID)
64 std::unique_ptr<BrowserListRouterHelper> browser_list_helper_; 65 std::unique_ptr<BrowserListRouterHelper> browser_list_helper_;
65 #endif // !defined(OS_ANDROID) 66 #endif // !defined(OS_ANDROID)
66 67
67 DISALLOW_COPY_AND_ASSIGN(SyncSessionsWebContentsRouter); 68 DISALLOW_COPY_AND_ASSIGN(SyncSessionsWebContentsRouter);
68 }; 69 };
69 70
70 } // namespace sync_sessions 71 } // namespace sync_sessions
71 72
72 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_H_ 73 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_WEB_CONTENTS_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698