| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // | 281 // |
| 282 // Extension | 282 // Extension |
| 283 // | 283 // |
| 284 | 284 |
| 285 // static | 285 // static |
| 286 scoped_refptr<Extension> Extension::Create(const FilePath& path, | 286 scoped_refptr<Extension> Extension::Create(const FilePath& path, |
| 287 Location location, | 287 Location location, |
| 288 const DictionaryValue& value, | 288 const DictionaryValue& value, |
| 289 bool require_key, | 289 bool require_key, |
| 290 std::string* error) { | 290 std::string* error) { |
| 291 scoped_refptr<Extension> extension = new Extension(path, location); | 291 scoped_refptr<Extension> extension(new Extension(path, location)); |
| 292 if (!extension->InitFromValue(value, require_key, error)) | 292 if (!extension->InitFromValue(value, require_key, error)) |
| 293 return NULL; | 293 return NULL; |
| 294 return extension; | 294 return extension; |
| 295 } | 295 } |
| 296 | 296 |
| 297 // static | 297 // static |
| 298 int Extension::GetPermissionMessageId(const std::string& permission) { | 298 int Extension::GetPermissionMessageId(const std::string& permission) { |
| 299 return ExtensionConfig::GetSingleton()->GetPermissionMessageId(permission); | 299 return ExtensionConfig::GetSingleton()->GetPermissionMessageId(permission); |
| 300 } | 300 } |
| 301 | 301 |
| (...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2269 UninstalledExtensionInfo::UninstalledExtensionInfo( | 2269 UninstalledExtensionInfo::UninstalledExtensionInfo( |
| 2270 const Extension& extension) | 2270 const Extension& extension) |
| 2271 : extension_id(extension.id()), | 2271 : extension_id(extension.id()), |
| 2272 extension_api_permissions(extension.api_permissions()), | 2272 extension_api_permissions(extension.api_permissions()), |
| 2273 is_theme(extension.is_theme()), | 2273 is_theme(extension.is_theme()), |
| 2274 is_app(extension.is_app()), | 2274 is_app(extension.is_app()), |
| 2275 converted_from_user_script(extension.converted_from_user_script()), | 2275 converted_from_user_script(extension.converted_from_user_script()), |
| 2276 update_url(extension.update_url()) {} | 2276 update_url(extension.update_url()) {} |
| 2277 | 2277 |
| 2278 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} | 2278 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} |
| OLD | NEW |