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

Side by Side Diff: sync/tools/sync_client.cc

Issue 10831277: [net] Change factory methods for HostResolver and HostCache to return a scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary initialization; respond to review Created 8 years, 1 month 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 | « remoting/host/url_request_context.cc ('k') | sync/tools/sync_listen_notifications.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 <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
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
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 }
OLDNEW
« no previous file with comments | « remoting/host/url_request_context.cc ('k') | sync/tools/sync_listen_notifications.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698