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

Side by Side Diff: sync/tools/sync_listen_notifications.cc

Issue 375403002: Replace MessageLoopProxy with ThreadTaskRunnerHandle in src/sync/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 <cstddef> 5 #include <cstddef>
6 #include <cstdio> 6 #include <cstdio>
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 new net::TransportSecurityState()); 85 new net::TransportSecurityState());
86 Init(); 86 Init();
87 } 87 }
88 88
89 virtual ~MyTestURLRequestContext() {} 89 virtual ~MyTestURLRequestContext() {}
90 }; 90 };
91 91
92 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter { 92 class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
93 public: 93 public:
94 explicit MyTestURLRequestContextGetter( 94 explicit MyTestURLRequestContextGetter(
95 const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy) 95 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
96 : TestURLRequestContextGetter(io_message_loop_proxy) {} 96 : TestURLRequestContextGetter(io_task_runner) {}
97 97
98 virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE { 98 virtual net::TestURLRequestContext* GetURLRequestContext() OVERRIDE {
99 // Construct |context_| lazily so it gets constructed on the right 99 // Construct |context_| lazily so it gets constructed on the right
100 // thread (the IO thread). 100 // thread (the IO thread).
101 if (!context_) 101 if (!context_)
102 context_.reset(new MyTestURLRequestContext()); 102 context_.reset(new MyTestURLRequestContext());
103 return context_.get(); 103 return context_.get();
104 } 104 }
105 105
106 private: 106 private:
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 io_thread.Stop(); 211 io_thread.Stop();
212 return 0; 212 return 0;
213 } 213 }
214 214
215 } // namespace 215 } // namespace
216 } // namespace syncer 216 } // namespace syncer
217 217
218 int main(int argc, char* argv[]) { 218 int main(int argc, char* argv[]) {
219 return syncer::SyncListenNotificationsMain(argc, argv); 219 return syncer::SyncListenNotificationsMain(argc, argv);
220 } 220 }
OLDNEW
« sync/syncable/syncable_unittest.cc ('K') | « sync/tools/sync_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698