Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |