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 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_mana
ger.h" | 5 #include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_mana
ger.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 api::signed_in_devices::OnDeviceInfoChange::kEventName, | 80 api::signed_in_devices::OnDeviceInfoChange::kEventName, |
81 std::move(result))); | 81 std::move(result))); |
82 | 82 |
83 event->restrict_to_browser_context = profile_; | 83 event->restrict_to_browser_context = profile_; |
84 | 84 |
85 EventRouter::Get(profile_) | 85 EventRouter::Get(profile_) |
86 ->DispatchEventToExtension(extension_id_, std::move(event)); | 86 ->DispatchEventToExtension(extension_id_, std::move(event)); |
87 } | 87 } |
88 | 88 |
89 static base::LazyInstance< | 89 static base::LazyInstance< |
90 BrowserContextKeyedAPIFactory<SignedInDevicesManager> > g_factory = | 90 BrowserContextKeyedAPIFactory<SignedInDevicesManager>>::DestructorAtExit |
91 LAZY_INSTANCE_INITIALIZER; | 91 g_factory = LAZY_INSTANCE_INITIALIZER; |
92 | 92 |
93 // static | 93 // static |
94 BrowserContextKeyedAPIFactory<SignedInDevicesManager>* | 94 BrowserContextKeyedAPIFactory<SignedInDevicesManager>* |
95 SignedInDevicesManager::GetFactoryInstance() { | 95 SignedInDevicesManager::GetFactoryInstance() { |
96 return g_factory.Pointer(); | 96 return g_factory.Pointer(); |
97 } | 97 } |
98 | 98 |
99 SignedInDevicesManager::SignedInDevicesManager() | 99 SignedInDevicesManager::SignedInDevicesManager() |
100 : profile_(NULL), extension_registry_observer_(this) { | 100 : profile_(NULL), extension_registry_observer_(this) { |
101 } | 101 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 154 } |
155 | 155 |
156 void SignedInDevicesManager::OnExtensionUnloaded( | 156 void SignedInDevicesManager::OnExtensionUnloaded( |
157 content::BrowserContext* browser_context, | 157 content::BrowserContext* browser_context, |
158 const Extension* extension, | 158 const Extension* extension, |
159 UnloadedExtensionInfo::Reason reason) { | 159 UnloadedExtensionInfo::Reason reason) { |
160 RemoveChangeObserverForExtension(extension->id()); | 160 RemoveChangeObserverForExtension(extension->id()); |
161 } | 161 } |
162 | 162 |
163 } // namespace extensions | 163 } // namespace extensions |
OLD | NEW |