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

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

Issue 2484633004: Change Lo-Fi bool to bitmask to support multiple Previews types (Closed)
Patch Set: remove previews_unspecified Created 4 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
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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // we mean setting the |referrer| on the |request|, associating the 312 // we mean setting the |referrer| on the |request|, associating the
313 // ResourceRequestInfoImpl structure with the |request|, etc. 313 // ResourceRequestInfoImpl structure with the |request|, etc.
314 // This function should be called for invoking the BeginURLRequest() function 314 // This function should be called for invoking the BeginURLRequest() function
315 // to initiate a URL request. 315 // to initiate a URL request.
316 void InitializeURLRequest(net::URLRequest* request, 316 void InitializeURLRequest(net::URLRequest* request,
317 const Referrer& referrer, 317 const Referrer& referrer,
318 bool is_download, 318 bool is_download,
319 int render_process_host_id, 319 int render_process_host_id,
320 int render_view_routing_id, 320 int render_view_routing_id,
321 int render_frame_routing_id, 321 int render_frame_routing_id,
322 int previews_state,
322 ResourceContext* context); 323 ResourceContext* context);
323 324
324 // Helper function for initiating a URL request. The |is_download| and 325 // Helper function for initiating a URL request. The |is_download| and
325 // |is_content_initiated and |do_not_prompt_for_login| parameters are 326 // |is_content_initiated and |do_not_prompt_for_login| parameters are
326 // specific to download requests. 327 // specific to download requests.
327 // TODO(ananta) 328 // TODO(ananta)
328 // Look into a better way of passing these parameters in. 329 // Look into a better way of passing these parameters in.
329 // Please note that the InitializeURLRequest() function needs to be called 330 // Please note that the InitializeURLRequest() function needs to be called
330 // called to initialize the request before calling this function. 331 // called to initialize the request before calling this function.
331 void BeginURLRequest(std::unique_ptr<net::URLRequest> request, 332 void BeginURLRequest(std::unique_ptr<net::URLRequest> request,
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 int request_id, 629 int request_id,
629 net::RequestPriority new_priority, 630 net::RequestPriority new_priority,
630 int intra_priority_value); 631 int intra_priority_value);
631 632
632 // Creates ResourceRequestInfoImpl for a download or page save. 633 // Creates ResourceRequestInfoImpl for a download or page save.
633 // |download| should be true if the request is a file download. 634 // |download| should be true if the request is a file download.
634 ResourceRequestInfoImpl* CreateRequestInfo( 635 ResourceRequestInfoImpl* CreateRequestInfo(
635 int child_id, 636 int child_id,
636 int render_view_route_id, 637 int render_view_route_id,
637 int render_frame_route_id, 638 int render_frame_route_id,
639 int previews_state,
638 bool download, 640 bool download,
639 ResourceContext* context); 641 ResourceContext* context);
640 642
641 // Relationship of resource being authenticated with the top level page. 643 // Relationship of resource being authenticated with the top level page.
642 enum HttpAuthRelationType { 644 enum HttpAuthRelationType {
643 HTTP_AUTH_RELATION_TOP, // Top-level page itself 645 HTTP_AUTH_RELATION_TOP, // Top-level page itself
644 HTTP_AUTH_RELATION_SAME_DOMAIN, // Sub-content from same domain 646 HTTP_AUTH_RELATION_SAME_DOMAIN, // Sub-content from same domain
645 HTTP_AUTH_RELATION_BLOCKED_CROSS, // Blocked Sub-content from cross domain 647 HTTP_AUTH_RELATION_BLOCKED_CROSS, // Blocked Sub-content from cross domain
646 HTTP_AUTH_RELATION_ALLOWED_CROSS, // Allowed Sub-content per command line 648 HTTP_AUTH_RELATION_ALLOWED_CROSS, // Allowed Sub-content per command line
647 HTTP_AUTH_RELATION_LAST 649 HTTP_AUTH_RELATION_LAST
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 782
781 // Points to the registered download handler intercept. 783 // Points to the registered download handler intercept.
782 CreateDownloadHandlerIntercept create_download_handler_intercept_; 784 CreateDownloadHandlerIntercept create_download_handler_intercept_;
783 785
784 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 786 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
785 }; 787 };
786 788
787 } // namespace content 789 } // namespace content
788 790
789 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 791 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698