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

Side by Side Diff: chrome/browser/sync/backend_migrator.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/sync/backend_migrator.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BACKEND_MIGRATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_
6 #define CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ 6 #define CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_
7 7
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "chrome/browser/sync/profile_sync_service_observer.h" 9 #include "chrome/browser/sync/profile_sync_service_observer.h"
10 #include "chrome/browser/sync/syncable/model_type.h" 10 #include "chrome/browser/sync/syncable/model_type.h"
(...skipping 25 matching lines...) Expand all
36 BackendMigrator(ProfileSyncService* service, DataTypeManager* manager); 36 BackendMigrator(ProfileSyncService* service, DataTypeManager* manager);
37 virtual ~BackendMigrator(); 37 virtual ~BackendMigrator();
38 38
39 // Starts a sequence of events that will disable and reenable |types|. 39 // Starts a sequence of events that will disable and reenable |types|.
40 void MigrateTypes(const syncable::ModelTypeSet& types); 40 void MigrateTypes(const syncable::ModelTypeSet& types);
41 41
42 // ProfileSyncServiceObserver implementation. 42 // ProfileSyncServiceObserver implementation.
43 virtual void OnStateChanged(); 43 virtual void OnStateChanged();
44 44
45 // NotificationObserver implementation. 45 // NotificationObserver implementation.
46 virtual void Observe(NotificationType type, 46 virtual void Observe(int type,
47 const NotificationSource& source, 47 const NotificationSource& source,
48 const NotificationDetails& details); 48 const NotificationDetails& details);
49 49
50 State state() const; 50 State state() const;
51 51
52 private: 52 private:
53 bool HasStartedMigrating() const; 53 bool HasStartedMigrating() const;
54 54
55 State state_; 55 State state_;
56 ProfileSyncService* service_; 56 ProfileSyncService* service_;
57 DataTypeManager* manager_; 57 DataTypeManager* manager_;
58 NotificationRegistrar registrar_; 58 NotificationRegistrar registrar_;
59 59
60 syncable::ModelTypeSet to_migrate_; 60 syncable::ModelTypeSet to_migrate_;
61 bool restart_migration_; 61 bool restart_migration_;
62 62
63 // We use this to gracefully re-start migrations. 63 // We use this to gracefully re-start migrations.
64 ScopedRunnableMethodFactory<BackendMigrator> method_factory_; 64 ScopedRunnableMethodFactory<BackendMigrator> method_factory_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(BackendMigrator); 66 DISALLOW_COPY_AND_ASSIGN(BackendMigrator);
67 }; 67 };
68 68
69 } // namespace browser_sync 69 } // namespace browser_sync
70 70
71 #endif // CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_ 71 #endif // CHROME_BROWSER_SYNC_BACKEND_MIGRATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/sync/backend_migrator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698