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

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

Issue 2545943003: Accessing navigation information via webcontents (Closed)
Patch Set: Fixed SummarizeResponse 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: Navigation ID has particular
alexilin 2016/12/05 13:20:00 nit: Note: NavigationID is not initialized by this
Benoit L 2016/12/05 13:25:56 Thanks for documenting this.
100 // constraints and is NOT initialized by this function. See Observer
101 // private method RetriveNavigationID
100 static bool SummarizeResponse(const net::URLRequest& request, 102 static bool SummarizeResponse(const net::URLRequest& request,
101 URLRequestSummary* summary); 103 URLRequestSummary* summary);
102 }; 104 };
103 105
104 // Stores the data learned from a single navigation. 106 // Stores the data learned from a single navigation.
105 struct PageRequestSummary { 107 struct PageRequestSummary {
106 explicit PageRequestSummary(const GURL& main_frame_url); 108 explicit PageRequestSummary(const GURL& main_frame_url);
107 PageRequestSummary(const PageRequestSummary& other); 109 PageRequestSummary(const PageRequestSummary& other);
108 ~PageRequestSummary(); 110 ~PageRequestSummary();
109 111
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 377
376 private: 378 private:
377 ResourcePrefetchPredictor* predictor_; 379 ResourcePrefetchPredictor* predictor_;
378 380
379 DISALLOW_COPY_AND_ASSIGN(TestObserver); 381 DISALLOW_COPY_AND_ASSIGN(TestObserver);
380 }; 382 };
381 383
382 } // namespace predictors 384 } // namespace predictors
383 385
384 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 386 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698