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

Side by Side Diff: content/test/net/url_request_prepackaged_interceptor.h

Issue 11293252: Change Interceptors into URLRequestJobFactory::ProtocolHandlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PolicyTests to unregister with URLRequestFilter Created 8 years 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_INTERCEPTOR_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_INTERCEPTOR_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11
12 class FilePath;
13
14 namespace content {
15
16 // This url request interceptor lets us respond to localhost http request urls
erikwright (departed) 2012/12/07 20:12:05 url -> URL, http -> HTTP, urls -> URLs The prefer
pauljensen 2012/12/09 23:14:12 I didn't change this (it's from autoupdate_interce
17 // with the contents of files on disk for use in tests.
18 class URLRequestPrepackagedInterceptor {
19 public:
20 URLRequestPrepackagedInterceptor();
21 virtual ~URLRequestPrepackagedInterceptor();
22
23 // When requests for |url| arrive, respond with the contents of |path|. The
24 // hostname of |url| must be "localhost" to avoid DNS lookups, and the scheme
25 // must be "http".
26 void SetResponse(const std::string& url,
27 const FilePath& path);
28 void SetQuerylessResponse(const std::string& url,
erikwright (departed) 2012/12/07 20:12:05 Add comment. Consider Renaming to SetResponseIgnor
pauljensen 2012/12/09 23:14:12 Done.
29 const FilePath& path);
30
31 // Returns how many requests have been issued that have a stored reply.
32 int GetHitCount();
33
34 private:
35 class Delegate;
36
37 Delegate* delegate_;
38
39 DISALLOW_COPY_AND_ASSIGN(URLRequestPrepackagedInterceptor);
40 };
41
42 } // namespace content
43
44 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_INTERCEPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698