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

Side by Side Diff: chrome/browser/history/top_sites.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/history/top_sites.h" 5 #include "chrome/browser/history/top_sites.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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 } 939 }
940 940
941 void TopSites::RestartQueryForTopSitesTimer(base::TimeDelta delta) { 941 void TopSites::RestartQueryForTopSitesTimer(base::TimeDelta delta) {
942 if (timer_.IsRunning() && ((timer_start_time_ + timer_.GetCurrentDelay()) < 942 if (timer_.IsRunning() && ((timer_start_time_ + timer_.GetCurrentDelay()) <
943 (base::TimeTicks::Now() + delta))) { 943 (base::TimeTicks::Now() + delta))) {
944 return; 944 return;
945 } 945 }
946 946
947 timer_start_time_ = base::TimeTicks::Now(); 947 timer_start_time_ = base::TimeTicks::Now();
948 timer_.Stop(); 948 timer_.Stop();
949 timer_.Start(FROM_HERE, delta, this, &TopSites::TimerFired); 949 timer_.Start(delta, this, &TopSites::TimerFired);
950 } 950 }
951 951
952 void TopSites::OnHistoryMigrationWrittenToDisk(TopSitesBackend::Handle handle) { 952 void TopSites::OnHistoryMigrationWrittenToDisk(TopSitesBackend::Handle handle) {
953 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 953 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
954 954
955 if (!profile_) 955 if (!profile_)
956 return; 956 return;
957 957
958 HistoryService* history = 958 HistoryService* history =
959 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); 959 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 SetTopSites(pages); 1006 SetTopSites(pages);
1007 1007
1008 // Used only in testing. 1008 // Used only in testing.
1009 NotificationService::current()->Notify( 1009 NotificationService::current()->Notify(
1010 chrome::NOTIFICATION_TOP_SITES_UPDATED, 1010 chrome::NOTIFICATION_TOP_SITES_UPDATED,
1011 Source<TopSites>(this), 1011 Source<TopSites>(this),
1012 Details<CancelableRequestProvider::Handle>(&handle)); 1012 Details<CancelableRequestProvider::Handle>(&handle));
1013 } 1013 }
1014 1014
1015 } // namespace history 1015 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_quota_service.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698