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

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

Issue 612423003: Move ExtensionCache to //extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test setup Created 6 years, 2 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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 will_check_soon_ = true; 388 will_check_soon_ = true;
389 } else { 389 } else {
390 NOTREACHED(); 390 NOTREACHED();
391 } 391 }
392 } 392 }
393 393
394 bool ExtensionUpdater::WillCheckSoon() const { 394 bool ExtensionUpdater::WillCheckSoon() const {
395 return will_check_soon_; 395 return will_check_soon_;
396 } 396 }
397 397
398 void ExtensionUpdater::SetExtensionCacheForTesting(
399 ExtensionCache* extension_cache) {
400 extension_cache_ = extension_cache;
401 }
402
398 void ExtensionUpdater::DoCheckSoon() { 403 void ExtensionUpdater::DoCheckSoon() {
399 DCHECK(will_check_soon_); 404 DCHECK(will_check_soon_);
400 CheckNow(default_params_); 405 CheckNow(default_params_);
401 will_check_soon_ = false; 406 will_check_soon_ = false;
402 } 407 }
403 408
404 void ExtensionUpdater::AddToDownloader( 409 void ExtensionUpdater::AddToDownloader(
405 const ExtensionSet* extensions, 410 const ExtensionSet* extensions,
406 const std::list<std::string>& pending_ids, 411 const std::list<std::string>& pending_ids,
407 int request_id) { 412 int request_id) {
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 const InProgressCheck& request = requests_in_progress_[request_id]; 762 const InProgressCheck& request = requests_in_progress_[request_id];
758 if (request.in_progress_ids_.empty()) { 763 if (request.in_progress_ids_.empty()) {
759 VLOG(2) << "Finished update check " << request_id; 764 VLOG(2) << "Finished update check " << request_id;
760 if (!request.callback.is_null()) 765 if (!request.callback.is_null())
761 request.callback.Run(); 766 request.callback.Run();
762 requests_in_progress_.erase(request_id); 767 requests_in_progress_.erase(request_id);
763 } 768 }
764 } 769 }
765 770
766 } // namespace extensions 771 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/extension_updater.h ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698