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

Unified Diff: chrome/browser/devtools/refcounted_adb_thread.h

Issue 26568004: Introduced AndroidDeviceProvider to simplify testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made AndroidDevice::HttpQuery virtual for test purposes. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/devtools/refcounted_adb_thread.h
diff --git a/chrome/browser/devtools/refcounted_adb_thread.h b/chrome/browser/devtools/refcounted_adb_thread.h
new file mode 100644
index 0000000000000000000000000000000000000000..d2ae278e33862f51412c6b674b441a1ef2ad2e56
--- /dev/null
+++ b/chrome/browser/devtools/refcounted_adb_thread.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_DEVTOOLS_REFCOUNTED_ADB_THREAD_H_
+#define CHROME_BROWSER_DEVTOOLS_REFCOUNTED_ADB_THREAD_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/message_loop/message_loop.h"
+#include "base/threading/thread.h"
+
+class RefCountedAdbThread : public base::RefCounted<RefCountedAdbThread> {
+ public:
+ static scoped_refptr<RefCountedAdbThread> GetInstance();
+ base::MessageLoop* message_loop();
+
+ private:
+ friend class base::RefCounted<RefCountedAdbThread>;
+ static RefCountedAdbThread* instance_;
+ static void StopThread(base::Thread* thread);
+
+ RefCountedAdbThread();
+ virtual ~RefCountedAdbThread();
+ base::Thread* thread_;
+};
+
+#endif // CHROME_BROWSER_DEVTOOLS_REFCOUNTED_ADB_THREAD_H_

Powered by Google App Engine
This is Rietveld 408576698