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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor_test_util.h

Issue 2923813002: predictors: Don't call IsUrlPrefetchable twice. (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetch_predictor_test_util.h
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_test_util.h b/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
index 2597ae1fef99d4fe7b581b4b2c7809498685c77f..e34dbcdc531de98681d114625a20102ec5c30e35 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor_test_util.h
@@ -4,7 +4,6 @@
#ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
#define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TEST_UTIL_H_
-#include <set>
#include <string>
#include <vector>
@@ -22,21 +21,13 @@ class MockResourcePrefetchPredictor : public ResourcePrefetchPredictor {
Profile* profile);
~MockResourcePrefetchPredictor();
- bool IsUrlPrefetchable(const GURL& main_frame_url) const override {
- return prefetchable_urls_.find(main_frame_url) != prefetchable_urls_.end();
- }
-
- void AddPrefetchableUrl(const GURL& url) { prefetchable_urls_.insert(url); }
-
MOCK_CONST_METHOD2(GetPrefetchData,
- bool(const GURL& main_frame_url, Prediction* prediction));
+ bool(const GURL&, ResourcePrefetchPredictor::Prediction*));
MOCK_METHOD0(StartInitialization, void());
MOCK_METHOD0(Shutdown, void());
- MOCK_METHOD1(StartPrefetching, void(const GURL&));
+ MOCK_METHOD2(StartPrefetching,
+ void(const GURL&, const ResourcePrefetchPredictor::Prediction&));
MOCK_METHOD1(StopPrefeching, void(const GURL&));
-
- private:
- std::set<GURL> prefetchable_urls_;
};
void InitializeResourceData(ResourceData* resource,
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698