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

Side by Side Diff: webkit/tools/test_shell/test_shell_request_context.cc

Issue 113043: Fix gconf for the linux proxy config service.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 months 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 | « webkit/tools/test_shell/run_all_tests.cc ('k') | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "net/base/cookie_monster.h" 7 #include "net/base/cookie_monster.h"
8 #include "net/proxy/proxy_service.h" 8 #include "net/proxy/proxy_service.h"
9 #include "webkit/glue/webkit_glue.h" 9 #include "webkit/glue/webkit_glue.h"
10 10
(...skipping 12 matching lines...) Expand all
23 const std::wstring& cache_path, 23 const std::wstring& cache_path,
24 net::HttpCache::Mode cache_mode, 24 net::HttpCache::Mode cache_mode,
25 bool no_proxy) { 25 bool no_proxy) {
26 cookie_store_ = new net::CookieMonster(); 26 cookie_store_ = new net::CookieMonster();
27 27
28 // hard-code A-L and A-C for test shells 28 // hard-code A-L and A-C for test shells
29 accept_language_ = "en-us,en"; 29 accept_language_ = "en-us,en";
30 accept_charset_ = "iso-8859-1,*,utf-8"; 30 accept_charset_ = "iso-8859-1,*,utf-8";
31 31
32 net::ProxyConfig proxy_config; 32 net::ProxyConfig proxy_config;
33 proxy_service_ = net::ProxyService::Create(no_proxy ? &proxy_config : NULL); 33 proxy_service_ = net::ProxyService::Create(no_proxy ? &proxy_config : NULL,
34 false, NULL, NULL);
34 35
35 net::HttpCache *cache; 36 net::HttpCache *cache;
36 if (cache_path.empty()) { 37 if (cache_path.empty()) {
37 cache = new net::HttpCache(proxy_service_, 0); 38 cache = new net::HttpCache(proxy_service_, 0);
38 } else { 39 } else {
39 cache = new net::HttpCache(proxy_service_, cache_path, 0); 40 cache = new net::HttpCache(proxy_service_, cache_path, 0);
40 } 41 }
41 cache->set_mode(cache_mode); 42 cache->set_mode(cache_mode);
42 http_transaction_factory_ = cache; 43 http_transaction_factory_ = cache;
43 } 44 }
44 45
45 TestShellRequestContext::~TestShellRequestContext() { 46 TestShellRequestContext::~TestShellRequestContext() {
46 delete cookie_store_; 47 delete cookie_store_;
47 delete http_transaction_factory_; 48 delete http_transaction_factory_;
48 delete proxy_service_; 49 delete proxy_service_;
49 } 50 }
50 51
51 const std::string& TestShellRequestContext::GetUserAgent( 52 const std::string& TestShellRequestContext::GetUserAgent(
52 const GURL& url) const { 53 const GURL& url) const {
53 return webkit_glue::GetUserAgent(url); 54 return webkit_glue::GetUserAgent(url);
54 } 55 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/run_all_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698