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

Side by Side Diff: chrome/browser/renderer_host/chrome_url_request_user_data.h

Issue 8669014: Fix a bug where redirect chain gets lost on process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: conditional disabling Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_HOST_CHROME_URL_REQUEST_USER_DATA_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_URL_REQUEST_USER_DATA_H_
6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_URL_REQUEST_USER_DATA_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_URL_REQUEST_USER_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "net/url_request/url_request.h" 9 #include "net/url_request/url_request.h"
10 10
11 class ChromeURLRequestUserData : public net::URLRequest::UserData { 11 class ChromeURLRequestUserData : public net::URLRequest::UserData {
12 public: 12 public:
13 bool is_prerender() const { return is_prerender_; } 13 bool is_prerender() const { return is_prerender_; }
14 void set_is_prerender(bool is_prerender) { is_prerender_ = is_prerender; } 14 void set_is_prerender(bool is_prerender) { is_prerender_ = is_prerender; }
15 15
16 // Creates a new ChromeURLRequestUserData instance and attaches it 16 // Creates a new ChromeURLRequestUserData instance and attaches it
17 // to |request|. |request| must not have an existing ChromeURLRequestUserData 17 // to |request|. |request| must not have an existing ChromeURLRequestUserData
18 // instance attached to it, and must be non-NULL. The returned instance 18 // instance attached to it, and must be non-NULL. The returned instance
19 // is owned by |request|. 19 // is owned by |request|.
20 static ChromeURLRequestUserData* Create(net::URLRequest* request); 20 static ChromeURLRequestUserData* Create(net::URLRequest* request);
21 21
22 // Delete the ChromeURLRequestUserData from a |request|. |request| must be
23 // non-NULL.
24 static void Delete(net::URLRequest* request);
25
22 // Gets the ChromeURLRequestUserData instance attached to |request|, or 26 // Gets the ChromeURLRequestUserData instance attached to |request|, or
23 // returns NULL if one is not attached. |request| must be non-NULL. 27 // returns NULL if one is not attached. |request| must be non-NULL.
24 static ChromeURLRequestUserData* Get(const net::URLRequest* request); 28 static ChromeURLRequestUserData* Get(const net::URLRequest* request);
25 29
26 private: 30 private:
27 ChromeURLRequestUserData(); 31 ChromeURLRequestUserData();
28 32
29 bool is_prerender_; 33 bool is_prerender_;
30 34
31 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestUserData); 35 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestUserData);
32 }; 36 };
33 37
34 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_URL_REQUEST_USER_DATA_H_ 38 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_URL_REQUEST_USER_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698