| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 CHECK(base::Base64Encode(state, &base64_state)); | 92 CHECK(base::Base64Encode(state, &base64_state)); |
| 93 VLOG(1) << "Setting invalidation state to: " << base64_state; | 93 VLOG(1) << "Setting invalidation state to: " << base64_state; |
| 94 } | 94 } |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 // Needed to use a real host resolver. | 97 // Needed to use a real host resolver. |
| 98 class MyTestURLRequestContext : public TestURLRequestContext { | 98 class MyTestURLRequestContext : public TestURLRequestContext { |
| 99 public: | 99 public: |
| 100 MyTestURLRequestContext() : TestURLRequestContext(true) { | 100 MyTestURLRequestContext() : TestURLRequestContext(true) { |
| 101 context_storage_.set_host_resolver( | 101 context_storage_.set_host_resolver( |
| 102 net::CreateSystemHostResolver( | 102 net::HostResolver::CreateDefaultResolver(NULL).release()); |
| 103 net::HostResolver::kDefaultParallelism, | |
| 104 net::HostResolver::kDefaultRetryAttempts, | |
| 105 NULL)); | |
| 106 context_storage_.set_transport_security_state( | 103 context_storage_.set_transport_security_state( |
| 107 new net::TransportSecurityState()); | 104 new net::TransportSecurityState()); |
| 108 Init(); | 105 Init(); |
| 109 } | 106 } |
| 110 | 107 |
| 111 virtual ~MyTestURLRequestContext() {} | 108 virtual ~MyTestURLRequestContext() {} |
| 112 }; | 109 }; |
| 113 | 110 |
| 114 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { | 111 class MyTestURLRequestContextGetter : public TestURLRequestContextGetter { |
| 115 public: | 112 public: |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 io_thread.Stop(); | 384 io_thread.Stop(); |
| 388 return 0; | 385 return 0; |
| 389 } | 386 } |
| 390 | 387 |
| 391 } // namespace | 388 } // namespace |
| 392 } // namespace syncer | 389 } // namespace syncer |
| 393 | 390 |
| 394 int main(int argc, char* argv[]) { | 391 int main(int argc, char* argv[]) { |
| 395 return syncer::SyncClientMain(argc, argv); | 392 return syncer::SyncClientMain(argc, argv); |
| 396 } | 393 } |
| OLD | NEW |