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

Side by Side Diff: content/public/browser/navigation_controller.h

Issue 11193051: To fix the cross-site post submission bug. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reuse ResourceRequestBody Struct Created 8 years, 1 month 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) 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 CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/browser/global_request_id.h" 15 #include "content/public/browser/global_request_id.h"
16 #include "content/public/common/frame_navigate_params.h"
16 #include "content/public/common/page_transition_types.h" 17 #include "content/public/common/page_transition_types.h"
17 #include "content/public/common/referrer.h" 18 #include "content/public/common/referrer.h"
18 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
19 20
20 namespace base { 21 namespace base {
21 22
22 class RefCountedMemory; 23 class RefCountedMemory;
23 24
24 } // namespace base 25 } // namespace base
25 26
26 namespace content { 27 namespace content {
27 28
28 class BrowserContext; 29 class BrowserContext;
29 class NavigationEntry; 30 class NavigationEntry;
30 class SessionStorageNamespace; 31 class SessionStorageNamespace;
31 class WebContents; 32 class WebContents;
33 struct ViewMsg_Request;
32 34
33 // Used to store the mapping of a StoragePartition id to 35 // Used to store the mapping of a StoragePartition id to
34 // SessionStorageNamespace. 36 // SessionStorageNamespace.
35 typedef std::map<std::string, scoped_refptr<SessionStorageNamespace> > 37 typedef std::map<std::string, scoped_refptr<SessionStorageNamespace> >
36 SessionStorageNamespaceMap; 38 SessionStorageNamespaceMap;
37 39
38 // A NavigationController maintains the back-forward list for a WebContents and 40 // A NavigationController maintains the back-forward list for a WebContents and
39 // manages all navigation within that list. 41 // manages all navigation within that list.
40 // 42 //
41 // Each NavigationController belongs to one WebContents; each WebContents has 43 // Each NavigationController belongs to one WebContents; each WebContents has
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 143
142 // Used in LOAD_TYPE_DATA loads only. URL displayed to the user for 144 // Used in LOAD_TYPE_DATA loads only. URL displayed to the user for
143 // data loads. 145 // data loads.
144 GURL virtual_url_for_data_url; 146 GURL virtual_url_for_data_url;
145 147
146 // Used in LOAD_TYPE_BROWSER_INITIATED_HTTP_POST loads only. Carries the 148 // Used in LOAD_TYPE_BROWSER_INITIATED_HTTP_POST loads only. Carries the
147 // post data of the load. Ownership is transferred to NavigationController 149 // post data of the load. Ownership is transferred to NavigationController
148 // after LoadURLWithParams call. 150 // after LoadURLWithParams call.
149 scoped_refptr<base::RefCountedMemory> browser_initiated_post_data; 151 scoped_refptr<base::RefCountedMemory> browser_initiated_post_data;
150 152
153 // request
154 ViewMsg_Request request;
155
151 // True if this URL should be able to access local resources. 156 // True if this URL should be able to access local resources.
152 bool can_load_local_resources; 157 bool can_load_local_resources;
153 158
154 explicit LoadURLParams(const GURL& url); 159 explicit LoadURLParams(const GURL& url);
155 ~LoadURLParams(); 160 ~LoadURLParams();
156 161
157 // Allows copying of LoadURLParams struct. 162 // Allows copying of LoadURLParams struct.
158 LoadURLParams(const LoadURLParams& other); 163 LoadURLParams(const LoadURLParams& other);
159 LoadURLParams& operator=(const LoadURLParams& other); 164 LoadURLParams& operator=(const LoadURLParams& other);
160 }; 165 };
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 virtual void CopyStateFromAndPrune(NavigationController* source) = 0; 376 virtual void CopyStateFromAndPrune(NavigationController* source) = 0;
372 377
373 // Removes all the entries except the active entry. If there is a new pending 378 // Removes all the entries except the active entry. If there is a new pending
374 // navigation it is preserved. 379 // navigation it is preserved.
375 virtual void PruneAllButActive() = 0; 380 virtual void PruneAllButActive() = 0;
376 }; 381 };
377 382
378 } // namespace content 383 } // namespace content
379 384
380 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ 385 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698