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

Side by Side Diff: chrome/browser/extensions/updater/extension_updater.cc

Issue 2152373003: [Extensions] Code Cleanup - Remove redundant smart-ptr get()s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/updater/extension_updater.h" 5 #include "chrome/browser/extensions/updater/extension_updater.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 will_check_soon_ = false; 313 will_check_soon_ = false;
314 } 314 }
315 315
316 void ExtensionUpdater::AddToDownloader( 316 void ExtensionUpdater::AddToDownloader(
317 const ExtensionSet* extensions, 317 const ExtensionSet* extensions,
318 const std::list<std::string>& pending_ids, 318 const std::list<std::string>& pending_ids,
319 int request_id) { 319 int request_id) {
320 InProgressCheck& request = requests_in_progress_[request_id]; 320 InProgressCheck& request = requests_in_progress_[request_id];
321 for (ExtensionSet::const_iterator extension_iter = extensions->begin(); 321 for (ExtensionSet::const_iterator extension_iter = extensions->begin();
322 extension_iter != extensions->end(); ++extension_iter) { 322 extension_iter != extensions->end(); ++extension_iter) {
323 const Extension& extension = *extension_iter->get(); 323 const Extension& extension = **extension_iter;
324 if (!Manifest::IsAutoUpdateableLocation(extension.location())) { 324 if (!Manifest::IsAutoUpdateableLocation(extension.location())) {
325 VLOG(2) << "Extension " << extension.id() << " is not auto updateable"; 325 VLOG(2) << "Extension " << extension.id() << " is not auto updateable";
326 continue; 326 continue;
327 } 327 }
328 // An extension might be overwritten by policy, and have its update url 328 // An extension might be overwritten by policy, and have its update url
329 // changed. Make sure existing extensions aren't fetched again, if a 329 // changed. Make sure existing extensions aren't fetched again, if a
330 // pending fetch for an extension with the same id already exists. 330 // pending fetch for an extension with the same id already exists.
331 std::list<std::string>::const_iterator pending_id_iter = std::find( 331 std::list<std::string>::const_iterator pending_id_iter = std::find(
332 pending_ids.begin(), pending_ids.end(), extension.id()); 332 pending_ids.begin(), pending_ids.end(), extension.id());
333 if (pending_id_iter == pending_ids.end()) { 333 if (pending_id_iter == pending_ids.end()) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 const InProgressCheck& request = requests_in_progress_[request_id]; 609 const InProgressCheck& request = requests_in_progress_[request_id];
610 if (request.in_progress_ids_.empty()) { 610 if (request.in_progress_ids_.empty()) {
611 VLOG(2) << "Finished update check " << request_id; 611 VLOG(2) << "Finished update check " << request_id;
612 if (!request.callback.is_null()) 612 if (!request.callback.is_null())
613 request.callback.Run(); 613 request.callback.Run();
614 requests_in_progress_.erase(request_id); 614 requests_in_progress_.erase(request_id);
615 } 615 }
616 } 616 }
617 617
618 } // namespace extensions 618 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698