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

Side by Side Diff: chrome/browser/sync/glue/app_change_processor.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
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_GLUE_APP_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_APP_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_APP_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_APP_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/sync/engine/syncapi.h" 10 #include "chrome/browser/sync/engine/syncapi.h"
11 #include "chrome/browser/sync/glue/change_processor.h" 11 #include "chrome/browser/sync/glue/change_processor.h"
12 #include "chrome/browser/sync/glue/extension_sync_traits.h" 12 #include "chrome/browser/sync/glue/extension_sync_traits.h"
13 #include "content/common/content_notification_types.h"
13 #include "content/common/notification_observer.h" 14 #include "content/common/notification_observer.h"
14 #include "content/common/notification_registrar.h" 15 #include "content/common/notification_registrar.h"
15 #include "content/common/notification_type.h"
16 16
17 class ExtensionServiceInterface; 17 class ExtensionServiceInterface;
18 18
19 namespace browser_sync { 19 namespace browser_sync {
20 20
21 class UnrecoverableErrorHandler; 21 class UnrecoverableErrorHandler;
22 22
23 // This class is responsible for taking changes from the 23 // This class is responsible for taking changes from the
24 // ExtensionService and applying them to the sync_api 'syncable' 24 // ExtensionService and applying them to the sync_api 'syncable'
25 // model, and vice versa. All operations and use of this class are 25 // model, and vice versa. All operations and use of this class are
26 // from the UI thread. 26 // from the UI thread.
27 class AppChangeProcessor : public ChangeProcessor, 27 class AppChangeProcessor : public ChangeProcessor,
28 public NotificationObserver { 28 public NotificationObserver {
29 public: 29 public:
30 // Does not take ownership of |error_handler|. 30 // Does not take ownership of |error_handler|.
31 explicit AppChangeProcessor(UnrecoverableErrorHandler* error_handler); 31 explicit AppChangeProcessor(UnrecoverableErrorHandler* error_handler);
32 virtual ~AppChangeProcessor(); 32 virtual ~AppChangeProcessor();
33 33
34 // NotificationObserver implementation. 34 // NotificationObserver implementation.
35 // BrowserExtensionProvider -> sync_api model change application. 35 // BrowserExtensionProvider -> sync_api model change application.
36 virtual void Observe(NotificationType type, 36 virtual void Observe(int type,
37 const NotificationSource& source, 37 const NotificationSource& source,
38 const NotificationDetails& details); 38 const NotificationDetails& details);
39 39
40 // ChangeProcessor implementation. 40 // ChangeProcessor implementation.
41 // sync_api model -> BrowserExtensionProvider change application. 41 // sync_api model -> BrowserExtensionProvider change application.
42 virtual void ApplyChangesFromSyncModel( 42 virtual void ApplyChangesFromSyncModel(
43 const sync_api::BaseTransaction* trans, 43 const sync_api::BaseTransaction* trans,
44 const sync_api::SyncManager::ChangeRecord* changes, 44 const sync_api::SyncManager::ChangeRecord* changes,
45 int change_count); 45 int change_count);
46 46
(...skipping 12 matching lines...) Expand all
59 // Non-NULL iff |running()| is true. 59 // Non-NULL iff |running()| is true.
60 Profile* profile_; 60 Profile* profile_;
61 ExtensionServiceInterface* extension_service_; 61 ExtensionServiceInterface* extension_service_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(AppChangeProcessor); 63 DISALLOW_COPY_AND_ASSIGN(AppChangeProcessor);
64 }; 64 };
65 65
66 } // namespace browser_sync 66 } // namespace browser_sync
67 67
68 #endif // CHROME_BROWSER_SYNC_GLUE_APP_CHANGE_PROCESSOR_H_ 68 #endif // CHROME_BROWSER_SYNC_GLUE_APP_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/backend_migrator_unittest.cc ('k') | chrome/browser/sync/glue/app_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698