| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 const string16& error) OVERRIDE {} | 77 const string16& error) OVERRIDE {} |
| 78 | 78 |
| 79 virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired( | 79 virtual NetworkDelegate::AuthRequiredResponse OnAuthRequired( |
| 80 URLRequest* request, | 80 URLRequest* request, |
| 81 const AuthChallengeInfo& auth_info, | 81 const AuthChallengeInfo& auth_info, |
| 82 const AuthCallback& callback, | 82 const AuthCallback& callback, |
| 83 AuthCredentials* credentials) OVERRIDE { | 83 AuthCredentials* credentials) OVERRIDE { |
| 84 return NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; | 84 return NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; |
| 85 } | 85 } |
| 86 | 86 |
| 87 virtual bool CanGetCookies(const URLRequest* request, | 87 virtual bool OnCanGetCookies(const URLRequest& request, |
| 88 const CookieList& cookie_list) OVERRIDE { | 88 const CookieList& cookie_list) OVERRIDE { |
| 89 return true; | 89 return true; |
| 90 } | 90 } |
| 91 | 91 |
| 92 virtual bool CanSetCookie(const URLRequest* request, | 92 virtual bool OnCanSetCookie(const URLRequest& request, |
| 93 const std::string& cookie_line, | 93 const std::string& cookie_line, |
| 94 CookieOptions* options) OVERRIDE { | 94 CookieOptions* options) OVERRIDE { |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| 97 | 97 |
| 98 virtual bool OnCanAccessFile(const net::URLRequest& request, |
| 99 const FilePath& path) const OVERRIDE { |
| 100 return true; |
| 101 } |
| 102 |
| 98 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 103 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
| 99 }; | 104 }; |
| 100 | 105 |
| 101 class BasicURLRequestContext : public URLRequestContext { | 106 class BasicURLRequestContext : public URLRequestContext { |
| 102 public: | 107 public: |
| 103 BasicURLRequestContext() | 108 BasicURLRequestContext() |
| 104 : cache_thread_("Cache Thread"), | 109 : cache_thread_("Cache Thread"), |
| 105 file_thread_("File Thread"), | 110 file_thread_("File Thread"), |
| 106 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {} | 111 ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {} |
| 107 | 112 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 http_transaction_factory = new HttpNetworkLayer(network_session); | 271 http_transaction_factory = new HttpNetworkLayer(network_session); |
| 267 } | 272 } |
| 268 storage->set_http_transaction_factory(http_transaction_factory); | 273 storage->set_http_transaction_factory(http_transaction_factory); |
| 269 | 274 |
| 270 // TODO(willchan): Support sdch. | 275 // TODO(willchan): Support sdch. |
| 271 | 276 |
| 272 return context; | 277 return context; |
| 273 } | 278 } |
| 274 | 279 |
| 275 } // namespace net | 280 } // namespace net |
| OLD | NEW |