| 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 "net/url_request/url_request_context_builder.h" | 5 #include "net/url_request/url_request_context_builder.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 const base::FilePath& path) const override { | 115 const base::FilePath& path) const override { |
| 116 return true; | 116 return true; |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool OnCanThrottleRequest(const URLRequest& request) const override { | 119 bool OnCanThrottleRequest(const URLRequest& request) const override { |
| 120 // Returning true will only enable throttling if there's also a | 120 // Returning true will only enable throttling if there's also a |
| 121 // URLRequestThrottlerManager, which there isn't, by default. | 121 // URLRequestThrottlerManager, which there isn't, by default. |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 | 124 |
| 125 int OnBeforeSocketStreamConnect(SocketStream* stream, | |
| 126 const CompletionCallback& callback) override { | |
| 127 return OK; | |
| 128 } | |
| 129 | |
| 130 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 125 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
| 131 }; | 126 }; |
| 132 | 127 |
| 133 class BasicURLRequestContext : public URLRequestContext { | 128 class BasicURLRequestContext : public URLRequestContext { |
| 134 public: | 129 public: |
| 135 BasicURLRequestContext() | 130 BasicURLRequestContext() |
| 136 : storage_(this) {} | 131 : storage_(this) {} |
| 137 | 132 |
| 138 URLRequestContextStorage* storage() { | 133 URLRequestContextStorage* storage() { |
| 139 return &storage_; | 134 return &storage_; |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 #endif // !defined(DISABLE_FTP_SUPPORT) | 401 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 407 | 402 |
| 408 storage->set_job_factory(job_factory); | 403 storage->set_job_factory(job_factory); |
| 409 | 404 |
| 410 // TODO(willchan): Support sdch. | 405 // TODO(willchan): Support sdch. |
| 411 | 406 |
| 412 return context; | 407 return context; |
| 413 } | 408 } |
| 414 | 409 |
| 415 } // namespace net | 410 } // namespace net |
| OLD | NEW |