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

Side by Side Diff: chrome/browser/spellchecker/feedback_sender.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/spellchecker/feedback_sender.h" 5 #include "chrome/browser/spellchecker/feedback_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 std::sort(known_renderers.begin(), known_renderers.end()); 250 std::sort(known_renderers.begin(), known_renderers.end());
251 std::vector<int> dead_renderers; 251 std::vector<int> dead_renderers;
252 std::set_difference(known_renderers.begin(), 252 std::set_difference(known_renderers.begin(),
253 known_renderers.end(), 253 known_renderers.end(),
254 alive_renderers.begin(), 254 alive_renderers.begin(),
255 alive_renderers.end(), 255 alive_renderers.end(),
256 std::back_inserter(dead_renderers)); 256 std::back_inserter(dead_renderers));
257 for (std::vector<int>::const_iterator it = dead_renderers.begin(); 257 for (std::vector<int>::const_iterator it = dead_renderers.begin();
258 it != dead_renderers.end(); 258 it != dead_renderers.end();
259 ++it) { 259 ++it) {
260 MessageLoop::current()->PostTask( 260 base::MessageLoop::current()->PostTask(
261 FROM_HERE, 261 FROM_HERE,
262 base::Bind(&FeedbackSender::OnReceiveDocumentMarkers, 262 base::Bind(&FeedbackSender::OnReceiveDocumentMarkers,
263 AsWeakPtr(), 263 AsWeakPtr(),
264 *it, 264 *it,
265 std::vector<uint32>())); 265 std::vector<uint32>()));
266 } 266 }
267 } 267 }
268 268
269 void FeedbackSender::FlushFeedback() { 269 void FeedbackSender::FlushFeedback() {
270 if (feedback_.Empty()) 270 if (feedback_.Empty())
(...skipping 26 matching lines...) Expand all
297 senders_.push_back(sender); 297 senders_.push_back(sender);
298 298
299 // Request context is NULL in testing. 299 // Request context is NULL in testing.
300 if (request_context_.get()) { 300 if (request_context_.get()) {
301 sender->SetRequestContext(request_context_.get()); 301 sender->SetRequestContext(request_context_.get());
302 sender->Start(); 302 sender->Start();
303 } 303 }
304 } 304 }
305 305
306 } // namespace spellcheck 306 } // namespace spellcheck
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698