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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/stub_url_fetcher.h

Issue 10836182: Obfuscated Gaia ID fetcher (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: CR changes per Munjal Created 8 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5
6 #ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_STUB_URL_FETCHER_H_
7 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_STUB_URL_FETCHER_H_
8
9
10 #include "net/url_request/url_fetcher.h"
11 #include "googleurl/src/gurl.h"
12 #include "net/url_request/url_request_status.h"
13
14 namespace net {
15
16 class StubURLFetcher : public URLFetcher {
17 public:
18 StubURLFetcher(std::string fakeBody, bool retval);
19 virtual ~StubURLFetcher();
20
21 // unneeded virtual functions - do just enough to compile
22 virtual void SetUploadData(const std::string& upload_content_type,
23 const std::string& upload_content) OVERRIDE {}
24 virtual void SetChunkedUpload(const std::string& upload_content_type)
25 OVERRIDE {}
26 virtual void AppendChunkToUpload(const std::string& data,
27 bool is_last_chunk) OVERRIDE {}
28 virtual void SetLoadFlags(int load_flags) OVERRIDE {}
29 virtual int GetLoadFlags() const OVERRIDE;
30 virtual void SetReferrer(const std::string& referrer) OVERRIDE {}
31 virtual void SetExtraRequestHeaders(
32 const std::string& extra_request_headers) OVERRIDE {}
33 virtual void AddExtraRequestHeader(const std::string& header_line) OVERRIDE {}
34 virtual void GetExtraRequestHeaders(
35 HttpRequestHeaders* headers) const OVERRIDE {}
36 virtual void SetRequestContext(
37 URLRequestContextGetter* request_context_getter) OVERRIDE {}
38 virtual void SetFirstPartyForCookies(
39 const GURL& first_party_for_cookies) OVERRIDE {}
40 virtual void SetURLRequestUserData(
41 const void* key,
42 const CreateDataCallback& create_data_callback) OVERRIDE {}
43 virtual void SetStopOnRedirect(bool stop_on_redirect) OVERRIDE {}
44 virtual void SetAutomaticallyRetryOn5xx(bool retry) OVERRIDE {}
45 virtual void SetMaxRetries(int max_retries) OVERRIDE {}
46 virtual int GetMaxRetries() const OVERRIDE;
47 virtual base::TimeDelta GetBackoffDelay() const OVERRIDE;
48 virtual void SaveResponseToFileAtPath(
49 const FilePath& file_path,
50 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) OVERRIDE {}
51 virtual void SaveResponseToTemporaryFile(
52 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) OVERRIDE {}
53 virtual HttpResponseHeaders* GetResponseHeaders() const OVERRIDE;
54 virtual HostPortPair GetSocketAddress() const OVERRIDE;
55 virtual bool WasFetchedViaProxy() const OVERRIDE;
56 virtual void Start() OVERRIDE {}
57 virtual const GURL& GetOriginalURL() const OVERRIDE;
58 virtual const GURL& GetURL() const OVERRIDE;
59 virtual const URLRequestStatus& GetStatus() const OVERRIDE;
60 virtual int GetResponseCode() const OVERRIDE;
61 virtual const ResponseCookies& GetCookies() const OVERRIDE;
62 virtual bool FileErrorOccurred(
63 base::PlatformFileError* out_error_code) const OVERRIDE;
64 virtual void ReceivedContentWasMalformed() OVERRIDE {}
65 virtual bool GetResponseAsString(std::string* out_response_string)
66 const OVERRIDE;
67 virtual bool GetResponseAsFilePath(bool take_ownership,
68 FilePath* out_response_path)
69 const OVERRIDE;
70
71 private:
72 std::string fakeBody_;
73 bool retval_;
74 GURL gurl_;
75 ResponseCookies responseCookies_;
76 URLRequestStatus requestStatus_;
77 };
78
79
80 } // namespace net
81
82
83 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_STUB_URL_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698