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

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

Issue 298063006: Make SdchManager per-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments and changed test name. Created 6 years, 6 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
« no previous file with comments | « net/filter/mock_filter_context.h ('k') | net/filter/sdch_filter.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 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 #include "net/filter/mock_filter_context.h" 5 #include "net/filter/mock_filter_context.h"
6 6
7 #include "net/url_request/url_request_context.h"
8
7 namespace net { 9 namespace net {
8 10
9 MockFilterContext::MockFilterContext() 11 MockFilterContext::MockFilterContext()
10 : is_cached_content_(false), 12 : is_cached_content_(false),
11 is_download_(false), 13 is_download_(false),
12 is_sdch_response_(false), 14 is_sdch_response_(false),
13 response_code_(-1) { 15 response_code_(-1),
16 context_(new URLRequestContext()) {
14 } 17 }
15 18
16 MockFilterContext::~MockFilterContext() {} 19 MockFilterContext::~MockFilterContext() {}
17 20
18 bool MockFilterContext::GetMimeType(std::string* mime_type) const { 21 bool MockFilterContext::GetMimeType(std::string* mime_type) const {
19 *mime_type = mime_type_; 22 *mime_type = mime_type_;
20 return true; 23 return true;
21 } 24 }
22 25
23 // What URL was used to access this data? 26 // What URL was used to access this data?
(...skipping 18 matching lines...) Expand all
42 bool MockFilterContext::IsCachedContent() const { return is_cached_content_; } 45 bool MockFilterContext::IsCachedContent() const { return is_cached_content_; }
43 46
44 bool MockFilterContext::IsDownload() const { return is_download_; } 47 bool MockFilterContext::IsDownload() const { return is_download_; }
45 48
46 bool MockFilterContext::IsSdchResponse() const { return is_sdch_response_; } 49 bool MockFilterContext::IsSdchResponse() const { return is_sdch_response_; }
47 50
48 int64 MockFilterContext::GetByteReadCount() const { return 0; } 51 int64 MockFilterContext::GetByteReadCount() const { return 0; }
49 52
50 int MockFilterContext::GetResponseCode() const { return response_code_; } 53 int MockFilterContext::GetResponseCode() const { return response_code_; }
51 54
55 const URLRequestContext* MockFilterContext::GetURLRequestContext() const {
56 return context_.get();
57 }
58
52 } // namespace net 59 } // namespace net
OLDNEW
« no previous file with comments | « net/filter/mock_filter_context.h ('k') | net/filter/sdch_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698