OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 "update_engine/mock_http_fetcher.h" | 5 #include "update_engine/mock_http_fetcher.h" |
6 #include <algorithm> | 6 #include <algorithm> |
7 #include "chromeos/obsolete_logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 // This is a mac implementation of HttpFetcher which is useful for testing. | 9 // This is a mac implementation of HttpFetcher which is useful for testing. |
10 | 10 |
11 using std::min; | 11 using std::min; |
12 | 12 |
13 namespace chromeos_update_engine { | 13 namespace chromeos_update_engine { |
14 | 14 |
15 MockHttpFetcher::~MockHttpFetcher() { | 15 MockHttpFetcher::~MockHttpFetcher() { |
16 CHECK(!timeout_source_) << "Call TerminateTransfer() before dtor."; | 16 CHECK(!timeout_source_) << "Call TerminateTransfer() before dtor."; |
17 } | 17 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 void MockHttpFetcher::Unpause() { | 94 void MockHttpFetcher::Unpause() { |
95 CHECK(paused_) << "You must pause before unpause."; | 95 CHECK(paused_) << "You must pause before unpause."; |
96 paused_ = false; | 96 paused_ = false; |
97 if (sent_size_ < data_.size()) { | 97 if (sent_size_ < data_.size()) { |
98 SendData(false); | 98 SendData(false); |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 } // namespace chromeos_update_engine | 102 } // namespace chromeos_update_engine |
OLD | NEW |