| 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 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2431 | 2431 |
| 2432 bool ExtensionService::HasUsedWebRequest(const Extension* extension) { | 2432 bool ExtensionService::HasUsedWebRequest(const Extension* extension) { |
| 2433 return extension_runtime_data_[extension->id()].has_used_webrequest; | 2433 return extension_runtime_data_[extension->id()].has_used_webrequest; |
| 2434 } | 2434 } |
| 2435 | 2435 |
| 2436 void ExtensionService::SetHasUsedWebRequest(const Extension* extension, | 2436 void ExtensionService::SetHasUsedWebRequest(const Extension* extension, |
| 2437 bool value) { | 2437 bool value) { |
| 2438 extension_runtime_data_[extension->id()].has_used_webrequest = value; | 2438 extension_runtime_data_[extension->id()].has_used_webrequest = value; |
| 2439 } | 2439 } |
| 2440 | 2440 |
| 2441 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { | 2441 base::PropertyBag* ExtensionService::GetPropertyBag( |
| 2442 const Extension* extension) { |
| 2442 return &extension_runtime_data_[extension->id()].property_bag; | 2443 return &extension_runtime_data_[extension->id()].property_bag; |
| 2443 } | 2444 } |
| 2444 | 2445 |
| 2445 void ExtensionService::RegisterNaClModule(const GURL& url, | 2446 void ExtensionService::RegisterNaClModule(const GURL& url, |
| 2446 const std::string& mime_type) { | 2447 const std::string& mime_type) { |
| 2447 NaClModuleInfo info; | 2448 NaClModuleInfo info; |
| 2448 info.url = url; | 2449 info.url = url; |
| 2449 info.mime_type = mime_type; | 2450 info.mime_type = mime_type; |
| 2450 | 2451 |
| 2451 DCHECK(FindNaClModule(url) == nacl_module_list_.end()); | 2452 DCHECK(FindNaClModule(url) == nacl_module_list_.end()); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 | 2512 |
| 2512 ExtensionService::NaClModuleInfoList::iterator | 2513 ExtensionService::NaClModuleInfoList::iterator |
| 2513 ExtensionService::FindNaClModule(const GURL& url) { | 2514 ExtensionService::FindNaClModule(const GURL& url) { |
| 2514 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2515 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2515 iter != nacl_module_list_.end(); ++iter) { | 2516 iter != nacl_module_list_.end(); ++iter) { |
| 2516 if (iter->url == url) | 2517 if (iter->url == url) |
| 2517 return iter; | 2518 return iter; |
| 2518 } | 2519 } |
| 2519 return nacl_module_list_.end(); | 2520 return nacl_module_list_.end(); |
| 2520 } | 2521 } |
| OLD | NEW |