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

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

Issue 2545943003: Accessing navigation information via webcontents (Closed)
Patch Set: Post-Review Modifications #3 Created 4 years 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // Only for responses. 90 // Only for responses.
91 std::string mime_type; 91 std::string mime_type;
92 bool was_cached; 92 bool was_cached;
93 GURL redirect_url; // Empty unless request was redirected to a valid url. 93 GURL redirect_url; // Empty unless request was redirected to a valid url.
94 94
95 bool has_validators; 95 bool has_validators;
96 bool always_revalidate; 96 bool always_revalidate;
97 97
98 // Initializes a |URLRequestSummary| from a |URLRequest| response. 98 // Initializes a |URLRequestSummary| from a |URLRequest| response.
99 // Returns true for success. 99 // Returns true for success. Note: NavigationID is NOT initialized
100 // by this function.
100 static bool SummarizeResponse(const net::URLRequest& request, 101 static bool SummarizeResponse(const net::URLRequest& request,
101 URLRequestSummary* summary); 102 URLRequestSummary* summary);
102 }; 103 };
103 104
104 // Stores the data learned from a single navigation. 105 // Stores the data learned from a single navigation.
105 struct PageRequestSummary { 106 struct PageRequestSummary {
106 explicit PageRequestSummary(const GURL& main_frame_url); 107 explicit PageRequestSummary(const GURL& main_frame_url);
107 PageRequestSummary(const PageRequestSummary& other); 108 PageRequestSummary(const PageRequestSummary& other);
108 ~PageRequestSummary(); 109 ~PageRequestSummary();
109 110
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 376
376 private: 377 private:
377 ResourcePrefetchPredictor* predictor_; 378 ResourcePrefetchPredictor* predictor_;
378 379
379 DISALLOW_COPY_AND_ASSIGN(TestObserver); 380 DISALLOW_COPY_AND_ASSIGN(TestObserver);
380 }; 381 };
381 382
382 } // namespace predictors 383 } // namespace predictors
383 384
384 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 385 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_common.cc ('k') | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698