| 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 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 | 2034 |
| 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 = orphaned_dev_tools_.find(host->id()); |
| 2045 orphaned_dev_tools_.find(host->extension()->id()); | |
| 2046 if (iter == orphaned_dev_tools_.end()) | 2045 if (iter == orphaned_dev_tools_.end()) |
| 2047 return; | 2046 return; |
| 2048 | 2047 |
| 2049 DevToolsManager::GetInstance()->AttachClientHost( | 2048 DevToolsManager::GetInstance()->AttachClientHost( |
| 2050 iter->second, host->render_view_host()); | 2049 iter->second, host->render_view_host()); |
| 2051 orphaned_dev_tools_.erase(iter); | 2050 orphaned_dev_tools_.erase(iter); |
| 2052 } | 2051 } |
| 2053 | 2052 |
| 2054 void ExtensionService::Observe(NotificationType type, | 2053 void ExtensionService::Observe(NotificationType type, |
| 2055 const NotificationSource& source, | 2054 const NotificationSource& source, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 | 2202 |
| 2204 ExtensionService::NaClModuleInfoList::iterator | 2203 ExtensionService::NaClModuleInfoList::iterator |
| 2205 ExtensionService::FindNaClModule(const GURL& url) { | 2204 ExtensionService::FindNaClModule(const GURL& url) { |
| 2206 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2205 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2207 iter != nacl_module_list_.end(); ++iter) { | 2206 iter != nacl_module_list_.end(); ++iter) { |
| 2208 if (iter->url == url) | 2207 if (iter->url == url) |
| 2209 return iter; | 2208 return iter; |
| 2210 } | 2209 } |
| 2211 return nacl_module_list_.end(); | 2210 return nacl_module_list_.end(); |
| 2212 } | 2211 } |
| OLD | NEW |