| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_PREFS_ACTIVE_PROFILE_PREF_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_ACTIVE_PROFILE_PREF_SERVICE_H_ |
| 6 #define CHROME_BROWSER_PREFS_ACTIVE_PROFILE_PREF_SERVICE_H_ | 6 #define CHROME_BROWSER_PREFS_ACTIVE_PROFILE_PREF_SERVICE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 public: | 25 public: |
| 26 ActiveProfilePrefService(); | 26 ActiveProfilePrefService(); |
| 27 ~ActiveProfilePrefService() override; | 27 ~ActiveProfilePrefService() override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // prefs::mojom::PrefStoreConnector: | 30 // prefs::mojom::PrefStoreConnector: |
| 31 void Connect( | 31 void Connect( |
| 32 prefs::mojom::PrefRegistryPtr pref_registry, | 32 prefs::mojom::PrefRegistryPtr pref_registry, |
| 33 const std::vector<PrefValueStore::PrefStoreType>& already_connected_types, | 33 const std::vector<PrefValueStore::PrefStoreType>& already_connected_types, |
| 34 const ConnectCallback& callback) override; | 34 const ConnectCallback& callback) override; |
| 35 void ConnectToUserPrefStore(prefs::mojom::PrefStoreRequest request) override; |
| 35 | 36 |
| 36 // service_manager::Service: | 37 // service_manager::Service: |
| 37 void OnStart() override; | 38 void OnStart() override; |
| 38 void OnBindInterface(const service_manager::BindSourceInfo& source_info, | 39 void OnBindInterface(const service_manager::BindSourceInfo& source_info, |
| 39 const std::string& interface_name, | 40 const std::string& interface_name, |
| 40 mojo::ScopedMessagePipeHandle interface_pipe) override; | 41 mojo::ScopedMessagePipeHandle interface_pipe) override; |
| 41 | 42 |
| 42 void Create(const service_manager::BindSourceInfo& source_info, | 43 void Create(const service_manager::BindSourceInfo& source_info, |
| 43 prefs::mojom::PrefStoreConnectorRequest request); | 44 prefs::mojom::PrefStoreConnectorRequest request); |
| 44 | 45 |
| 45 // Called if forwarding the connection request to the per-profile service | 46 // Called if forwarding the connection request to the per-profile service |
| 46 // instance failed. | 47 // instance failed. |
| 47 void OnConnectError(); | 48 void OnConnectError(); |
| 48 | 49 |
| 49 prefs::mojom::PrefStoreConnectorPtr connector_ptr_; | 50 prefs::mojom::PrefStoreConnectorPtr connector_ptr_; |
| 50 service_manager::BinderRegistry registry_; | 51 service_manager::BinderRegistry registry_; |
| 51 mojo::BindingSet<prefs::mojom::PrefStoreConnector> connector_bindings_; | 52 mojo::BindingSet<prefs::mojom::PrefStoreConnector> connector_bindings_; |
| 52 | 53 |
| 53 DISALLOW_COPY_AND_ASSIGN(ActiveProfilePrefService); | 54 DISALLOW_COPY_AND_ASSIGN(ActiveProfilePrefService); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 #endif // CHROME_BROWSER_PREFS_ACTIVE_PROFILE_PREF_SERVICE_H_ | 57 #endif // CHROME_BROWSER_PREFS_ACTIVE_PROFILE_PREF_SERVICE_H_ |
| OLD | NEW |