| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "extensions/browser/api/management/management_api.h" | 5 #include "extensions/browser/api/management/management_api.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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 } | 250 } |
| 251 | 251 |
| 252 return info; | 252 return info; |
| 253 } | 253 } |
| 254 | 254 |
| 255 void AddExtensionInfo(const ExtensionSet& extensions, | 255 void AddExtensionInfo(const ExtensionSet& extensions, |
| 256 ExtensionInfoList* extension_list, | 256 ExtensionInfoList* extension_list, |
| 257 content::BrowserContext* context) { | 257 content::BrowserContext* context) { |
| 258 for (ExtensionSet::const_iterator iter = extensions.begin(); | 258 for (ExtensionSet::const_iterator iter = extensions.begin(); |
| 259 iter != extensions.end(); ++iter) { | 259 iter != extensions.end(); ++iter) { |
| 260 const Extension& extension = *iter->get(); | 260 const Extension& extension = **iter; |
| 261 | 261 |
| 262 if (extension.ShouldNotBeVisible()) | 262 if (extension.ShouldNotBeVisible()) |
| 263 continue; // Skip built-in extensions/apps. | 263 continue; // Skip built-in extensions/apps. |
| 264 | 264 |
| 265 extension_list->push_back(CreateExtensionInfo(extension, context)); | 265 extension_list->push_back(CreateExtensionInfo(extension, context)); |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace | 269 } // namespace |
| 270 | 270 |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 ManagementAPI::GetFactoryInstance() { | 903 ManagementAPI::GetFactoryInstance() { |
| 904 return g_factory.Pointer(); | 904 return g_factory.Pointer(); |
| 905 } | 905 } |
| 906 | 906 |
| 907 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { | 907 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { |
| 908 management_event_router_.reset(new ManagementEventRouter(browser_context_)); | 908 management_event_router_.reset(new ManagementEventRouter(browser_context_)); |
| 909 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 909 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
| 910 } | 910 } |
| 911 | 911 |
| 912 } // namespace extensions | 912 } // namespace extensions |
| OLD | NEW |