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

Unified Diff: chrome/browser/sync/glue/preference_change_processor.h

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/preference_change_processor.h
diff --git a/chrome/browser/sync/glue/preference_change_processor.h b/chrome/browser/sync/glue/preference_change_processor.h
deleted file mode 100644
index 81117756d614c416e5fc1039e854efe3f10c6b6c..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/glue/preference_change_processor.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_SYNC_GLUE_PREFERENCE_CHANGE_PROCESSOR_H_
-#define CHROME_BROWSER_SYNC_GLUE_PREFERENCE_CHANGE_PROCESSOR_H_
-#pragma once
-
-#include <string>
-
-#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/sync/engine/syncapi.h"
-#include "chrome/browser/sync/glue/change_processor.h"
-#include "chrome/browser/sync/glue/sync_backend_host.h"
-#include "content/common/notification_observer.h"
-
-namespace browser_sync {
-
-class PreferenceModelAssociator;
-class UnrecoverableErrorHandler;
-
-// This class is responsible for taking changes from the PrefService and
-// applying them to the sync_api 'syncable' model, and vice versa. All
-// operations and use of this class are from the UI thread.
-class PreferenceChangeProcessor : public ChangeProcessor,
- public NotificationObserver {
- public:
- PreferenceChangeProcessor(PreferenceModelAssociator* model_associator,
- UnrecoverableErrorHandler* error_handler);
- virtual ~PreferenceChangeProcessor();
-
- // NotificationObserver implementation.
- // PrefService -> sync_api model change application.
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
-
- // sync_api model -> PrefService change application.
- virtual void ApplyChangesFromSyncModel(
- const sync_api::BaseTransaction* trans,
- const sync_api::SyncManager::ChangeRecord* changes,
- int change_count);
-
- protected:
- virtual void StartImpl(Profile* profile);
- virtual void StopImpl();
-
- private:
- Value* ReadPreference(sync_api::ReadNode* node, std::string* name);
-
- void StartObserving();
- void StopObserving();
-
- // The model we are processing changes from. Non-NULL when |running_| is true.
- PrefService* pref_service_;
-
- // The two models should be associated according to this ModelAssociator.
- PreferenceModelAssociator* model_associator_;
-
- // Whether we are currently processing a preference change notification.
- bool processing_pref_change_;
-
- PrefChangeRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(PreferenceChangeProcessor);
-};
-
-} // namespace browser_sync
-
-#endif // CHROME_BROWSER_SYNC_GLUE_PREFERENCE_CHANGE_PROCESSOR_H_
« no previous file with comments | « chrome/browser/sync/glue/non_frontend_data_type_controller.cc ('k') | chrome/browser/sync/glue/preference_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698