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

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

Issue 8568021: Add OVERRIDE to net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: net only Created 9 years, 1 month 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 | « net/base/listen_socket_unittest.h ('k') | net/base/mock_host_resolver.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 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 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_BASE_MOCK_FILTER_CONTEXT_H_ 5 #ifndef NET_BASE_MOCK_FILTER_CONTEXT_H_
6 #define NET_BASE_MOCK_FILTER_CONTEXT_H_ 6 #define NET_BASE_MOCK_FILTER_CONTEXT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 void SetMimeType(const std::string& mime_type) { mime_type_ = mime_type; } 21 void SetMimeType(const std::string& mime_type) { mime_type_ = mime_type; }
22 void SetURL(const GURL& gurl) { gurl_ = gurl; } 22 void SetURL(const GURL& gurl) { gurl_ = gurl; }
23 void SetRequestTime(const base::Time time) { request_time_ = time; } 23 void SetRequestTime(const base::Time time) { request_time_ = time; }
24 void SetCached(bool is_cached) { is_cached_content_ = is_cached; } 24 void SetCached(bool is_cached) { is_cached_content_ = is_cached; }
25 void SetDownload(bool is_download) { is_download_ = is_download; } 25 void SetDownload(bool is_download) { is_download_ = is_download; }
26 void SetResponseCode(int response_code) { response_code_ = response_code; } 26 void SetResponseCode(int response_code) { response_code_ = response_code; }
27 void SetSdchResponse(bool is_sdch_response) { 27 void SetSdchResponse(bool is_sdch_response) {
28 is_sdch_response_ = is_sdch_response; 28 is_sdch_response_ = is_sdch_response;
29 } 29 }
30 30
31 virtual bool GetMimeType(std::string* mime_type) const; 31 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
32 32
33 // What URL was used to access this data? 33 // What URL was used to access this data?
34 // Return false if gurl is not present. 34 // Return false if gurl is not present.
35 virtual bool GetURL(GURL* gurl) const; 35 virtual bool GetURL(GURL* gurl) const OVERRIDE;
36 36
37 // What was this data requested from a server? 37 // What was this data requested from a server?
38 virtual base::Time GetRequestTime() const; 38 virtual base::Time GetRequestTime() const OVERRIDE;
39 39
40 // Is data supplied from cache, or fresh across the net? 40 // Is data supplied from cache, or fresh across the net?
41 virtual bool IsCachedContent() const; 41 virtual bool IsCachedContent() const OVERRIDE;
42 42
43 // Is this a download? 43 // Is this a download?
44 virtual bool IsDownload() const; 44 virtual bool IsDownload() const OVERRIDE;
45 45
46 // Was this data flagged as a response to a request with an SDCH dictionary? 46 // Was this data flagged as a response to a request with an SDCH dictionary?
47 virtual bool IsSdchResponse() const; 47 virtual bool IsSdchResponse() const OVERRIDE;
48 48
49 // How many bytes were fed to filter(s) so far? 49 // How many bytes were fed to filter(s) so far?
50 virtual int64 GetByteReadCount() const; 50 virtual int64 GetByteReadCount() const OVERRIDE;
51 51
52 virtual int GetResponseCode() const; 52 virtual int GetResponseCode() const OVERRIDE;
53 53
54 virtual void RecordPacketStats(StatisticSelector statistic) const {} 54 virtual void RecordPacketStats(StatisticSelector statistic) const OVERRIDE {}
55 55
56 private: 56 private:
57 int buffer_size_; 57 int buffer_size_;
58 std::string mime_type_; 58 std::string mime_type_;
59 GURL gurl_; 59 GURL gurl_;
60 base::Time request_time_; 60 base::Time request_time_;
61 bool is_cached_content_; 61 bool is_cached_content_;
62 bool is_download_; 62 bool is_download_;
63 bool is_sdch_response_; 63 bool is_sdch_response_;
64 int response_code_; 64 int response_code_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(MockFilterContext); 66 DISALLOW_COPY_AND_ASSIGN(MockFilterContext);
67 }; 67 };
68 68
69 } // namespace net 69 } // namespace net
70 70
71 #endif // NET_BASE_MOCK_FILTER_CONTEXT_H_ 71 #endif // NET_BASE_MOCK_FILTER_CONTEXT_H_
OLDNEW
« no previous file with comments | « net/base/listen_socket_unittest.h ('k') | net/base/mock_host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698