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

Side by Side Diff: chrome/browser/sync/glue/theme_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_THEME_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_THEME_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_THEME_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_THEME_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 "content/common/content_notification_types.h"
12 #include "content/common/notification_observer.h" 13 #include "content/common/notification_observer.h"
13 #include "content/common/notification_registrar.h" 14 #include "content/common/notification_registrar.h"
14 #include "content/common/notification_type.h"
15 15
16 class NotificationDetails; 16 class NotificationDetails;
17 class NotificationSource; 17 class NotificationSource;
18 class Profile; 18 class Profile;
19 19
20 namespace browser_sync { 20 namespace browser_sync {
21 21
22 class UnrecoverableErrorHandler; 22 class UnrecoverableErrorHandler;
23 23
24 // This class is responsible for taking changes from the 24 // This class is responsible for taking changes from the
25 // ThemeService and applying them to the sync_api 'syncable' 25 // ThemeService and applying them to the sync_api 'syncable'
26 // model, and vice versa. All operations and use of this class are 26 // model, and vice versa. All operations and use of this class are
27 // from the UI thread. 27 // from the UI thread.
28 class ThemeChangeProcessor : public ChangeProcessor, 28 class ThemeChangeProcessor : public ChangeProcessor,
29 public NotificationObserver { 29 public NotificationObserver {
30 public: 30 public:
31 explicit ThemeChangeProcessor(UnrecoverableErrorHandler* error_handler); 31 explicit ThemeChangeProcessor(UnrecoverableErrorHandler* error_handler);
32 virtual ~ThemeChangeProcessor(); 32 virtual ~ThemeChangeProcessor();
33 33
34 // NotificationObserver implementation. 34 // NotificationObserver implementation.
35 // ThemeService -> sync_api model change application. 35 // ThemeService -> 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 -> ThemeService change application. 41 // sync_api model -> ThemeService 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 10 matching lines...) Expand all
57 // Profile associated with the ThemeService. Non-NULL iff |running()| is 57 // Profile associated with the ThemeService. Non-NULL iff |running()| is
58 // true. 58 // true.
59 Profile* profile_; 59 Profile* profile_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(ThemeChangeProcessor); 61 DISALLOW_COPY_AND_ASSIGN(ThemeChangeProcessor);
62 }; 62 };
63 63
64 } // namespace browser_sync 64 } // namespace browser_sync
65 65
66 #endif // CHROME_BROWSER_SYNC_GLUE_THEME_CHANGE_PROCESSOR_H_ 66 #endif // CHROME_BROWSER_SYNC_GLUE_THEME_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_mock.h ('k') | chrome/browser/sync/glue/theme_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698