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

Side by Side Diff: components/sync_driver/backup_rollback_controller.h

Issue 1354883003: Componentize chrome/browser/sync/backup_rollback_controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated Created 5 years, 3 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
« no previous file with comments | « components/sync_driver/BUILD.gn ('k') | components/sync_driver/backup_rollback_controller.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BACKUP_ROLLBACK_CONTROLLER_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_BACKUP_ROLLBACK_CONTROLLER_H_
6 #define CHROME_BROWSER_SYNC_BACKUP_ROLLBACK_CONTROLLER_H_ 6 #define COMPONENTS_SYNC_DRIVER_BACKUP_ROLLBACK_CONTROLLER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 10
11 class SigninManagerWrapper; 11 class SigninManagerWrapper;
12 12
13 namespace sync_driver { 13 namespace sync_driver {
14
14 class SyncPrefs; 15 class SyncPrefs;
15 }
16
17 namespace browser_sync {
18 16
19 // BackupRollbackController takes two closures for starting backup/rollback 17 // BackupRollbackController takes two closures for starting backup/rollback
20 // process. It calls the closures according to user's signin status or 18 // process. It calls the closures according to user's signin status or
21 // received rollback command. Backup is not run when user signed in, even when 19 // received rollback command. Backup is not run when user signed in, even when
22 // sync is not running. 20 // sync is not running.
23 class BackupRollbackController { 21 class BackupRollbackController {
24 public: 22 public:
25 BackupRollbackController(sync_driver::SyncPrefs* sync_prefs, 23 BackupRollbackController(sync_driver::SyncPrefs* sync_prefs,
26 const SigninManagerWrapper* signin, 24 const SigninManagerWrapper* signin,
27 base::Closure start_backup, 25 base::Closure start_backup,
(...skipping 23 matching lines...) Expand all
51 // Use SigninManagerWrapper instead of SigninManagerBase so that 49 // Use SigninManagerWrapper instead of SigninManagerBase so that
52 // supervised users are treated like regular signed-in users. 50 // supervised users are treated like regular signed-in users.
53 const SigninManagerWrapper* signin_; 51 const SigninManagerWrapper* signin_;
54 52
55 base::Closure start_backup_; 53 base::Closure start_backup_;
56 base::Closure start_rollback_; 54 base::Closure start_rollback_;
57 55
58 DISALLOW_COPY_AND_ASSIGN(BackupRollbackController); 56 DISALLOW_COPY_AND_ASSIGN(BackupRollbackController);
59 }; 57 };
60 58
61 } // namespace browser_sync 59 } // namespace sync_driver
62 60
63 #endif // CHROME_BROWSER_SYNC_BACKUP_ROLLBACK_CONTROLLER_H_ 61 #endif // COMPONENTS_SYNC_DRIVER_BACKUP_ROLLBACK_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/sync_driver/BUILD.gn ('k') | components/sync_driver/backup_rollback_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698