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

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

Issue 19613: Merge 8764 - Add support for UA spoofing, and spoof Safari's UA string when l... (Closed) Base URL: svn://chrome-svn/chrome/branches/release_154.next/src/
Patch Set: Created 11 years, 10 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
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 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_REQUEST_CONTEXT_H__ 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_REQUEST_CONTEXT_H__
6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_REQUEST_CONTEXT_H__ 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_REQUEST_CONTEXT_H__
7 7
8 #include "net/http/http_cache.h" 8 #include "net/http/http_cache.h"
9 #include "net/url_request/url_request_context.h" 9 #include "net/url_request/url_request_context.h"
10 10
11 // A basic URLRequestContext that only provides an in-memory cookie store. 11 // A basic URLRequestContext that only provides an in-memory cookie store.
12 class TestShellRequestContext : public URLRequestContext { 12 class TestShellRequestContext : public URLRequestContext {
13 public: 13 public:
14 // Use an in-memory cache 14 // Use an in-memory cache
15 TestShellRequestContext(); 15 TestShellRequestContext();
16 16
17 // Use an on-disk cache at the specified location. Optionally, use the cache 17 // Use an on-disk cache at the specified location. Optionally, use the cache
18 // in playback or record mode. 18 // in playback or record mode.
19 TestShellRequestContext(const std::wstring& cache_path, 19 TestShellRequestContext(const std::wstring& cache_path,
20 net::HttpCache::Mode cache_mode); 20 net::HttpCache::Mode cache_mode);
21 21
22 ~TestShellRequestContext(); 22 ~TestShellRequestContext();
23 23
24 virtual const std::string& GetUserAgent(const GURL& url) const;
25
24 private: 26 private:
25 void Init(const std::wstring& cache_path, net::HttpCache::Mode cache_mode); 27 void Init(const std::wstring& cache_path, net::HttpCache::Mode cache_mode);
26 }; 28 };
27 29
28 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_REQUEST_CONTEXT_H__ 30 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_REQUEST_CONTEXT_H__
29 31
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698