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

Side by Side Diff: net/filter/mock_filter_context.h

Issue 380003002: Improve testing for SDCH. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed braino: Added SDHC enable to the tests that need it. Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 NET_FILTER_MOCK_FILTER_CONTEXT_H_ 5 #ifndef NET_FILTER_MOCK_FILTER_CONTEXT_H_
6 #define NET_FILTER_MOCK_FILTER_CONTEXT_H_ 6 #define NET_FILTER_MOCK_FILTER_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 17 matching lines...) Expand all
28 void SetRequestTime(const base::Time time) { request_time_ = time; } 28 void SetRequestTime(const base::Time time) { request_time_ = time; }
29 void SetCached(bool is_cached) { is_cached_content_ = is_cached; } 29 void SetCached(bool is_cached) { is_cached_content_ = is_cached; }
30 void SetDownload(bool is_download) { is_download_ = is_download; } 30 void SetDownload(bool is_download) { is_download_ = is_download; }
31 void SetResponseCode(int response_code) { response_code_ = response_code; } 31 void SetResponseCode(int response_code) { response_code_ = response_code; }
32 void SetSdchResponse(bool is_sdch_response) { 32 void SetSdchResponse(bool is_sdch_response) {
33 is_sdch_response_ = is_sdch_response; 33 is_sdch_response_ = is_sdch_response;
34 } 34 }
35 URLRequestContext* GetModifiableURLRequestContext() const { 35 URLRequestContext* GetModifiableURLRequestContext() const {
36 return context_.get(); 36 return context_.get();
37 } 37 }
38 // Make all interfaces that might be unstable after a URLRequests
mef 2014/07/23 18:34:30 nit: nl above.
Randy Smith (Not in Mondays) 2014/07/29 23:44:21 Done.
39 // destruction be so.
jar (doing other things) 2014/07/31 03:24:34 nit: comment seemed clumsy... or at least I had to
Randy Smith (Not in Mondays) 2014/08/11 20:33:25 s/URLRequests/URLRequest's destructor/. I mean to
40 void NukeUnstableInterfaces();
38 41
39 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; 42 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
40 43
41 // What URL was used to access this data? 44 // What URL was used to access this data?
42 // Return false if gurl is not present. 45 // Return false if gurl is not present.
43 virtual bool GetURL(GURL* gurl) const OVERRIDE; 46 virtual bool GetURL(GURL* gurl) const OVERRIDE;
44 47
45 // What Content-Disposition did the server supply for this data? 48 // What Content-Disposition did the server supply for this data?
46 // Return false if Content-Disposition was not present. 49 // Return false if Content-Disposition was not present.
47 virtual bool GetContentDisposition(std::string* disposition) const OVERRIDE; 50 virtual bool GetContentDisposition(std::string* disposition) const OVERRIDE;
(...skipping 22 matching lines...) Expand all
70 73
71 private: 74 private:
72 int buffer_size_; 75 int buffer_size_;
73 std::string mime_type_; 76 std::string mime_type_;
74 std::string content_disposition_; 77 std::string content_disposition_;
75 GURL gurl_; 78 GURL gurl_;
76 base::Time request_time_; 79 base::Time request_time_;
77 bool is_cached_content_; 80 bool is_cached_content_;
78 bool is_download_; 81 bool is_download_;
79 bool is_sdch_response_; 82 bool is_sdch_response_;
83 bool ok_to_call_get_url_;
80 int response_code_; 84 int response_code_;
81 scoped_ptr<URLRequestContext> context_; 85 scoped_ptr<URLRequestContext> context_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(MockFilterContext); 87 DISALLOW_COPY_AND_ASSIGN(MockFilterContext);
84 }; 88 };
85 89
86 } // namespace net 90 } // namespace net
87 91
88 #endif // NET_FILTER_MOCK_FILTER_CONTEXT_H_ 92 #endif // NET_FILTER_MOCK_FILTER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698