| 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 22 matching lines...) Expand all Loading... |
| 33 #include "webkit/fileapi/file_system_url_request_job_factory.h" | 33 #include "webkit/fileapi/file_system_url_request_job_factory.h" |
| 34 #include "webkit/tools/test_shell/simple_file_system.h" | 34 #include "webkit/tools/test_shell/simple_file_system.h" |
| 35 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | 35 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
| 36 #include "webkit/user_agent/user_agent.h" | 36 #include "webkit/user_agent/user_agent.h" |
| 37 | 37 |
| 38 class TestShellHttpUserAgentSettings : public net::HttpUserAgentSettings { | 38 class TestShellHttpUserAgentSettings : public net::HttpUserAgentSettings { |
| 39 public: | 39 public: |
| 40 TestShellHttpUserAgentSettings() {} | 40 TestShellHttpUserAgentSettings() {} |
| 41 virtual ~TestShellHttpUserAgentSettings() {} | 41 virtual ~TestShellHttpUserAgentSettings() {} |
| 42 | 42 |
| 43 // hard-code A-L and A-C for test shells | 43 // Hard-code Accept-Language for test shells. |
| 44 virtual std::string GetAcceptLanguage() const OVERRIDE { | 44 virtual std::string GetAcceptLanguage() const OVERRIDE { |
| 45 return "en-us,en"; | 45 return "en-us,en"; |
| 46 } | 46 } |
| 47 virtual std::string GetAcceptCharset() const OVERRIDE { | |
| 48 return "iso-8859-1,*,utf-8"; | |
| 49 } | |
| 50 | 47 |
| 51 virtual std::string GetUserAgent(const GURL& url) const OVERRIDE { | 48 virtual std::string GetUserAgent(const GURL& url) const OVERRIDE { |
| 52 return webkit_glue::GetUserAgent(url); | 49 return webkit_glue::GetUserAgent(url); |
| 53 } | 50 } |
| 54 | 51 |
| 55 private: | 52 private: |
| 56 DISALLOW_COPY_AND_ASSIGN(TestShellHttpUserAgentSettings); | 53 DISALLOW_COPY_AND_ASSIGN(TestShellHttpUserAgentSettings); |
| 57 }; | 54 }; |
| 58 | 55 |
| 59 TestShellRequestContext::TestShellRequestContext() | 56 TestShellRequestContext::TestShellRequestContext() |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 file_system_context_, | 130 file_system_context_, |
| 134 SimpleResourceLoaderBridge::GetIoThread())); | 131 SimpleResourceLoaderBridge::GetIoThread())); |
| 135 job_factory->SetProtocolHandler( | 132 job_factory->SetProtocolHandler( |
| 136 "filesystem", | 133 "filesystem", |
| 137 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get())); | 134 fileapi::CreateFileSystemProtocolHandler(file_system_context_.get())); |
| 138 storage_.set_job_factory(job_factory); | 135 storage_.set_job_factory(job_factory); |
| 139 } | 136 } |
| 140 | 137 |
| 141 TestShellRequestContext::~TestShellRequestContext() { | 138 TestShellRequestContext::~TestShellRequestContext() { |
| 142 } | 139 } |
| OLD | NEW |