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

Side by Side Diff: base/message_loop.cc

Issue 10546083: Convert ProtocolHandlerRegistry to be a ProfileKeyedService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge in MessageLoop conflict from upstream. Created 8 years, 5 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 void MessageLoop::QuitNow() { 315 void MessageLoop::QuitNow() {
316 DCHECK_EQ(this, current()); 316 DCHECK_EQ(this, current());
317 if (run_loop_) { 317 if (run_loop_) {
318 pump_->Quit(); 318 pump_->Quit();
319 } else { 319 } else {
320 NOTREACHED() << "Must be inside Run to call Quit"; 320 NOTREACHED() << "Must be inside Run to call Quit";
321 } 321 }
322 } 322 }
323 323
324 bool MessageLoop::IsType(Type type) const {
325 return type_ == type;
326 }
327
324 static void QuitCurrentWhenIdle() { 328 static void QuitCurrentWhenIdle() {
325 MessageLoop::current()->QuitWhenIdle(); 329 MessageLoop::current()->QuitWhenIdle();
326 } 330 }
327 331
328 // static 332 // static
329 base::Closure MessageLoop::QuitWhenIdleClosure() { 333 base::Closure MessageLoop::QuitWhenIdleClosure() {
330 return base::Bind(&QuitCurrentWhenIdle); 334 return base::Bind(&QuitCurrentWhenIdle);
331 } 335 }
332 336
333 void MessageLoop::SetNestableTasksAllowed(bool allowed) { 337 void MessageLoop::SetNestableTasksAllowed(bool allowed) {
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 Watcher *delegate) { 757 Watcher *delegate) {
754 return pump_libevent()->WatchFileDescriptor( 758 return pump_libevent()->WatchFileDescriptor(
755 fd, 759 fd,
756 persistent, 760 persistent,
757 static_cast<base::MessagePumpLibevent::Mode>(mode), 761 static_cast<base::MessagePumpLibevent::Mode>(mode),
758 controller, 762 controller,
759 delegate); 763 delegate);
760 } 764 }
761 765
762 #endif 766 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698