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

Side by Side Diff: chrome/browser/extensions/extension_management_internal.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/extensions/extension_management_internal.h" 5 #include "chrome/browser/extensions/extension_management_internal.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 APIPermissionSet::Union( 130 APIPermissionSet::Union(
131 permissions_to_merge_from, permissions_parsed, &blocked_permissions); 131 permissions_to_merge_from, permissions_parsed, &blocked_permissions);
132 } 132 }
133 133
134 // Parses the minimum version settings. 134 // Parses the minimum version settings.
135 std::string minimum_version_required_str; 135 std::string minimum_version_required_str;
136 if (scope == SCOPE_INDIVIDUAL && 136 if (scope == SCOPE_INDIVIDUAL &&
137 dict->GetStringWithoutPathExpansion( 137 dict->GetStringWithoutPathExpansion(
138 schema_constants::kMinimumVersionRequired, 138 schema_constants::kMinimumVersionRequired,
139 &minimum_version_required_str)) { 139 &minimum_version_required_str)) {
140 scoped_ptr<base::Version> version( 140 std::unique_ptr<base::Version> version(
141 new Version(minimum_version_required_str)); 141 new Version(minimum_version_required_str));
142 // We accept a general version string here. Note that count of components in 142 // We accept a general version string here. Note that count of components in
143 // version string of extensions is limited to 4. 143 // version string of extensions is limited to 4.
144 if (!version->IsValid()) 144 if (!version->IsValid())
145 LOG(WARNING) << kMalformedPreferenceWarning; 145 LOG(WARNING) << kMalformedPreferenceWarning;
146 else 146 else
147 minimum_version_required = std::move(version); 147 minimum_version_required = std::move(version);
148 } 148 }
149 149
150 return true; 150 return true;
(...skipping 15 matching lines...) Expand all
166 void GlobalSettings::Reset() { 166 void GlobalSettings::Reset() {
167 has_restricted_install_sources = false; 167 has_restricted_install_sources = false;
168 install_sources.ClearPatterns(); 168 install_sources.ClearPatterns();
169 has_restricted_allowed_types = false; 169 has_restricted_allowed_types = false;
170 allowed_types.clear(); 170 allowed_types.clear();
171 } 171 }
172 172
173 } // namespace internal 173 } // namespace internal
174 174
175 } // namespace extensions 175 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management_internal.h ('k') | chrome/browser/extensions/extension_management_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698