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

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

Issue 2259383002: Consistently use namespaced base::Version in extensions code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 name_ = base::UTF16ToUTF8(localized_name); 572 name_ = base::UTF16ToUTF8(localized_name);
573 return true; 573 return true;
574 } 574 }
575 575
576 bool Extension::LoadVersion(base::string16* error) { 576 bool Extension::LoadVersion(base::string16* error) {
577 std::string version_str; 577 std::string version_str;
578 if (!manifest_->GetString(keys::kVersion, &version_str)) { 578 if (!manifest_->GetString(keys::kVersion, &version_str)) {
579 *error = base::ASCIIToUTF16(errors::kInvalidVersion); 579 *error = base::ASCIIToUTF16(errors::kInvalidVersion);
580 return false; 580 return false;
581 } 581 }
582 version_.reset(new Version(version_str)); 582 version_.reset(new base::Version(version_str));
583 if (!version_->IsValid() || version_->components().size() > 4) { 583 if (!version_->IsValid() || version_->components().size() > 4) {
584 *error = base::ASCIIToUTF16(errors::kInvalidVersion); 584 *error = base::ASCIIToUTF16(errors::kInvalidVersion);
585 return false; 585 return false;
586 } 586 }
587 if (manifest_->HasKey(keys::kVersionName)) { 587 if (manifest_->HasKey(keys::kVersionName)) {
588 if (!manifest_->GetString(keys::kVersionName, &version_name_)) { 588 if (!manifest_->GetString(keys::kVersionName, &version_name_)) {
589 *error = base::ASCIIToUTF16(errors::kInvalidVersionName); 589 *error = base::ASCIIToUTF16(errors::kInvalidVersionName);
590 return false; 590 return false;
591 } 591 }
592 } 592 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 : reason(reason), 776 : reason(reason),
777 extension(extension) {} 777 extension(extension) {}
778 778
779 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 779 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
780 const Extension* extension, 780 const Extension* extension,
781 const PermissionSet& permissions, 781 const PermissionSet& permissions,
782 Reason reason) 782 Reason reason)
783 : reason(reason), extension(extension), permissions(permissions) {} 783 : reason(reason), extension(extension), permissions(permissions) {}
784 784
785 } // namespace extensions 785 } // 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