| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 net::URLRequestContextGetter* url_request_context_getter, | 88 net::URLRequestContextGetter* url_request_context_getter, |
| 89 const net::ProxyConfig& proxy_config) { | 89 const net::ProxyConfig& proxy_config) { |
| 90 net::ProxyService* proxy_service = | 90 net::ProxyService* proxy_service = |
| 91 url_request_context_getter->GetURLRequestContext()->proxy_service(); | 91 url_request_context_getter->GetURLRequestContext()->proxy_service(); |
| 92 proxy_service->ResetConfigService( | 92 proxy_service->ResetConfigService( |
| 93 new net::ProxyConfigServiceFixed(proxy_config)); | 93 new net::ProxyConfigServiceFixed(proxy_config)); |
| 94 done->Signal(); | 94 done->Signal(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 SyncTest::SyncTest(TestType test_type) | 97 SyncTest::SyncTest(TestType test_type) |
| 98 : sync_server_(net::TestServer::TYPE_SYNC, | 98 : test_type_(test_type), |
| 99 net::TestServer::kLocalhost, | |
| 100 FilePath()), | |
| 101 test_type_(test_type), | |
| 102 server_type_(SERVER_TYPE_UNDECIDED), | 99 server_type_(SERVER_TYPE_UNDECIDED), |
| 103 num_clients_(-1), | 100 num_clients_(-1), |
| 104 use_verifier_(true), | 101 use_verifier_(true), |
| 105 notifications_enabled_(true), | 102 notifications_enabled_(true), |
| 106 test_server_handle_(base::kNullProcessHandle), | 103 test_server_handle_(base::kNullProcessHandle), |
| 107 number_of_default_sync_items_(0) { | 104 number_of_default_sync_items_(0) { |
| 108 sync_datatype_helper::AssociateWithTest(this); | 105 sync_datatype_helper::AssociateWithTest(this); |
| 109 switch (test_type_) { | 106 switch (test_type_) { |
| 110 case SINGLE_CLIENT: { | 107 case SINGLE_CLIENT: { |
| 111 num_clients_ = 1; | 108 num_clients_ = 1; |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 | 784 |
| 788 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 785 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
| 789 const net::ProxyConfig& proxy_config) { | 786 const net::ProxyConfig& proxy_config) { |
| 790 base::WaitableEvent done(false, false); | 787 base::WaitableEvent done(false, false); |
| 791 BrowserThread::PostTask( | 788 BrowserThread::PostTask( |
| 792 BrowserThread::IO, FROM_HERE, | 789 BrowserThread::IO, FROM_HERE, |
| 793 base::Bind(&SetProxyConfigCallback, &done, | 790 base::Bind(&SetProxyConfigCallback, &done, |
| 794 make_scoped_refptr(context_getter), proxy_config)); | 791 make_scoped_refptr(context_getter), proxy_config)); |
| 795 done.Wait(); | 792 done.Wait(); |
| 796 } | 793 } |
| OLD | NEW |