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

Side by Side Diff: chrome/browser/prerender/prerender_contents.h

Issue 757723002: [Tests not passing yet] Remove prerender sessionStorage namespace merging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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 (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_PRERENDER_PRERENDER_CONTENTS_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 virtual bool GetChildId(int* child_id) const; 183 virtual bool GetChildId(int* child_id) const;
184 184
185 // Sets the parameter to the value of the associated RenderViewHost's route id 185 // Sets the parameter to the value of the associated RenderViewHost's route id
186 // and returns a boolean indicating the validity of that id. 186 // and returns a boolean indicating the validity of that id.
187 virtual bool GetRouteId(int* route_id) const; 187 virtual bool GetRouteId(int* route_id) const;
188 188
189 FinalStatus final_status() const { return final_status_; } 189 FinalStatus final_status() const { return final_status_; }
190 190
191 Origin origin() const { return origin_; } 191 Origin origin() const { return origin_; }
192 uint8 experiment_id() const { return experiment_id_; } 192 uint8 experiment_id() const { return experiment_id_; }
193 int child_id() const { return child_id_; }
194 193
195 base::TimeTicks load_start_time() const { return load_start_time_; } 194 base::TimeTicks load_start_time() const { return load_start_time_; }
196 195
197 // Indicates whether this prerendered page can be used for the provided 196 // Indicates whether this prerendered page can be used for the provided
198 // |url| and |session_storage_namespace|. 197 // |url| and |session_storage_namespace|.
199 bool Matches( 198 bool Matches(
200 const GURL& url, 199 const GURL& url,
201 const content::SessionStorageNamespace* session_storage_namespace) const; 200 const content::SessionStorageNamespace* session_storage_namespace) const;
202 201
203 // content::WebContentsObserver implementation. 202 // content::WebContentsObserver implementation.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 base::Value* GetAsValue() const; 258 base::Value* GetAsValue() const;
260 259
261 // Returns whether a pending cross-site navigation is happening. 260 // Returns whether a pending cross-site navigation is happening.
262 // This could happen with renderer-issued navigations, such as a 261 // This could happen with renderer-issued navigations, such as a
263 // MouseEvent being dispatched by a link to a website installed as an app. 262 // MouseEvent being dispatched by a link to a website installed as an app.
264 bool IsCrossSiteNavigationPending() const; 263 bool IsCrossSiteNavigationPending() const;
265 264
266 // Marks prerender as used and releases any throttled resource requests. 265 // Marks prerender as used and releases any throttled resource requests.
267 void PrepareForUse(); 266 void PrepareForUse();
268 267
269 content::SessionStorageNamespace* GetSessionStorageNamespace() const;
270
271 // Cookie events 268 // Cookie events
272 enum CookieEvent { 269 enum CookieEvent {
273 COOKIE_EVENT_SEND = 0, 270 COOKIE_EVENT_SEND = 0,
274 COOKIE_EVENT_CHANGE = 1, 271 COOKIE_EVENT_CHANGE = 1,
275 COOKIE_EVENT_MAX 272 COOKIE_EVENT_MAX
276 }; 273 };
277 274
278 // Record a cookie transaction for this prerender contents. 275 // Record a cookie transaction for this prerender contents.
279 // In the event of cookies being sent, |earliest_create_date| contains 276 // In the event of cookies being sent, |earliest_create_date| contains
280 // the time that the earliest of the cookies sent was created. 277 // the time that the earliest of the cookies sent was created.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 uint8 experiment_id_; 426 uint8 experiment_id_;
430 427
431 // The size of the WebView from the launching page. 428 // The size of the WebView from the launching page.
432 gfx::Size size_; 429 gfx::Size size_;
433 430
434 typedef std::vector<history::HistoryAddPageArgs> AddPageVector; 431 typedef std::vector<history::HistoryAddPageArgs> AddPageVector;
435 432
436 // Caches pages to be added to the history. 433 // Caches pages to be added to the history.
437 AddPageVector add_page_vector_; 434 AddPageVector add_page_vector_;
438 435
439 // The alias session storage namespace for this prerender.
440 scoped_refptr<content::SessionStorageNamespace>
441 alias_session_storage_namespace;
442
443 // Indicates what internal cookie events (see prerender_contents.cc) have 436 // Indicates what internal cookie events (see prerender_contents.cc) have
444 // occurred, using 1 bit for each possible InternalCookieEvent. 437 // occurred, using 1 bit for each possible InternalCookieEvent.
445 int cookie_status_; 438 int cookie_status_;
446 439
447 // Indicates whether existing cookies were sent for this prerender, and 440 // Indicates whether existing cookies were sent for this prerender, and
448 // whether they were third-party cookies, and whether they were for blocking 441 // whether they were third-party cookies, and whether they were for blocking
449 // resources. See the enum CookieSendType in prerender_contents.cc 442 // resources. See the enum CookieSendType in prerender_contents.cc
450 int cookie_send_type_; 443 int cookie_send_type_;
451 444
452 // Resources that are throttled, pending a prerender use. Can only access a 445 // Resources that are throttled, pending a prerender use. Can only access a
453 // throttle on the IO thread. 446 // throttle on the IO thread.
454 std::vector<base::WeakPtr<PrerenderResourceThrottle> > resource_throttles_; 447 std::vector<base::WeakPtr<PrerenderResourceThrottle> > resource_throttles_;
455 448
456 // A running tally of the number of bytes this prerender has caused to be 449 // A running tally of the number of bytes this prerender has caused to be
457 // transferred over the network for resources. Updated with AddNetworkBytes. 450 // transferred over the network for resources. Updated with AddNetworkBytes.
458 int64 network_bytes_; 451 int64 network_bytes_;
459 452
460 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 453 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
461 }; 454 };
462 455
463 } // namespace prerender 456 } // namespace prerender
464 457
465 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 458 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698