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

Unified Diff: net/filter/mock_filter_context.h

Issue 298063006: Make SdchManager per-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed bugs found through smoke testing and incorporated comments. 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 side-by-side diff with in-line comments
Download patch
Index: net/filter/mock_filter_context.h
diff --git a/net/filter/mock_filter_context.h b/net/filter/mock_filter_context.h
index 21e56ac92e17c314ba49d5f1bca21a0348a32816..9bb6235a3a9ab161c08880e1421c9b574078d33b 100644
--- a/net/filter/mock_filter_context.h
+++ b/net/filter/mock_filter_context.h
@@ -7,11 +7,14 @@
#include <string>
+#include "base/memory/scoped_ptr.h"
#include "net/filter/filter.h"
#include "url/gurl.h"
namespace net {
+class URLRequestContext;
+
class MockFilterContext : public FilterContext {
public:
MockFilterContext();
@@ -29,6 +32,9 @@ class MockFilterContext : public FilterContext {
void SetSdchResponse(bool is_sdch_response) {
is_sdch_response_ = is_sdch_response;
}
+ URLRequestContext* GetModifiableURLRequestContext() const {
+ return context_.get();
+ }
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
@@ -57,6 +63,9 @@ class MockFilterContext : public FilterContext {
virtual int GetResponseCode() const OVERRIDE;
+ // The URLRequestContext associated with the request.
+ virtual const URLRequestContext* GetURLRequestContext() const OVERRIDE;
+
virtual void RecordPacketStats(StatisticSelector statistic) const OVERRIDE {}
private:
@@ -69,6 +78,7 @@ class MockFilterContext : public FilterContext {
bool is_download_;
bool is_sdch_response_;
int response_code_;
+ scoped_ptr<URLRequestContext> context_;
DISALLOW_COPY_AND_ASSIGN(MockFilterContext);
};

Powered by Google App Engine
This is Rietveld 408576698