OLD | NEW |
---|---|
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 class SyncPrefs; | 14 class SyncPrefs; |
Nicolas Zea
2015/09/18 20:44:28
nit: newline above.
Abhishek
2015/09/21 05:36:19
Done.
| |
15 } | |
16 | |
17 namespace browser_sync { | |
18 | 15 |
19 // BackupRollbackController takes two closures for starting backup/rollback | 16 // BackupRollbackController takes two closures for starting backup/rollback |
20 // process. It calls the closures according to user's signin status or | 17 // 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 | 18 // received rollback command. Backup is not run when user signed in, even when |
22 // sync is not running. | 19 // sync is not running. |
23 class BackupRollbackController { | 20 class BackupRollbackController { |
24 public: | 21 public: |
25 BackupRollbackController(sync_driver::SyncPrefs* sync_prefs, | 22 BackupRollbackController(sync_driver::SyncPrefs* sync_prefs, |
26 const SigninManagerWrapper* signin, | 23 const SigninManagerWrapper* signin, |
27 base::Closure start_backup, | 24 base::Closure start_backup, |
(...skipping 23 matching lines...) Expand all Loading... | |
51 // Use SigninManagerWrapper instead of SigninManagerBase so that | 48 // Use SigninManagerWrapper instead of SigninManagerBase so that |
52 // supervised users are treated like regular signed-in users. | 49 // supervised users are treated like regular signed-in users. |
53 const SigninManagerWrapper* signin_; | 50 const SigninManagerWrapper* signin_; |
54 | 51 |
55 base::Closure start_backup_; | 52 base::Closure start_backup_; |
56 base::Closure start_rollback_; | 53 base::Closure start_rollback_; |
57 | 54 |
58 DISALLOW_COPY_AND_ASSIGN(BackupRollbackController); | 55 DISALLOW_COPY_AND_ASSIGN(BackupRollbackController); |
59 }; | 56 }; |
60 | 57 |
61 } // namespace browser_sync | 58 } // namespace sync_driver |
62 | 59 |
63 #endif // CHROME_BROWSER_SYNC_BACKUP_ROLLBACK_CONTROLLER_H_ | 60 #endif // COMPONENTS_SYNC_DRIVER_BACKUP_ROLLBACK_CONTROLLER_H_ |
OLD | NEW |