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

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

Issue 466012: Don't ping for extension blacklist when no extensions are installed.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_updater.h" 5 #include "chrome/browser/extensions/extension_updater.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 // Save the last check time, and schedule the next check. 514 // Save the last check time, and schedule the next check.
515 int64 now = Time::Now().ToInternalValue(); 515 int64 now = Time::Now().ToInternalValue();
516 prefs_->SetInt64(kLastExtensionsUpdateCheck, now); 516 prefs_->SetInt64(kLastExtensionsUpdateCheck, now);
517 ScheduleNextCheck(TimeDelta::FromSeconds(frequency_seconds_)); 517 ScheduleNextCheck(TimeDelta::FromSeconds(frequency_seconds_));
518 } 518 }
519 519
520 void ExtensionUpdater::CheckNow() { 520 void ExtensionUpdater::CheckNow() {
521 // Generate a set of update urls for loaded extensions. 521 // Generate a set of update urls for loaded extensions.
522 std::set<GURL> urls; 522 std::set<GURL> urls;
523 523
524 if (blacklist_checks_enabled_) { 524 if (blacklist_checks_enabled_ && service_->HasInstalledExtensions()) {
525 urls.insert(GetBlacklistUpdateUrl( 525 urls.insert(GetBlacklistUpdateUrl(
526 prefs_->GetString(kExtensionBlacklistUpdateVersion))); 526 prefs_->GetString(kExtensionBlacklistUpdateVersion)));
527 } 527 }
528 528
529 int no_url_count = 0; 529 int no_url_count = 0;
530 int google_url_count = 0; 530 int google_url_count = 0;
531 int other_url_count = 0; 531 int other_url_count = 0;
532 int theme_count = 0; 532 int theme_count = 0;
533 533
534 const ExtensionList* extensions = service_->extensions(); 534 const ExtensionList* extensions = service_->extensions();
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 extension_fetcher_.reset( 712 extension_fetcher_.reset(
713 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); 713 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this));
714 extension_fetcher_->set_request_context( 714 extension_fetcher_->set_request_context(
715 Profile::GetDefaultRequestContext()); 715 Profile::GetDefaultRequestContext());
716 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | 716 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
717 net::LOAD_DO_NOT_SAVE_COOKIES); 717 net::LOAD_DO_NOT_SAVE_COOKIES);
718 extension_fetcher_->Start(); 718 extension_fetcher_->Start();
719 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); 719 current_extension_fetch_ = ExtensionFetch(id, url, hash, version);
720 } 720 }
721 } 721 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertests_misc.cc ('k') | chrome/browser/extensions/extension_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698