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

Unified Diff: chrome/browser/sync/tools/sync_listen_notifications.cc

Issue 9602026: [Sync] Remove dependencies on BrowserThread from sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
« no previous file with comments | « chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/tools/sync_listen_notifications.cc
diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc
index 76f8bce9a392d7d7071055b63ceeada311a6d78a..6a376920246f3d7abd62460b6ebff0c4d3f75e27 100644
--- a/chrome/browser/sync/tools/sync_listen_notifications.cc
+++ b/chrome/browser/sync/tools/sync_listen_notifications.cc
@@ -21,12 +21,8 @@
#include "chrome/browser/sync/notifier/sync_notifier_observer.h"
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/syncable/model_type_payload_map.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/test/test_browser_thread.h"
#include "net/url_request/url_request_test_util.h"
-using content::BrowserThread;
-
// This is a simple utility that initializes a sync notifier and
// listens to any received notifications.
@@ -100,11 +96,10 @@ int main(int argc, char* argv[]) {
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
MessageLoop ui_loop;
- content::TestBrowserThread ui_thread(BrowserThread::UI, &ui_loop);
- content::TestBrowserThread io_thread(BrowserThread::IO);
+ base::Thread io_thread("IO thread");
base::Thread::Options options;
options.message_loop_type = MessageLoop::TYPE_IO;
- io_thread.StartIOThread();
+ io_thread.StartWithOptions(options);
// Parse command line.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -124,12 +119,10 @@ int main(int argc, char* argv[]) {
}
const char kClientInfo[] = "sync_listen_notifications";
- scoped_refptr<TestURLRequestContextGetter> request_context_getter(
- new TestURLRequestContextGetter(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
NullInvalidationVersionTracker null_invalidation_version_tracker;
sync_notifier::SyncNotifierFactory sync_notifier_factory(
- kClientInfo, request_context_getter,
+ kClientInfo,
+ new TestURLRequestContextGetter(io_thread.message_loop_proxy()),
null_invalidation_version_tracker.AsWeakPtr(), command_line);
scoped_ptr<sync_notifier::SyncNotifier> sync_notifier(
sync_notifier_factory.CreateSyncNotifier());
« no previous file with comments | « chrome/browser/sync/notifier/sync_notifier_factory_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698