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

Side by Side Diff: content/browser/loader/cross_site_resource_handler.h

Issue 1162833003: Remove unused did_defer_for_testing() from CrossSiteResourceHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/loader/layered_resource_handler.h" 10 #include "content/browser/loader/layered_resource_handler.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // We can now send the response to the new renderer, which will cause 43 // We can now send the response to the new renderer, which will cause
44 // WebContentsImpl to swap in the new renderer and destroy the old one. 44 // WebContentsImpl to swap in the new renderer and destroy the old one.
45 void ResumeResponse(); 45 void ResumeResponse();
46 46
47 // When set to true, requests are leaked when they can't be passed to a 47 // When set to true, requests are leaked when they can't be passed to a
48 // RenderViewHost, for unit tests. 48 // RenderViewHost, for unit tests.
49 CONTENT_EXPORT static void SetLeakRequestsForTesting( 49 CONTENT_EXPORT static void SetLeakRequestsForTesting(
50 bool leak_requests_for_testing); 50 bool leak_requests_for_testing);
51 51
52 // Returns whether the handler is deferred.
53 bool did_defer_for_testing() const { return did_defer_; }
54
55 private: 52 private:
56 // Prepare to transfer the cross-site response to a new RenderFrameHost, by 53 // Prepare to transfer the cross-site response to a new RenderFrameHost, by
57 // asking it to issue an identical request (on the UI thread). 54 // asking it to issue an identical request (on the UI thread).
58 void StartCrossSiteTransition(ResourceResponse* response); 55 void StartCrossSiteTransition(ResourceResponse* response);
59 56
60 // Defer the navigation to the UI thread to check whether transfer is required 57 // Defer the navigation to the UI thread to check whether transfer is required
61 // or not. Currently only used in --site-per-process. 58 // or not. Currently only used in --site-per-process.
62 bool DeferForNavigationPolicyCheck(ResourceRequestInfoImpl* info, 59 bool DeferForNavigationPolicyCheck(ResourceRequestInfoImpl* info,
63 ResourceResponse* response, 60 ResourceResponse* response,
64 bool* defer); 61 bool* defer);
(...skipping 21 matching lines...) Expand all
86 // PostTaskAndReplyWithResult. If a transfer is needed, it goes back to the UI 83 // PostTaskAndReplyWithResult. If a transfer is needed, it goes back to the UI
87 // thread. This can be removed once the code is changed to only do one hop. 84 // thread. This can be removed once the code is changed to only do one hop.
88 base::WeakPtrFactory<CrossSiteResourceHandler> weak_ptr_factory_; 85 base::WeakPtrFactory<CrossSiteResourceHandler> weak_ptr_factory_;
89 86
90 DISALLOW_COPY_AND_ASSIGN(CrossSiteResourceHandler); 87 DISALLOW_COPY_AND_ASSIGN(CrossSiteResourceHandler);
91 }; 88 };
92 89
93 } // namespace content 90 } // namespace content
94 91
95 #endif // CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_ 92 #endif // CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698