| 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 <cstddef> | 5 #include <cstddef> |
| 6 #include <cstdio> | 6 #include <cstdio> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 CHECK(base::Base64Encode(data, &base64_data)); | 98 CHECK(base::Base64Encode(data, &base64_data)); |
| 99 VLOG(1) << "Setting bootstrap data to: " << base64_data; | 99 VLOG(1) << "Setting bootstrap data to: " << base64_data; |
| 100 } | 100 } |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 // Needed to use a real host resolver. | 103 // Needed to use a real host resolver. |
| 104 class MyTestURLRequestContext : public TestURLRequestContext { | 104 class MyTestURLRequestContext : public TestURLRequestContext { |
| 105 public: | 105 public: |
| 106 MyTestURLRequestContext() : TestURLRequestContext(true) { | 106 MyTestURLRequestContext() : TestURLRequestContext(true) { |
| 107 context_storage_.set_host_resolver( | 107 context_storage_.set_host_resolver( |
| 108 net::CreateSystemHostResolver( | 108 net::HostResolver::CreateDefaultResolver(NULL)); |
| 109 net::HostResolver::kDefaultParallelism, | |
| 110 net::HostResolver::kDefaultRetryAttempts, | |
| 111 NULL)); | |
| 112 context_storage_.set_transport_security_state( | 109 context_storage_.set_transport_security_state( |
| 113 new net::TransportSecurityState()); | 110 new net::TransportSecurityState()); |
| 114 Init(); | 111 Init(); |
| 115 } | 112 } |
| 116 | 113 |
| 117 virtual ~MyTestURLRequestContext() {} | 114 virtual ~MyTestURLRequestContext() {} |
| 118 }; | 115 }; |
| 119 | 116 |
| 120 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { | 117 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { |
| 121 public: | 118 public: |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 io_thread.Stop(); | 390 io_thread.Stop(); |
| 394 return 0; | 391 return 0; |
| 395 } | 392 } |
| 396 | 393 |
| 397 } // namespace | 394 } // namespace |
| 398 } // namespace syncer | 395 } // namespace syncer |
| 399 | 396 |
| 400 int main(int argc, char* argv[]) { | 397 int main(int argc, char* argv[]) { |
| 401 return syncer::SyncClientMain(argc, argv); | 398 return syncer::SyncClientMain(argc, argv); |
| 402 } | 399 } |
| OLD | NEW |