Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 10217017: Allow features to refer to subkeys in _manifest_features.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Validate gives errors again Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/base64.h" 7 #include "base/base64.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 } 1874 }
1875 1875
1876 bool Extension::LoadBackgroundPersistent( 1876 bool Extension::LoadBackgroundPersistent(
1877 const ExtensionAPIPermissionSet& api_permissions, 1877 const ExtensionAPIPermissionSet& api_permissions,
1878 string16* error) { 1878 string16* error) {
1879 Value* background_persistent = NULL; 1879 Value* background_persistent = NULL;
1880 if (!api_permissions.count(ExtensionAPIPermission::kExperimental) || 1880 if (!api_permissions.count(ExtensionAPIPermission::kExperimental) ||
1881 !manifest_->Get(keys::kBackgroundPersistent, &background_persistent)) 1881 !manifest_->Get(keys::kBackgroundPersistent, &background_persistent))
1882 return true; 1882 return true;
1883 1883
1884 if (!background_persistent->IsType(Value::TYPE_BOOLEAN) || 1884 if (!background_persistent->GetAsBoolean(&background_page_is_persistent_)) {
1885 !background_persistent->GetAsBoolean(&background_page_is_persistent_)) {
1886 *error = ASCIIToUTF16(errors::kInvalidBackgroundPersistent); 1885 *error = ASCIIToUTF16(errors::kInvalidBackgroundPersistent);
1887 return false; 1886 return false;
1888 } 1887 }
1889 1888
1890 if (!has_background_page()) { 1889 if (!has_background_page()) {
1891 *error = ASCIIToUTF16(errors::kInvalidBackgroundPersistentNoPage); 1890 *error = ASCIIToUTF16(errors::kInvalidBackgroundPersistentNoPage);
1892 return false; 1891 return false;
1893 } 1892 }
1894 1893
1895 return true; 1894 return true;
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
3654 already_disabled(false), 3653 already_disabled(false),
3655 extension(extension) {} 3654 extension(extension) {}
3656 3655
3657 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3656 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3658 const Extension* extension, 3657 const Extension* extension,
3659 const ExtensionPermissionSet* permissions, 3658 const ExtensionPermissionSet* permissions,
3660 Reason reason) 3659 Reason reason)
3661 : reason(reason), 3660 : reason(reason),
3662 extension(extension), 3661 extension(extension),
3663 permissions(permissions) {} 3662 permissions(permissions) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698