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

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

Issue 1301883002: Revert of base: Remove using:: declaration from version.h header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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 "extensions/common/extension.h" 5 #include "extensions/common/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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 name_ = base::UTF16ToUTF8(localized_name); 569 name_ = base::UTF16ToUTF8(localized_name);
570 return true; 570 return true;
571 } 571 }
572 572
573 bool Extension::LoadVersion(base::string16* error) { 573 bool Extension::LoadVersion(base::string16* error) {
574 std::string version_str; 574 std::string version_str;
575 if (!manifest_->GetString(keys::kVersion, &version_str)) { 575 if (!manifest_->GetString(keys::kVersion, &version_str)) {
576 *error = base::ASCIIToUTF16(errors::kInvalidVersion); 576 *error = base::ASCIIToUTF16(errors::kInvalidVersion);
577 return false; 577 return false;
578 } 578 }
579 version_.reset(new base::Version(version_str)); 579 version_.reset(new Version(version_str));
580 if (!version_->IsValid() || version_->components().size() > 4) { 580 if (!version_->IsValid() || version_->components().size() > 4) {
581 *error = base::ASCIIToUTF16(errors::kInvalidVersion); 581 *error = base::ASCIIToUTF16(errors::kInvalidVersion);
582 return false; 582 return false;
583 } 583 }
584 if (manifest_->HasKey(keys::kVersionName)) { 584 if (manifest_->HasKey(keys::kVersionName)) {
585 if (!manifest_->GetString(keys::kVersionName, &version_name_)) { 585 if (!manifest_->GetString(keys::kVersionName, &version_name_)) {
586 *error = base::ASCIIToUTF16(errors::kInvalidVersionName); 586 *error = base::ASCIIToUTF16(errors::kInvalidVersionName);
587 return false; 587 return false;
588 } 588 }
589 } 589 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 781
782 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 782 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
783 const Extension* extension, 783 const Extension* extension,
784 const PermissionSet* permissions, 784 const PermissionSet* permissions,
785 Reason reason) 785 Reason reason)
786 : reason(reason), 786 : reason(reason),
787 extension(extension), 787 extension(extension),
788 permissions(permissions) {} 788 permissions(permissions) {}
789 789
790 } // namespace extensions 790 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/user_script_loader.cc ('k') | extensions/common/manifest_handlers/shared_module_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698