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

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

Issue 1045593002: Remove LOAD_IS_DOWNLOAD network load flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 5 years, 8 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
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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 const GURL& url = request->original_url(); 606 const GURL& url = request->original_url();
607 607
608 // http://crbug.com/90971 608 // http://crbug.com/90971
609 char url_buf[128]; 609 char url_buf[128];
610 base::strlcpy(url_buf, url.spec().c_str(), arraysize(url_buf)); 610 base::strlcpy(url_buf, url.spec().c_str(), arraysize(url_buf));
611 base::debug::Alias(url_buf); 611 base::debug::Alias(url_buf);
612 CHECK(ContainsKey(active_resource_contexts_, context)); 612 CHECK(ContainsKey(active_resource_contexts_, context));
613 613
614 SetReferrerForRequest(request.get(), referrer); 614 SetReferrerForRequest(request.get(), referrer);
615 615
616 int extra_load_flags = net::LOAD_IS_DOWNLOAD; 616 int extra_load_flags = net::LOAD_NORMAL;
617 if (prefer_cache) { 617 if (prefer_cache) {
618 // If there is upload data attached, only retrieve from cache because there 618 // If there is upload data attached, only retrieve from cache because there
619 // is no current mechanism to prompt the user for their consent for a 619 // is no current mechanism to prompt the user for their consent for a
620 // re-post. For GETs, try to retrieve data from the cache and skip 620 // re-post. For GETs, try to retrieve data from the cache and skip
621 // validating the entry if present. 621 // validating the entry if present.
622 if (request->get_upload() != NULL) 622 if (request->get_upload() != NULL)
623 extra_load_flags |= net::LOAD_ONLY_FROM_CACHE; 623 extra_load_flags |= net::LOAD_ONLY_FROM_CACHE;
624 else 624 else
625 extra_load_flags |= net::LOAD_PREFERRING_CACHE; 625 extra_load_flags |= net::LOAD_PREFERRING_CACHE;
626 } else { 626 } else {
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 2344
2345 // Add a flag to selectively bypass the data reduction proxy if the resource 2345 // Add a flag to selectively bypass the data reduction proxy if the resource
2346 // type is not an image. 2346 // type is not an image.
2347 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2347 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2348 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2348 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2349 2349
2350 return load_flags; 2350 return load_flags;
2351 } 2351 }
2352 2352
2353 } // namespace content 2353 } // namespace content
OLDNEW
« no previous file with comments | « components/policy/core/common/cloud/external_policy_data_fetcher.cc ('k') | net/base/load_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698