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

Unified Diff: chrome/browser/prefs/preferences_manager.h

Issue 2644893003: Unify Preferences Mojom Naming to PreferencesService (Closed)
Patch Set: / Created 3 years, 11 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
« no previous file with comments | « chrome/browser/prefs/preferences_connection_manager.cc ('k') | chrome/browser/prefs/preferences_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/preferences_manager.h
diff --git a/chrome/browser/prefs/preferences_manager.h b/chrome/browser/prefs/preferences_manager.h
deleted file mode 100644
index 8f2272a0f8f03bb48f35b1ac3450294b16446d8b..0000000000000000000000000000000000000000
--- a/chrome/browser/prefs/preferences_manager.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2016 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_PREFS_PREFERENCES_MANAGER_H_
-#define CHROME_BROWSER_PREFS_PREFERENCES_MANAGER_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "services/preferences/public/interfaces/preferences.mojom.h"
-
-namespace test {
-class PreferencesManagerTest;
-}
-
-class PrefChangeRegistrar;
-class PrefService;
-class Profile;
-
-// Implementation of prefs::mojom::PreferencesManager that accepts a single
-// prefs::mojom::PreferencesObserver.
-//
-// After calling AddObserver PreferencesManager will begin observing changes to
-// the requested preferences, notifying the client of all changes.
-class PreferencesManager : public prefs::mojom::PreferencesManager {
- public:
- PreferencesManager(prefs::mojom::PreferencesObserverPtr client,
- Profile* profile);
- ~PreferencesManager() override;
-
- private:
- friend class test::PreferencesManagerTest;
-
- // PrefChangeRegistrar::NamedChangeCallback:
- void PreferenceChanged(const std::string& preference_name);
-
- // mojom::PreferencesManager:
- void SetPreferences(
- std::unique_ptr<base::DictionaryValue> preferences) override;
- void Subscribe(const std::vector<std::string>& preferences) override;
-
- // Tracks the desired preferences, and listens for updates.
- std::unique_ptr<PrefChangeRegistrar> preferences_change_registrar_;
- prefs::mojom::PreferencesObserverPtr client_;
- PrefService* service_;
-
- // Used to prevent notifying |client_| of changes caused by it calling
- // SetPreferences.
- bool setting_preferences_;
-
- DISALLOW_COPY_AND_ASSIGN(PreferencesManager);
-};
-
-#endif // CHROME_BROWSER_PREFS_PREFERENCES_MANAGER_H_
« no previous file with comments | « chrome/browser/prefs/preferences_connection_manager.cc ('k') | chrome/browser/prefs/preferences_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698