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

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

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 12 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>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/values.h" 10 #include "base/values.h"
9 #include "base/version.h" 11 #include "base/version.h"
10 #include "chrome/browser/extensions/extension_management_constants.h" 12 #include "chrome/browser/extensions/extension_management_constants.h"
11 #include "extensions/common/url_pattern_set.h" 13 #include "extensions/common/url_pattern_set.h"
12 #include "url/gurl.h" 14 #include "url/gurl.h"
13 15
14 namespace extensions { 16 namespace extensions {
15 17
16 namespace internal { 18 namespace internal {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 dict->GetStringWithoutPathExpansion( 137 dict->GetStringWithoutPathExpansion(
136 schema_constants::kMinimumVersionRequired, 138 schema_constants::kMinimumVersionRequired,
137 &minimum_version_required_str)) { 139 &minimum_version_required_str)) {
138 scoped_ptr<base::Version> version( 140 scoped_ptr<base::Version> version(
139 new Version(minimum_version_required_str)); 141 new Version(minimum_version_required_str));
140 // 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
141 // version string of extensions is limited to 4. 143 // version string of extensions is limited to 4.
142 if (!version->IsValid()) 144 if (!version->IsValid())
143 LOG(WARNING) << kMalformedPreferenceWarning; 145 LOG(WARNING) << kMalformedPreferenceWarning;
144 else 146 else
145 minimum_version_required = version.Pass(); 147 minimum_version_required = std::move(version);
146 } 148 }
147 149
148 return true; 150 return true;
149 } 151 }
150 152
151 void IndividualSettings::Reset() { 153 void IndividualSettings::Reset() {
152 installation_mode = ExtensionManagement::INSTALLATION_ALLOWED; 154 installation_mode = ExtensionManagement::INSTALLATION_ALLOWED;
153 update_url.clear(); 155 update_url.clear();
154 blocked_permissions.clear(); 156 blocked_permissions.clear();
155 } 157 }
156 158
157 GlobalSettings::GlobalSettings() { 159 GlobalSettings::GlobalSettings() {
158 Reset(); 160 Reset();
159 } 161 }
160 162
161 GlobalSettings::~GlobalSettings() { 163 GlobalSettings::~GlobalSettings() {
162 } 164 }
163 165
164 void GlobalSettings::Reset() { 166 void GlobalSettings::Reset() {
165 has_restricted_install_sources = false; 167 has_restricted_install_sources = false;
166 install_sources.ClearPatterns(); 168 install_sources.ClearPatterns();
167 has_restricted_allowed_types = false; 169 has_restricted_allowed_types = false;
168 allowed_types.clear(); 170 allowed_types.clear();
169 } 171 }
170 172
171 } // namespace internal 173 } // namespace internal
172 174
173 } // namespace extensions 175 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management.cc ('k') | chrome/browser/extensions/extension_management_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698