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

Side by Side Diff: content/browser/cross_site_request_manager.h

Issue 15682009: Eliminate SwapOut message parameters, keeping state in RVHM instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to get Android build fix Created 7 years, 6 months 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_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_
6 #define CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ 6 #define CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 12 matching lines...) Expand all
23 // CrossSiteRequestManager is a singleton that may be used on any thread. 23 // CrossSiteRequestManager is a singleton that may be used on any thread.
24 // 24 //
25 class CrossSiteRequestManager { 25 class CrossSiteRequestManager {
26 public: 26 public:
27 // Returns the singleton instance. 27 // Returns the singleton instance.
28 static CrossSiteRequestManager* GetInstance(); 28 static CrossSiteRequestManager* GetInstance();
29 29
30 // Returns whether the RenderViewHost specified by the given IDs currently 30 // Returns whether the RenderViewHost specified by the given IDs currently
31 // has a pending cross-site request. If so, we will have to delay the 31 // has a pending cross-site request. If so, we will have to delay the
32 // response until the previous RenderViewHost runs its onunload handler. 32 // response until the previous RenderViewHost runs its onunload handler.
33 // Called by ResourceDispatcherHost on the IO thread. 33 // Called by ResourceDispatcherHost on the IO thread and RenderViewHost on
34 // the UI thread.
34 bool HasPendingCrossSiteRequest(int renderer_id, int render_view_id); 35 bool HasPendingCrossSiteRequest(int renderer_id, int render_view_id);
35 36
36 // Sets whether the RenderViewHost specified by the given IDs currently has a 37 // Sets whether the RenderViewHost specified by the given IDs currently has a
37 // pending cross-site request. Called by RenderViewHost on the UI thread. 38 // pending cross-site request. Called by RenderViewHost on the UI thread.
38 void SetHasPendingCrossSiteRequest(int renderer_id, 39 void SetHasPendingCrossSiteRequest(int renderer_id,
39 int render_view_id, 40 int render_view_id,
40 bool has_pending); 41 bool has_pending);
41 42
42 private: 43 private:
43 friend struct DefaultSingletonTraits<CrossSiteRequestManager>; 44 friend struct DefaultSingletonTraits<CrossSiteRequestManager>;
(...skipping 10 matching lines...) Expand all
54 // RenderViewHosts that have pending cross-site requests. Used to pass 55 // RenderViewHosts that have pending cross-site requests. Used to pass
55 // information about the RenderViewHosts between the UI and IO threads. 56 // information about the RenderViewHosts between the UI and IO threads.
56 RenderViewSet pending_cross_site_views_; 57 RenderViewSet pending_cross_site_views_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(CrossSiteRequestManager); 59 DISALLOW_COPY_AND_ASSIGN(CrossSiteRequestManager);
59 }; 60 };
60 61
61 } // namespace content 62 } // namespace content
62 63
63 #endif // CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_ 64 #endif // CONTENT_BROWSER_CROSS_SITE_REQUEST_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/unload_browsertest.cc ('k') | content/browser/loader/cross_site_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698