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

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

Issue 2778733003: Pref service: delete old implementation (Closed)
Patch Set: Fix missed merge Created 3 years, 9 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/prefs/preferences_connection_manager.h
diff --git a/chrome/browser/prefs/preferences_connection_manager.h b/chrome/browser/prefs/preferences_connection_manager.h
deleted file mode 100644
index b0f14759d327801678002938dbeecec557923d36..0000000000000000000000000000000000000000
--- a/chrome/browser/prefs/preferences_connection_manager.h
+++ /dev/null
@@ -1,64 +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_CONNECTION_MANAGER_H_
-#define CHROME_BROWSER_PREFS_PREFERENCES_CONNECTION_MANAGER_H_
-
-#include <vector>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-#include "mojo/public/cpp/bindings/strong_binding_set.h"
-#include "services/preferences/public/interfaces/preferences.mojom.h"
-#include "services/service_manager/public/cpp/interface_factory.h"
-#include "services/service_manager/public/cpp/service.h"
-
-// Handles all incoming prefs::mojom::PreferenceManagerRequest, providing a
-// separate PreferencesService per connection request.
-//
-// Additionally monitors system shutdown to clean up connections to PrefService.
-//
-// TODO(jonross): Observe profile switching and update PreferenceManager
-// connections.
-class PreferencesConnectionManager
- : public NON_EXPORTED_BASE(prefs::mojom::PreferencesServiceFactory),
- public NON_EXPORTED_BASE(service_manager::InterfaceFactory<
- prefs::mojom::PreferencesServiceFactory>),
- public NON_EXPORTED_BASE(service_manager::Service) {
- public:
- PreferencesConnectionManager();
- ~PreferencesConnectionManager() override;
-
- private:
- // KeyedServiceShutdownNotifier::Subscription callback. Used to cleanup when
- // the active PrefService is being destroyed.
- void OnProfileDestroyed();
-
- // prefs::mojom::PreferencesServiceFactory:
- void Create(prefs::mojom::PreferencesServiceClientPtr client,
- prefs::mojom::PreferencesServiceRequest service) override;
-
- // service_manager::InterfaceFactory<PreferencesServiceFactory>:
- void Create(const service_manager::Identity& remote_identity,
- prefs::mojom::PreferencesServiceFactoryRequest request) override;
-
- // service_manager::Service:
- bool OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) override;
-
- mojo::BindingSet<prefs::mojom::PreferencesServiceFactory> factory_bindings_;
-
- // Bindings that automatically cleanup during connection errors.
- mojo::StrongBindingSet<prefs::mojom::PreferencesService> manager_bindings_;
-
- // Observes shutdown, when PrefService is being destroyed.
- std::unique_ptr<KeyedServiceShutdownNotifier::Subscription>
- profile_shutdown_notification_;
-
- DISALLOW_COPY_AND_ASSIGN(PreferencesConnectionManager);
-};
-
-#endif // CHROME_BROWSER_PREFS_PREFERENCES_CONNECTION_MANAGER_H_
« no previous file with comments | « chrome/browser/prefs/forwarder_manifest.json ('k') | chrome/browser/prefs/preferences_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698