OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_MANAGE
R_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_MANAGE
R_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_MANAGE
R_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_MANAGE
R_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_vector.h" | |
13 #include "base/scoped_observer.h" | 12 #include "base/scoped_observer.h" |
14 #include "components/sync/device_info/device_info_tracker.h" | 13 #include "components/sync/device_info/device_info_tracker.h" |
15 #include "extensions/browser/browser_context_keyed_api_factory.h" | 14 #include "extensions/browser/browser_context_keyed_api_factory.h" |
16 #include "extensions/browser/event_router.h" | 15 #include "extensions/browser/event_router.h" |
17 #include "extensions/browser/extension_registry_observer.h" | 16 #include "extensions/browser/extension_registry_observer.h" |
18 | 17 |
19 class Profile; | 18 class Profile; |
20 | 19 |
21 namespace content { | 20 namespace content { |
22 class BrowserContext; | 21 class BrowserContext; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 83 |
85 // BrowserContextKeyedAPI implementation. | 84 // BrowserContextKeyedAPI implementation. |
86 static const char* service_name() { | 85 static const char* service_name() { |
87 return "SignedInDevicesManager"; | 86 return "SignedInDevicesManager"; |
88 } | 87 } |
89 static const bool kServiceHasOwnInstanceInIncognito = true; | 88 static const bool kServiceHasOwnInstanceInIncognito = true; |
90 | 89 |
91 void RemoveChangeObserverForExtension(const std::string& extension_id); | 90 void RemoveChangeObserverForExtension(const std::string& extension_id); |
92 | 91 |
93 Profile* const profile_; | 92 Profile* const profile_; |
94 ScopedVector<SignedInDevicesChangeObserver> change_observers_; | 93 std::vector<std::unique_ptr<SignedInDevicesChangeObserver>> change_observers_; |
95 | 94 |
96 // Listen to extension unloaded notification. | 95 // Listen to extension unloaded notification. |
97 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 96 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
98 extension_registry_observer_; | 97 extension_registry_observer_; |
99 | 98 |
100 FRIEND_TEST_ALL_PREFIXES(SignedInDevicesManager, UpdateListener); | 99 FRIEND_TEST_ALL_PREFIXES(SignedInDevicesManager, UpdateListener); |
101 | 100 |
102 DISALLOW_COPY_AND_ASSIGN(SignedInDevicesManager); | 101 DISALLOW_COPY_AND_ASSIGN(SignedInDevicesManager); |
103 }; | 102 }; |
104 | 103 |
105 } // namespace extensions | 104 } // namespace extensions |
106 | 105 |
107 #endif // CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_MAN
AGER_H__ | 106 #endif // CHROME_BROWSER_EXTENSIONS_API_SIGNED_IN_DEVICES_SIGNED_IN_DEVICES_MAN
AGER_H__ |
OLD | NEW |