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

Side by Side Diff: chrome/browser/predictors/resource_prefetch_predictor.h

Issue 2449323005: predictors: Basic browsertest checks predictor learning. (Closed)
Patch Set: Revert changes about defaults. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void StopPrefetching(const GURL& main_frame_url); 156 void StopPrefetching(const GURL& main_frame_url);
157 157
158 // Sets the |observer| to be notified when the resource prefetch predictor 158 // Sets the |observer| to be notified when the resource prefetch predictor
159 // data changes. Previously registered observer will be discarded. Call 159 // data changes. Previously registered observer will be discarded. Call
160 // this with nullptr parameter to de-register observer. 160 // this with nullptr parameter to de-register observer.
161 void SetObserverForTesting(TestObserver* observer); 161 void SetObserverForTesting(TestObserver* observer);
162 162
163 private: 163 private:
164 friend class ::PredictorsHandler; 164 friend class ::PredictorsHandler;
165 friend class ResourcePrefetchPredictorTest; 165 friend class ResourcePrefetchPredictorTest;
166 friend class ResourcePrefetchPredictorBrowserTest;
pasko 2016/11/02 19:37:01 not necessary for this change, please add when it
alexilin 2016/11/03 13:49:08 Thanks for the pointing, we don't need it anymore
166 167
167 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, DeleteUrls); 168 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, DeleteUrls);
168 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, 169 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest,
169 LazilyInitializeEmpty); 170 LazilyInitializeEmpty);
170 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, 171 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest,
171 LazilyInitializeWithData); 172 LazilyInitializeWithData);
172 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, 173 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest,
173 NavigationNotRecorded); 174 NavigationNotRecorded);
174 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, NavigationUrlInDB); 175 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, NavigationUrlInDB);
175 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, NavigationUrlNotInDB); 176 FRIEND_TEST_ALL_PREFIXES(ResourcePrefetchPredictorTest, NavigationUrlNotInDB);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 373
373 private: 374 private:
374 ResourcePrefetchPredictor* predictor_; 375 ResourcePrefetchPredictor* predictor_;
375 376
376 DISALLOW_COPY_AND_ASSIGN(TestObserver); 377 DISALLOW_COPY_AND_ASSIGN(TestObserver);
377 }; 378 };
378 379
379 } // namespace predictors 380 } // namespace predictors
380 381
381 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 382 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698