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/common/extensions/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2423 chrome_url_overrides_[page] = GetResourceURL(val); | 2423 chrome_url_overrides_[page] = GetResourceURL(val); |
2424 } | 2424 } |
2425 | 2425 |
2426 // An extension may override at most one page. | 2426 // An extension may override at most one page. |
2427 if (overrides->size() > 1) { | 2427 if (overrides->size() > 1) { |
2428 *error = errors::kMultipleOverrides; | 2428 *error = errors::kMultipleOverrides; |
2429 return false; | 2429 return false; |
2430 } | 2430 } |
2431 } | 2431 } |
2432 | 2432 |
2433 if (CommandLine::ForCurrentProcess()->HasSwitch( | 2433 if (/*CommandLine::ForCurrentProcess()->HasSwitch( |
2434 switches::kEnableExperimentalExtensionApis) && | 2434 switches::kEnableExperimentalExtensionApis) &&*/ |
2435 source.HasKey(keys::kInputComponents)) { | 2435 source.HasKey(keys::kInputComponents)) { |
2436 ListValue* list_value = NULL; | 2436 ListValue* list_value = NULL; |
2437 if (!source.GetList(keys::kInputComponents, &list_value)) { | 2437 if (!source.GetList(keys::kInputComponents, &list_value)) { |
2438 *error = errors::kInvalidInputComponents; | 2438 *error = errors::kInvalidInputComponents; |
2439 return false; | 2439 return false; |
2440 } | 2440 } |
2441 | 2441 |
2442 for (size_t i = 0; i < list_value->GetSize(); ++i) { | 2442 for (size_t i = 0; i < list_value->GetSize(); ++i) { |
2443 DictionaryValue* module_value = NULL; | 2443 DictionaryValue* module_value = NULL; |
2444 std::string name_str; | 2444 std::string name_str; |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3161 | 3161 |
3162 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} | 3162 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} |
3163 | 3163 |
3164 | 3164 |
3165 UnloadedExtensionInfo::UnloadedExtensionInfo( | 3165 UnloadedExtensionInfo::UnloadedExtensionInfo( |
3166 const Extension* extension, | 3166 const Extension* extension, |
3167 Reason reason) | 3167 Reason reason) |
3168 : reason(reason), | 3168 : reason(reason), |
3169 already_disabled(false), | 3169 already_disabled(false), |
3170 extension(extension) {} | 3170 extension(extension) {} |
OLD | NEW |