| OLD | NEW |
| 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 time_ms / intervals)); | 546 time_ms / intervals)); |
| 547 } | 547 } |
| 548 return false; | 548 return false; |
| 549 } | 549 } |
| 550 | 550 |
| 551 bool SyncTest::IsTestServerRunning() { | 551 bool SyncTest::IsTestServerRunning() { |
| 552 CommandLine* cl = CommandLine::ForCurrentProcess(); | 552 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 553 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL); | 553 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL); |
| 554 GURL sync_url_status(sync_url.append("/healthz")); | 554 GURL sync_url_status(sync_url.append("/healthz")); |
| 555 SyncServerStatusChecker delegate; | 555 SyncServerStatusChecker delegate; |
| 556 scoped_ptr<content::URLFetcher> fetcher(content::URLFetcher::Create( | 556 scoped_ptr<net::URLFetcher> fetcher(content::URLFetcher::Create( |
| 557 sync_url_status, content::URLFetcher::GET, &delegate)); | 557 sync_url_status, net::URLFetcher::GET, &delegate)); |
| 558 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | | 558 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | |
| 559 net::LOAD_DO_NOT_SEND_COOKIES | | 559 net::LOAD_DO_NOT_SEND_COOKIES | |
| 560 net::LOAD_DO_NOT_SAVE_COOKIES); | 560 net::LOAD_DO_NOT_SAVE_COOKIES); |
| 561 fetcher->SetRequestContext(g_browser_process->system_request_context()); | 561 fetcher->SetRequestContext(g_browser_process->system_request_context()); |
| 562 fetcher->Start(); | 562 fetcher->Start(); |
| 563 ui_test_utils::RunMessageLoop(); | 563 ui_test_utils::RunMessageLoop(); |
| 564 return delegate.running(); | 564 return delegate.running(); |
| 565 } | 565 } |
| 566 | 566 |
| 567 void SyncTest::EnableNetwork(Profile* profile) { | 567 void SyncTest::EnableNetwork(Profile* profile) { |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 | 787 |
| 788 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 788 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
| 789 const net::ProxyConfig& proxy_config) { | 789 const net::ProxyConfig& proxy_config) { |
| 790 base::WaitableEvent done(false, false); | 790 base::WaitableEvent done(false, false); |
| 791 BrowserThread::PostTask( | 791 BrowserThread::PostTask( |
| 792 BrowserThread::IO, FROM_HERE, | 792 BrowserThread::IO, FROM_HERE, |
| 793 base::Bind(&SetProxyConfigCallback, &done, | 793 base::Bind(&SetProxyConfigCallback, &done, |
| 794 make_scoped_refptr(context_getter), proxy_config)); | 794 make_scoped_refptr(context_getter), proxy_config)); |
| 795 done.Wait(); | 795 done.Wait(); |
| 796 } | 796 } |
| OLD | NEW |