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

Unified Diff: mock_http_fetcher.h

Issue 6677146: AU: OmahaRequestAction: allow to be skipped. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix include "" vs <> Created 9 years, 9 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
« no previous file with comments | « no previous file | mock_http_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mock_http_fetcher.h
diff --git a/mock_http_fetcher.h b/mock_http_fetcher.h
index b46e0237aa6936a35e7b2b5fb43f6fe247849c37..6d72b9265e6c9f3ccfffce5f37e00a05e782937b 100644
--- a/mock_http_fetcher.h
+++ b/mock_http_fetcher.h
@@ -36,7 +36,8 @@ class MockHttpFetcher : public HttpFetcher {
timeout_source_(NULL),
timout_tag_(0),
paused_(false),
- fail_transfer_(false) {
+ fail_transfer_(false),
+ never_use_(false) {
data_.insert(data_.end(), data, data + size);
}
@@ -66,6 +67,9 @@ class MockHttpFetcher : public HttpFetcher {
// Fail the transfer. This simulates a network failure.
void FailTransfer(int http_response_code);
+ // If set to true, this will EXPECT fail on BeginTransfer
+ void set_never_use(bool never_use) { never_use_ = never_use; }
+
const std::vector<char>& post_data() const {
return post_data_;
}
@@ -108,6 +112,9 @@ class MockHttpFetcher : public HttpFetcher {
// Set to true if the transfer should fail.
bool fail_transfer_;
+ // Set to true if BeginTransfer should EXPECT fail.
+ bool never_use_;
+
DISALLOW_COPY_AND_ASSIGN(MockHttpFetcher);
};
« no previous file with comments | « no previous file | mock_http_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698