OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2035 std::string path_str = UTF16ToUTF8(extension_path.LossyDisplayName()); | 2035 std::string path_str = UTF16ToUTF8(extension_path.LossyDisplayName()); |
2036 std::string message = base::StringPrintf( | 2036 std::string message = base::StringPrintf( |
2037 "Could not load extension from '%s'. %s", | 2037 "Could not load extension from '%s'. %s", |
2038 path_str.c_str(), error.c_str()); | 2038 path_str.c_str(), error.c_str()); |
2039 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); | 2039 ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); |
2040 } | 2040 } |
2041 | 2041 |
2042 void ExtensionService::DidCreateRenderViewForBackgroundPage( | 2042 void ExtensionService::DidCreateRenderViewForBackgroundPage( |
2043 ExtensionHost* host) { | 2043 ExtensionHost* host) { |
2044 OrphanedDevTools::iterator iter = | 2044 OrphanedDevTools::iterator iter = |
2045 orphaned_dev_tools_.find(host->extension()->id()); | 2045 orphaned_dev_tools_.find(host->extension_id()); |
2046 if (iter == orphaned_dev_tools_.end()) | 2046 if (iter == orphaned_dev_tools_.end()) |
2047 return; | 2047 return; |
2048 | 2048 |
2049 DevToolsManager::GetInstance()->AttachClientHost( | 2049 DevToolsManager::GetInstance()->AttachClientHost( |
2050 iter->second, host->render_view_host()); | 2050 iter->second, host->render_view_host()); |
2051 orphaned_dev_tools_.erase(iter); | 2051 orphaned_dev_tools_.erase(iter); |
2052 } | 2052 } |
2053 | 2053 |
2054 void ExtensionService::Observe(NotificationType type, | 2054 void ExtensionService::Observe(NotificationType type, |
2055 const NotificationSource& source, | 2055 const NotificationSource& source, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2203 | 2203 |
2204 ExtensionService::NaClModuleInfoList::iterator | 2204 ExtensionService::NaClModuleInfoList::iterator |
2205 ExtensionService::FindNaClModule(const GURL& url) { | 2205 ExtensionService::FindNaClModule(const GURL& url) { |
2206 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2206 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2207 iter != nacl_module_list_.end(); ++iter) { | 2207 iter != nacl_module_list_.end(); ++iter) { |
2208 if (iter->url == url) | 2208 if (iter->url == url) |
2209 return iter; | 2209 return iter; |
2210 } | 2210 } |
2211 return nacl_module_list_.end(); | 2211 return nacl_module_list_.end(); |
2212 } | 2212 } |
OLD | NEW |