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

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

Issue 10554008: Move content::URLFetcher static functions to net::URLFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win link error Created 8 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
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 #include "chrome/browser/sync/profile_sync_service_harness.h" 29 #include "chrome/browser/sync/profile_sync_service_harness.h"
30 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" 30 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
31 #include "chrome/browser/ui/browser.h" 31 #include "chrome/browser/ui/browser.h"
32 #include "chrome/browser/ui/browser_list.h" 32 #include "chrome/browser/ui/browser_list.h"
33 #include "chrome/common/chrome_paths.h" 33 #include "chrome/common/chrome_paths.h"
34 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/net/gaia/gaia_urls.h" 35 #include "chrome/common/net/gaia/gaia_urls.h"
36 #include "chrome/test/base/testing_browser_process.h" 36 #include "chrome/test/base/testing_browser_process.h"
37 #include "chrome/test/base/ui_test_utils.h" 37 #include "chrome/test/base/ui_test_utils.h"
38 #include "content/public/browser/web_contents.h" 38 #include "content/public/browser/web_contents.h"
39 #include "content/public/common/url_fetcher.h"
40 #include "content/public/test/test_browser_thread.h" 39 #include "content/public/test/test_browser_thread.h"
41 #include "content/public/test/test_url_fetcher_factory.h" 40 #include "content/public/test/test_url_fetcher_factory.h"
42 #include "googleurl/src/gurl.h" 41 #include "googleurl/src/gurl.h"
43 #include "net/base/escape.h" 42 #include "net/base/escape.h"
44 #include "net/base/load_flags.h" 43 #include "net/base/load_flags.h"
45 #include "net/base/network_change_notifier.h" 44 #include "net/base/network_change_notifier.h"
46 #include "net/proxy/proxy_config.h" 45 #include "net/proxy/proxy_config.h"
47 #include "net/proxy/proxy_config_service_fixed.h" 46 #include "net/proxy/proxy_config_service_fixed.h"
48 #include "net/proxy/proxy_service.h" 47 #include "net/proxy/proxy_service.h"
49 #include "net/test/test_server.h" 48 #include "net/test/test_server.h"
49 #include "net/url_request/url_fetcher.h"
50 #include "net/url_request/url_fetcher_delegate.h" 50 #include "net/url_request/url_fetcher_delegate.h"
51 #include "net/url_request/url_request_context.h" 51 #include "net/url_request/url_request_context.h"
52 #include "net/url_request/url_request_context_getter.h" 52 #include "net/url_request/url_request_context_getter.h"
53 #include "net/url_request/url_request_status.h" 53 #include "net/url_request/url_request_status.h"
54 #include "sync/notifier/p2p_notifier.h" 54 #include "sync/notifier/p2p_notifier.h"
55 #include "sync/protocol/sync.pb.h" 55 #include "sync/protocol/sync.pb.h"
56 56
57 using content::BrowserThread; 57 using content::BrowserThread;
58 58
59 namespace switches { 59 namespace switches {
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 time_ms / intervals)); 554 time_ms / intervals));
555 } 555 }
556 return false; 556 return false;
557 } 557 }
558 558
559 bool SyncTest::IsTestServerRunning() { 559 bool SyncTest::IsTestServerRunning() {
560 CommandLine* cl = CommandLine::ForCurrentProcess(); 560 CommandLine* cl = CommandLine::ForCurrentProcess();
561 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL); 561 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL);
562 GURL sync_url_status(sync_url.append("/healthz")); 562 GURL sync_url_status(sync_url.append("/healthz"));
563 SyncServerStatusChecker delegate; 563 SyncServerStatusChecker delegate;
564 scoped_ptr<net::URLFetcher> fetcher(content::URLFetcher::Create( 564 scoped_ptr<net::URLFetcher> fetcher(net::URLFetcher::Create(
565 sync_url_status, net::URLFetcher::GET, &delegate)); 565 sync_url_status, net::URLFetcher::GET, &delegate));
566 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | 566 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE |
567 net::LOAD_DO_NOT_SEND_COOKIES | 567 net::LOAD_DO_NOT_SEND_COOKIES |
568 net::LOAD_DO_NOT_SAVE_COOKIES); 568 net::LOAD_DO_NOT_SAVE_COOKIES);
569 fetcher->SetRequestContext(g_browser_process->system_request_context()); 569 fetcher->SetRequestContext(g_browser_process->system_request_context());
570 fetcher->Start(); 570 fetcher->Start();
571 ui_test_utils::RunMessageLoop(); 571 ui_test_utils::RunMessageLoop();
572 return delegate.running(); 572 return delegate.running();
573 } 573 }
574 574
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/http_bridge.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698