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

Side by Side Diff: chrome/browser/devtools/devtools_adb_bridge.cc

Issue 16092013: Use base::MessageLoop in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, sigh 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
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | chrome/browser/policy/policy_browsertest.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) 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/devtools/devtools_adb_bridge.h" 5 #include "chrome/browser/devtools/devtools_adb_bridge.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 instance_ = this; 578 instance_ = this;
579 thread_ = new base::Thread(kDevToolsAdbBridgeThreadName); 579 thread_ = new base::Thread(kDevToolsAdbBridgeThreadName);
580 base::Thread::Options options; 580 base::Thread::Options options;
581 options.message_loop_type = base::MessageLoop::TYPE_IO; 581 options.message_loop_type = base::MessageLoop::TYPE_IO;
582 if (!thread_->StartWithOptions(options)) { 582 if (!thread_->StartWithOptions(options)) {
583 delete thread_; 583 delete thread_;
584 thread_ = NULL; 584 thread_ = NULL;
585 } 585 }
586 } 586 }
587 587
588 MessageLoop* DevToolsAdbBridge::RefCountedAdbThread::message_loop() { 588 base::MessageLoop* DevToolsAdbBridge::RefCountedAdbThread::message_loop() {
589 return thread_ ? thread_->message_loop() : NULL; 589 return thread_ ? thread_->message_loop() : NULL;
590 } 590 }
591 591
592 // static 592 // static
593 void DevToolsAdbBridge::RefCountedAdbThread::StopThread(base::Thread* thread) { 593 void DevToolsAdbBridge::RefCountedAdbThread::StopThread(base::Thread* thread) {
594 thread->Stop(); 594 thread->Stop();
595 } 595 }
596 596
597 DevToolsAdbBridge::RefCountedAdbThread::~RefCountedAdbThread() { 597 DevToolsAdbBridge::RefCountedAdbThread::~RefCountedAdbThread() {
598 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 598 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 if (!has_message_loop_) 647 if (!has_message_loop_)
648 return; 648 return;
649 649
650 scoped_refptr<AdbAttachCommand> command( 650 scoped_refptr<AdbAttachCommand> command(
651 new AdbAttachCommand(weak_factory_.GetWeakPtr(), serial, socket, 651 new AdbAttachCommand(weak_factory_.GetWeakPtr(), serial, socket,
652 debug_url, frontend_url)); 652 debug_url, frontend_url));
653 adb_thread_->message_loop()->PostTask( 653 adb_thread_->message_loop()->PostTask(
654 FROM_HERE, 654 FROM_HERE,
655 base::Bind(&AdbAttachCommand::Run, command)); 655 base::Bind(&AdbAttachCommand::Run, command));
656 } 656 }
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698