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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 425653002: content: ResourceType cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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 #include "chrome/browser/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 int render_process_id = -1; 622 int render_process_id = -1;
623 int render_frame_id = -1; 623 int render_frame_id = -1;
624 624
625 // |is_for_blocking_resource| indicates whether the cookies read were for a 625 // |is_for_blocking_resource| indicates whether the cookies read were for a
626 // blocking resource (eg script, css). It is only temporarily added for 626 // blocking resource (eg script, css). It is only temporarily added for
627 // diagnostic purposes, per bug 353678. Will be removed again once data 627 // diagnostic purposes, per bug 353678. Will be removed again once data
628 // collection is finished. 628 // collection is finished.
629 bool is_for_blocking_resource = false; 629 bool is_for_blocking_resource = false;
630 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(&request); 630 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(&request);
631 if (info && ((!info->IsAsync()) || 631 if (info && ((!info->IsAsync()) ||
632 info->GetResourceType() == ResourceType::STYLESHEET || 632 info->GetResourceType() == content::RESOURCE_TYPE_STYLESHEET ||
633 info->GetResourceType() == ResourceType::SCRIPT)) { 633 info->GetResourceType() == content::RESOURCE_TYPE_SCRIPT)) {
634 is_for_blocking_resource = true; 634 is_for_blocking_resource = true;
635 } 635 }
636 636
637 if (content::ResourceRequestInfo::GetRenderFrameForRequest( 637 if (content::ResourceRequestInfo::GetRenderFrameForRequest(
638 &request, &render_process_id, &render_frame_id)) { 638 &request, &render_process_id, &render_frame_id)) {
639 BrowserThread::PostTask( 639 BrowserThread::PostTask(
640 BrowserThread::UI, FROM_HERE, 640 BrowserThread::UI, FROM_HERE,
641 base::Bind(&TabSpecificContentSettings::CookiesRead, 641 base::Bind(&TabSpecificContentSettings::CookiesRead,
642 render_process_id, render_frame_id, 642 render_process_id, render_frame_id,
643 request.url(), request.first_party_for_cookies(), 643 request.url(), request.first_party_for_cookies(),
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 data_reduction_proxy::DataReductionProxyRequestType request_type) { 801 data_reduction_proxy::DataReductionProxyRequestType request_type) {
802 DCHECK_GE(received_content_length, 0); 802 DCHECK_GE(received_content_length, 0);
803 DCHECK_GE(original_content_length, 0); 803 DCHECK_GE(original_content_length, 0);
804 StoreAccumulatedContentLength(received_content_length, 804 StoreAccumulatedContentLength(received_content_length,
805 original_content_length, 805 original_content_length,
806 request_type, 806 request_type,
807 reinterpret_cast<Profile*>(profile_)); 807 reinterpret_cast<Profile*>(profile_));
808 received_content_length_ += received_content_length; 808 received_content_length_ += received_content_length;
809 original_content_length_ += original_content_length; 809 original_content_length_ += original_content_length;
810 } 810 }
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_guest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698