| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/precache/core/precache_fetcher.h" | 5 #include "components/precache/core/precache_fetcher.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 // Multiset with one entry for each URL requested. | 55 // Multiset with one entry for each URL requested. |
| 56 std::multiset<GURL> requested_urls_; | 56 std::multiset<GURL> requested_urls_; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class TestPrecacheDelegate : public PrecacheFetcher::PrecacheDelegate { | 59 class TestPrecacheDelegate : public PrecacheFetcher::PrecacheDelegate { |
| 60 public: | 60 public: |
| 61 TestPrecacheDelegate() : was_on_done_called_(false) {} | 61 TestPrecacheDelegate() : was_on_done_called_(false) {} |
| 62 | 62 |
| 63 virtual void OnDone() OVERRIDE { | 63 virtual void OnDone() override { |
| 64 was_on_done_called_ = true; | 64 was_on_done_called_ = true; |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool was_on_done_called() const { | 67 bool was_on_done_called() const { |
| 68 return was_on_done_called_; | 68 return was_on_done_called_; |
| 69 } | 69 } |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 bool was_on_done_called_; | 72 bool was_on_done_called_; |
| 73 }; | 73 }; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls()); | 301 EXPECT_EQ(expected_requested_urls, url_callback_.requested_urls()); |
| 302 | 302 |
| 303 EXPECT_TRUE(precache_delegate_.was_on_done_called()); | 303 EXPECT_TRUE(precache_delegate_.was_on_done_called()); |
| 304 } | 304 } |
| 305 | 305 |
| 306 #endif // PRECACHE_MANIFEST_URL_PREFIX | 306 #endif // PRECACHE_MANIFEST_URL_PREFIX |
| 307 | 307 |
| 308 } // namespace | 308 } // namespace |
| 309 | 309 |
| 310 } // namespace precache | 310 } // namespace precache |
| OLD | NEW |