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

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

Issue 2294653002: Some linked_ptr -> unique_ptr conversion in extensions/browser. (Closed)
Patch Set: nullptr Created 4 years, 3 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 "chrome/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void ExtensionService::SetFileTaskRunnerForTesting( 167 void ExtensionService::SetFileTaskRunnerForTesting(
168 const scoped_refptr<base::SequencedTaskRunner>& task_runner) { 168 const scoped_refptr<base::SequencedTaskRunner>& task_runner) {
169 file_task_runner_ = task_runner; 169 file_task_runner_ = task_runner;
170 } 170 }
171 171
172 void ExtensionService::ClearProvidersForTesting() { 172 void ExtensionService::ClearProvidersForTesting() {
173 external_extension_providers_.clear(); 173 external_extension_providers_.clear();
174 } 174 }
175 175
176 void ExtensionService::AddProviderForTesting( 176 void ExtensionService::AddProviderForTesting(
177 ExternalProviderInterface* test_provider) { 177 ExternalProviderInterface* test_provider) {
Devlin 2016/08/30 19:21:53 Can we add a TODO to make this take a unique_ptr (
lazyboy 2016/08/30 20:30:56 Done. Changed those places. I also tried changing
Devlin 2016/08/30 22:48:28 Ack; no need to change it in this CL.
178 CHECK(test_provider); 178 CHECK(test_provider);
179 external_extension_providers_.push_back( 179 external_extension_providers_.push_back(base::WrapUnique(test_provider));
180 linked_ptr<ExternalProviderInterface>(test_provider));
181 } 180 }
182 181
183 void ExtensionService::BlacklistExtensionForTest( 182 void ExtensionService::BlacklistExtensionForTest(
184 const std::string& extension_id) { 183 const std::string& extension_id) {
185 ExtensionIdSet blacklisted; 184 ExtensionIdSet blacklisted;
186 ExtensionIdSet unchanged; 185 ExtensionIdSet unchanged;
187 blacklisted.insert(extension_id); 186 blacklisted.insert(extension_id);
188 UpdateBlacklistedExtensions(blacklisted, unchanged); 187 UpdateBlacklistedExtensions(blacklisted, unchanged);
189 } 188 }
190 189
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 } 2443 }
2445 2444
2446 void ExtensionService::OnProfileDestructionStarted() { 2445 void ExtensionService::OnProfileDestructionStarted() {
2447 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2446 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2448 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2447 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2449 it != ids_to_unload.end(); 2448 it != ids_to_unload.end();
2450 ++it) { 2449 ++it) {
2451 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2450 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2452 } 2451 }
2453 } 2452 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698