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

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

Issue 624073002: Add is_main_frame and parent_is_main_frame to ResourceRequestInfo::AllocateForTesting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile extensions_unittests Created 6 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
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_RESOURCE_REQUEST_INFO_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/common/resource_type.h" 10 #include "content/public/common/resource_type.h"
(...skipping 18 matching lines...) Expand all
29 29
30 // Allocates a new, dummy ResourceRequestInfo and associates it with the 30 // Allocates a new, dummy ResourceRequestInfo and associates it with the
31 // given URLRequest. 31 // given URLRequest.
32 // NOTE: Add more parameters if you need to initialize other fields. 32 // NOTE: Add more parameters if you need to initialize other fields.
33 CONTENT_EXPORT static void AllocateForTesting(net::URLRequest* request, 33 CONTENT_EXPORT static void AllocateForTesting(net::URLRequest* request,
34 ResourceType resource_type, 34 ResourceType resource_type,
35 ResourceContext* context, 35 ResourceContext* context,
36 int render_process_id, 36 int render_process_id,
37 int render_view_id, 37 int render_view_id,
38 int render_frame_id, 38 int render_frame_id,
39 bool is_main_frame,
40 bool parent_is_main_frame,
39 bool is_async); 41 bool is_async);
40 42
41 // Returns the associated RenderFrame for a given process. Returns false, if 43 // Returns the associated RenderFrame for a given process. Returns false, if
42 // there is no associated RenderFrame. This method does not rely on the 44 // there is no associated RenderFrame. This method does not rely on the
43 // request being allocated by the ResourceDispatcherHost, but works for all 45 // request being allocated by the ResourceDispatcherHost, but works for all
44 // URLRequests that are associated with a RenderFrame. 46 // URLRequests that are associated with a RenderFrame.
45 CONTENT_EXPORT static bool GetRenderFrameForRequest( 47 CONTENT_EXPORT static bool GetRenderFrameForRequest(
46 const net::URLRequest* request, 48 const net::URLRequest* request,
47 int* render_process_id, 49 int* render_process_id,
48 int* render_frame_id); 50 int* render_frame_id);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Whether this is a download. 123 // Whether this is a download.
122 virtual bool IsDownload() const = 0; 124 virtual bool IsDownload() const = 0;
123 125
124 protected: 126 protected:
125 virtual ~ResourceRequestInfo() {} 127 virtual ~ResourceRequestInfo() {}
126 }; 128 };
127 129
128 } // namespace content 130 } // namespace content
129 131
130 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ 132 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698