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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_core.h

Issue 437683002: Wire sync shutdown reason from PSS all the way down to sync manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_GLUE_SYNC_BACKEND_HOST_CORE_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 9
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
11 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" 11 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
12 #include "components/sync_driver/system_encryptor.h" 12 #include "components/sync_driver/system_encryptor.h"
13 #include "sync/internal_api/public/base/cancelation_signal.h" 13 #include "sync/internal_api/public/base/cancelation_signal.h"
14 #include "sync/internal_api/public/sessions/type_debug_info_observer.h" 14 #include "sync/internal_api/public/sessions/type_debug_info_observer.h"
15 #include "sync/internal_api/public/shutdown_reason.h"
15 #include "sync/internal_api/public/sync_encryption_handler.h" 16 #include "sync/internal_api/public/sync_encryption_handler.h"
16 #include "url/gurl.h" 17 #include "url/gurl.h"
17 18
18 namespace browser_sync { 19 namespace browser_sync {
19 20
20 class SyncBackendHostImpl; 21 class SyncBackendHostImpl;
21 22
22 // Utility struct for holding initialization options. 23 // Utility struct for holding initialization options.
23 struct DoInitializeOptions { 24 struct DoInitializeOptions {
24 DoInitializeOptions( 25 DoInitializeOptions(
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // thread. This function asynchronously continues the work started in 188 // thread. This function asynchronously continues the work started in
188 // DoInitialProcessControlTypes() once that other thread gets back to us. 189 // DoInitialProcessControlTypes() once that other thread gets back to us.
189 void DoFinishInitialProcessControlTypes(); 190 void DoFinishInitialProcessControlTypes();
190 191
191 // The shutdown order is a bit complicated: 192 // The shutdown order is a bit complicated:
192 // 1) Call ShutdownOnUIThread() from |frontend_loop_| to request sync manager 193 // 1) Call ShutdownOnUIThread() from |frontend_loop_| to request sync manager
193 // to stop as soon as possible. 194 // to stop as soon as possible.
194 // 2) Post DoShutdown() to sync loop to clean up backend state, save 195 // 2) Post DoShutdown() to sync loop to clean up backend state, save
195 // directory and destroy sync manager. 196 // directory and destroy sync manager.
196 void ShutdownOnUIThread(); 197 void ShutdownOnUIThread();
197 void DoShutdown(bool sync_disabled); 198 void DoShutdown(syncer::ShutdownReason reason);
198 void DoDestroySyncManager(); 199 void DoDestroySyncManager(syncer::ShutdownReason reason);
199 200
200 // Configuration methods that must execute on sync loop. 201 // Configuration methods that must execute on sync loop.
201 void DoConfigureSyncer( 202 void DoConfigureSyncer(
202 syncer::ConfigureReason reason, 203 syncer::ConfigureReason reason,
203 const DoConfigureSyncerTypes& config_types, 204 const DoConfigureSyncerTypes& config_types,
204 const syncer::ModelSafeRoutingInfo routing_info, 205 const syncer::ModelSafeRoutingInfo routing_info,
205 const base::Callback<void(syncer::ModelTypeSet, 206 const base::Callback<void(syncer::ModelTypeSet,
206 syncer::ModelTypeSet)>& ready_task, 207 syncer::ModelTypeSet)>& ready_task,
207 const base::Closure& retry_callback); 208 const base::Closure& retry_callback);
208 void DoFinishConfigureDataTypes( 209 void DoFinishConfigureDataTypes(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 std::string signin_scoped_device_id_; 328 std::string signin_scoped_device_id_;
328 329
329 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; 330 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_;
330 331
331 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); 332 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore);
332 }; 333 };
333 334
334 } // namespace browser_sync 335 } // namespace browser_sync
335 336
336 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ 337 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/glue/sync_backend_host_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698