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

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again 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
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 "chrome/browser/sync/test/integration/sync_test.h" 5 #include "chrome/browser/sync/test/integration/sync_test.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 class SyncServerStatusChecker : public net::URLFetcherDelegate { 72 class SyncServerStatusChecker : public net::URLFetcherDelegate {
73 public: 73 public:
74 SyncServerStatusChecker() : running_(false) {} 74 SyncServerStatusChecker() : running_(false) {}
75 75
76 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE { 76 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE {
77 std::string data; 77 std::string data;
78 source->GetResponseAsString(&data); 78 source->GetResponseAsString(&data);
79 running_ = 79 running_ =
80 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS && 80 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS &&
81 source->GetResponseCode() == 200 && data.find("ok") == 0); 81 source->GetResponseCode() == 200 && data.find("ok") == 0);
82 MessageLoop::current()->Quit(); 82 base::MessageLoop::current()->Quit();
83 } 83 }
84 84
85 bool running() const { return running_; } 85 bool running() const { return running_; }
86 86
87 private: 87 private:
88 bool running_; 88 bool running_;
89 }; 89 };
90 90
91 void SetProxyConfigCallback( 91 void SetProxyConfigCallback(
92 base::WaitableEvent* done, 92 base::WaitableEvent* done,
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 823
824 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 824 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
825 const net::ProxyConfig& proxy_config) { 825 const net::ProxyConfig& proxy_config) {
826 base::WaitableEvent done(false, false); 826 base::WaitableEvent done(false, false);
827 BrowserThread::PostTask( 827 BrowserThread::PostTask(
828 BrowserThread::IO, FROM_HERE, 828 BrowserThread::IO, FROM_HERE,
829 base::Bind(&SetProxyConfigCallback, &done, 829 base::Bind(&SetProxyConfigCallback, &done,
830 make_scoped_refptr(context_getter), proxy_config)); 830 make_scoped_refptr(context_getter), proxy_config));
831 done.Wait(); 831 done.Wait();
832 } 832 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/passwords_helper.cc ('k') | chrome/browser/sync/test_profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698