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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_util.h" 10 #include "base/file_util.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 return ExtensionConfig::GetInstance()->whitelist(); 430 return ExtensionConfig::GetInstance()->whitelist();
431 } 431 }
432 432
433 bool Extension::ParsePermissions(const char* key, 433 bool Extension::ParsePermissions(const char* key,
434 string16* error, 434 string16* error,
435 APIPermissionSet* api_permissions, 435 APIPermissionSet* api_permissions,
436 URLPatternSet* host_permissions) { 436 URLPatternSet* host_permissions) {
437 if (manifest_->HasKey(key)) { 437 if (manifest_->HasKey(key)) {
438 const ListValue* permissions = NULL; 438 const ListValue* permissions = NULL;
439 if (!manifest_->GetList(key, &permissions)) { 439 if (!manifest_->GetList(key, &permissions)) {
440 *error = ErrorUtils::FormatErrorMessageUTF16( 440 *error = ErrorUtils::FormatErrorMessageUTF16(errors::kInvalidPermissions,
441 errors::kInvalidPermissions, ""); 441 std::string());
442 return false; 442 return false;
443 } 443 }
444 444
445 // NOTE: We need to get the APIPermission before we check if features 445 // NOTE: We need to get the APIPermission before we check if features
446 // associated with them are available because the feature system does not 446 // associated with them are available because the feature system does not
447 // know about aliases. 447 // know about aliases.
448 448
449 std::vector<std::string> host_data; 449 std::vector<std::string> host_data;
450 if (!APIPermissionSet::ParseFromJSON(permissions, api_permissions, 450 if (!APIPermissionSet::ParseFromJSON(permissions, api_permissions,
451 error, &host_data)) 451 error, &host_data))
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 1803
1804 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 1804 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
1805 const Extension* extension, 1805 const Extension* extension,
1806 const PermissionSet* permissions, 1806 const PermissionSet* permissions,
1807 Reason reason) 1807 Reason reason)
1808 : reason(reason), 1808 : reason(reason),
1809 extension(extension), 1809 extension(extension),
1810 permissions(permissions) {} 1810 permissions(permissions) {}
1811 1811
1812 } // namespace extensions 1812 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/csp_validator_unittest.cc ('k') | chrome/common/extensions/extension_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698