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 "webkit/tools/test_shell/test_shell_request_context.h" | 5 #include "webkit/tools/test_shell/test_shell_request_context.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 virtual std::string GetUserAgent(const GURL& url) const OVERRIDE { | 48 virtual std::string GetUserAgent(const GURL& url) const OVERRIDE { |
49 return webkit_glue::GetUserAgent(url); | 49 return webkit_glue::GetUserAgent(url); |
50 } | 50 } |
51 | 51 |
52 private: | 52 private: |
53 DISALLOW_COPY_AND_ASSIGN(TestShellHttpUserAgentSettings); | 53 DISALLOW_COPY_AND_ASSIGN(TestShellHttpUserAgentSettings); |
54 }; | 54 }; |
55 | 55 |
56 TestShellRequestContext::TestShellRequestContext() | 56 TestShellRequestContext::TestShellRequestContext() |
57 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { | 57 : storage_(this) { |
58 Init(base::FilePath(), net::HttpCache::NORMAL, false); | 58 Init(base::FilePath(), net::HttpCache::NORMAL, false); |
59 } | 59 } |
60 | 60 |
61 TestShellRequestContext::TestShellRequestContext( | 61 TestShellRequestContext::TestShellRequestContext( |
62 const base::FilePath& cache_path, | 62 const base::FilePath& cache_path, |
63 net::HttpCache::Mode cache_mode, | 63 net::HttpCache::Mode cache_mode, |
64 bool no_proxy) | 64 bool no_proxy) |
65 : ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) { | 65 : storage_(this) { |
66 Init(cache_path, cache_mode, no_proxy); | 66 Init(cache_path, cache_mode, no_proxy); |
67 } | 67 } |
68 | 68 |
69 void TestShellRequestContext::Init( | 69 void TestShellRequestContext::Init( |
70 const base::FilePath& cache_path, | 70 const base::FilePath& cache_path, |
71 net::HttpCache::Mode cache_mode, | 71 net::HttpCache::Mode cache_mode, |
72 bool no_proxy) { | 72 bool no_proxy) { |
73 storage_.set_cookie_store(new net::CookieMonster(NULL, NULL)); | 73 storage_.set_cookie_store(new net::CookieMonster(NULL, NULL)); |
74 storage_.set_server_bound_cert_service(new net::ServerBoundCertService( | 74 storage_.set_server_bound_cert_service(new net::ServerBoundCertService( |
75 new net::DefaultServerBoundCertStore(NULL), | 75 new net::DefaultServerBoundCertStore(NULL), |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 file_system_context_, | 130 file_system_context_, |
131 SimpleResourceLoaderBridge::GetIoThread())); | 131 SimpleResourceLoaderBridge::GetIoThread())); |
132 job_factory->SetProtocolHandler( | 132 job_factory->SetProtocolHandler( |
133 "filesystem", | 133 "filesystem", |
134 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get())); | 134 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get())); |
135 storage_.set_job_factory(job_factory); | 135 storage_.set_job_factory(job_factory); |
136 } | 136 } |
137 | 137 |
138 TestShellRequestContext::~TestShellRequestContext() { | 138 TestShellRequestContext::~TestShellRequestContext() { |
139 } | 139 } |
OLD | NEW |