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

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

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 years, 7 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 " \"expires_in\": 3600," 77 " \"expires_in\": 3600,"
78 " \"token_type\": \"Bearer\"" 78 " \"token_type\": \"Bearer\""
79 "}"; 79 "}";
80 } 80 }
81 81
82 // Helper class that checks whether a sync test server is running or not. 82 // Helper class that checks whether a sync test server is running or not.
83 class SyncServerStatusChecker : public content::URLFetcherDelegate { 83 class SyncServerStatusChecker : public content::URLFetcherDelegate {
84 public: 84 public:
85 SyncServerStatusChecker() : running_(false) {} 85 SyncServerStatusChecker() : running_(false) {}
86 86
87 virtual void OnURLFetchComplete(const content::URLFetcher* source) { 87 virtual void OnURLFetchComplete(const net::URLFetcher* source) {
88 std::string data; 88 std::string data;
89 source->GetResponseAsString(&data); 89 source->GetResponseAsString(&data);
90 running_ = 90 running_ =
91 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS && 91 (source->GetStatus().status() == net::URLRequestStatus::SUCCESS &&
92 source->GetResponseCode() == 200 && data.find("ok") == 0); 92 source->GetResponseCode() == 200 && data.find("ok") == 0);
93 MessageLoop::current()->Quit(); 93 MessageLoop::current()->Quit();
94 } 94 }
95 95
96 bool running() const { return running_; } 96 bool running() const { return running_; }
97 97
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 786
787 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 787 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
788 const net::ProxyConfig& proxy_config) { 788 const net::ProxyConfig& proxy_config) {
789 base::WaitableEvent done(false, false); 789 base::WaitableEvent done(false, false);
790 BrowserThread::PostTask( 790 BrowserThread::PostTask(
791 BrowserThread::IO, FROM_HERE, 791 BrowserThread::IO, FROM_HERE,
792 base::Bind(&SetProxyConfigCallback, &done, 792 base::Bind(&SetProxyConfigCallback, &done,
793 make_scoped_refptr(context_getter), proxy_config)); 793 make_scoped_refptr(context_getter), proxy_config));
794 done.Wait(); 794 done.Wait();
795 } 795 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698