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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 ExtensionSystem::Get(profile_)->event_router()->DispatchEventToExtension( | 91 ExtensionSystem::Get(profile_)->event_router()->DispatchEventToExtension( |
92 extension_id_, event.Pass()); | 92 extension_id_, event.Pass()); |
93 } | 93 } |
94 | 94 |
95 static base::LazyInstance<ProfileKeyedAPIFactory<SignedInDevicesManager> > | 95 static base::LazyInstance<ProfileKeyedAPIFactory<SignedInDevicesManager> > |
96 g_factory = LAZY_INSTANCE_INITIALIZER; | 96 g_factory = LAZY_INSTANCE_INITIALIZER; |
97 | 97 |
98 // static | 98 // static |
99 ProfileKeyedAPIFactory<SignedInDevicesManager>* | 99 ProfileKeyedAPIFactory<SignedInDevicesManager>* |
100 SignedInDevicesManager::GetFactoryInstance() { | 100 SignedInDevicesManager::GetFactoryInstance() { |
101 return &g_factory.Get(); | 101 return g_factory.Pointer(); |
102 } | 102 } |
103 | 103 |
104 SignedInDevicesManager::SignedInDevicesManager() | 104 SignedInDevicesManager::SignedInDevicesManager() |
105 : profile_(NULL) {} | 105 : profile_(NULL) {} |
106 | 106 |
107 SignedInDevicesManager::SignedInDevicesManager(Profile* profile) | 107 SignedInDevicesManager::SignedInDevicesManager(Profile* profile) |
108 : profile_(profile) { | 108 : profile_(profile) { |
109 extensions::EventRouter* router = extensions::ExtensionSystem::Get( | 109 extensions::EventRouter* router = extensions::ExtensionSystem::Get( |
110 profile_)->event_router(); | 110 profile_)->event_router(); |
111 | 111 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 const content::NotificationSource& source, | 163 const content::NotificationSource& source, |
164 const content::NotificationDetails& details) { | 164 const content::NotificationDetails& details) { |
165 DCHECK_EQ(type, chrome::NOTIFICATION_EXTENSION_UNLOADED); | 165 DCHECK_EQ(type, chrome::NOTIFICATION_EXTENSION_UNLOADED); |
166 UnloadedExtensionInfo* reason = | 166 UnloadedExtensionInfo* reason = |
167 content::Details<UnloadedExtensionInfo>(details).ptr(); | 167 content::Details<UnloadedExtensionInfo>(details).ptr(); |
168 RemoveChangeObserverForExtension(reason->extension->id()); | 168 RemoveChangeObserverForExtension(reason->extension->id()); |
169 } | 169 } |
170 | 170 |
171 } // namespace extensions | 171 } // namespace extensions |
172 | 172 |
OLD | NEW |