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

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

Issue 10704169: Revert 146170 - Adding a field trial to enable speculative resource prefetching learning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Only for responses. 99 // Only for responses.
100 std::string mime_type; 100 std::string mime_type;
101 bool was_cached; 101 bool was_cached;
102 }; 102 };
103 103
104 ResourcePrefetchPredictor(const Config& config, Profile* profile); 104 ResourcePrefetchPredictor(const Config& config, Profile* profile);
105 virtual ~ResourcePrefetchPredictor(); 105 virtual ~ResourcePrefetchPredictor();
106 106
107 // Thread safe. 107 // Thread safe.
108 static bool IsEnabled(Profile* profile); 108 static bool IsEnabled();
109 static bool ShouldRecordRequest(net::URLRequest* request, 109 static bool ShouldRecordRequest(net::URLRequest* request,
110 ResourceType::Type resource_type); 110 ResourceType::Type resource_type);
111 static bool ShouldRecordResponse(net::URLRequest* response); 111 static bool ShouldRecordResponse(net::URLRequest* response);
112 static bool ShouldRecordRedirect(net::URLRequest* response); 112 static bool ShouldRecordRedirect(net::URLRequest* response);
113 113
114 static ResourceType::Type GetResourceTypeFromMimeType( 114 static ResourceType::Type GetResourceTypeFromMimeType(
115 const std::string& mime_type, 115 const std::string& mime_type,
116 ResourceType::Type fallback); 116 ResourceType::Type fallback);
117 117
118 void RecordURLRequest(const URLRequestSummary& request); 118 void RecordURLRequest(const URLRequestSummary& request);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 NavigationMap inflight_navigations_; 208 NavigationMap inflight_navigations_;
209 UrlTableCacheMap url_table_cache_; 209 UrlTableCacheMap url_table_cache_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); 211 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor);
212 }; 212 };
213 213
214 } // namespace predictors 214 } // namespace predictors
215 215
216 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 216 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698