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

Side by Side Diff: chrome/test/live_sync/live_sync_test.cc

Issue 7438002: Deprecate Profile::GetDefaultRequestContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix other references. Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/live_sync/live_sync_test.h" 5 #include "chrome/test/live_sync/live_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/command_line.h" 10 #include "base/command_line.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 return false; 454 return false;
455 } 455 }
456 456
457 bool LiveSyncTest::IsTestServerRunning() { 457 bool LiveSyncTest::IsTestServerRunning() {
458 CommandLine* cl = CommandLine::ForCurrentProcess(); 458 CommandLine* cl = CommandLine::ForCurrentProcess();
459 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL); 459 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL);
460 GURL sync_url_status(sync_url.append("/healthz")); 460 GURL sync_url_status(sync_url.append("/healthz"));
461 SyncServerStatusChecker delegate; 461 SyncServerStatusChecker delegate;
462 URLFetcher fetcher(sync_url_status, URLFetcher::GET, &delegate); 462 URLFetcher fetcher(sync_url_status, URLFetcher::GET, &delegate);
463 fetcher.set_request_context(Profile::GetDefaultRequestContext()); 463 fetcher.set_request_context(Profile::Deprecated::GetDefaultRequestContext());
464 fetcher.Start(); 464 fetcher.Start();
465 ui_test_utils::RunMessageLoop(); 465 ui_test_utils::RunMessageLoop();
466 return delegate.running(); 466 return delegate.running();
467 } 467 }
468 468
469 void LiveSyncTest::EnableNetwork(Profile* profile) { 469 void LiveSyncTest::EnableNetwork(Profile* profile) {
470 SetProxyConfig(profile->GetRequestContext(), 470 SetProxyConfig(profile->GetRequestContext(),
471 net::ProxyConfig::CreateDirect()); 471 net::ProxyConfig::CreateDirect());
472 // TODO(rsimha): Remove this line once http://crbug.com/53857 is fixed. 472 // TODO(rsimha): Remove this line once http://crbug.com/53857 is fixed.
473 net::NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 473 net::NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 const net::ProxyConfig& proxy_config) { 514 const net::ProxyConfig& proxy_config) {
515 base::WaitableEvent done(false, false); 515 base::WaitableEvent done(false, false);
516 BrowserThread::PostTask( 516 BrowserThread::PostTask(
517 BrowserThread::IO, 517 BrowserThread::IO,
518 FROM_HERE, 518 FROM_HERE,
519 new SetProxyConfigTask(&done, 519 new SetProxyConfigTask(&done,
520 context_getter, 520 context_getter,
521 proxy_config)); 521 proxy_config));
522 done.Wait(); 522 done.Wait();
523 } 523 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698