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

Side by Side Diff: chrome/browser/visitedlink/visitedlink_event_listener.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
« no previous file with comments | « chrome/browser/upgrade_detector_impl.cc ('k') | chrome/common/important_file_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/visitedlink/visitedlink_event_listener.h" 5 #include "chrome/browser/visitedlink/visitedlink_event_listener.h"
6 6
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "content/browser/renderer_host/render_process_host.h" 10 #include "content/browser/renderer_host/render_process_host.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 VisitedLinkMaster* master = profile->GetVisitedLinkMaster(); 127 VisitedLinkMaster* master = profile->GetVisitedLinkMaster();
128 if (master && master->shared_memory() == table_memory) 128 if (master && master->shared_memory() == table_memory)
129 i->second->SendVisitedLinkTable(table_memory); 129 i->second->SendVisitedLinkTable(table_memory);
130 } 130 }
131 } 131 }
132 132
133 void VisitedLinkEventListener::Add(VisitedLinkMaster::Fingerprint fingerprint) { 133 void VisitedLinkEventListener::Add(VisitedLinkMaster::Fingerprint fingerprint) {
134 pending_visited_links_.push_back(fingerprint); 134 pending_visited_links_.push_back(fingerprint);
135 135
136 if (!coalesce_timer_.IsRunning()) { 136 if (!coalesce_timer_.IsRunning()) {
137 coalesce_timer_.Start(FROM_HERE, 137 coalesce_timer_.Start(
138 TimeDelta::FromMilliseconds(kCommitIntervalMs), this, 138 TimeDelta::FromMilliseconds(kCommitIntervalMs), this,
139 &VisitedLinkEventListener::CommitVisitedLinks); 139 &VisitedLinkEventListener::CommitVisitedLinks);
140 } 140 }
141 } 141 }
142 142
143 void VisitedLinkEventListener::Reset() { 143 void VisitedLinkEventListener::Reset() {
144 pending_visited_links_.clear(); 144 pending_visited_links_.clear();
145 coalesce_timer_.Stop(); 145 coalesce_timer_.Stop();
146 146
147 for (Updaters::iterator i = updaters_.begin(); i != updaters_.end(); ++i) { 147 for (Updaters::iterator i = updaters_.begin(); i != updaters_.end(); ++i) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 int child_id = widget->process()->id(); 192 int child_id = widget->process()->id();
193 if (updaters_.count(child_id)) 193 if (updaters_.count(child_id))
194 updaters_[child_id]->Update(); 194 updaters_[child_id]->Update();
195 break; 195 break;
196 } 196 }
197 default: 197 default:
198 NOTREACHED(); 198 NOTREACHED();
199 break; 199 break;
200 } 200 }
201 } 201 }
OLDNEW
« no previous file with comments | « chrome/browser/upgrade_detector_impl.cc ('k') | chrome/common/important_file_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698