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

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

Issue 1484093002: Allowing multiple SaveItems to have same URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nested-frames-more-involved-fix
Patch Set: Rebasing... Created 5 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 // 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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 // The ResourceDispatcherHost may have already been shut down. 1686 // The ResourceDispatcherHost may have already been shut down.
1687 // See http://crbug.com/455098 1687 // See http://crbug.com/455098
1688 if (!scheduler_) 1688 if (!scheduler_)
1689 return; 1689 return;
1690 scheduler_->OnAudibilityChanged(child_id, route_id, is_playing); 1690 scheduler_->OnAudibilityChanged(child_id, route_id, is_playing);
1691 } 1691 }
1692 1692
1693 // This function is only used for saving feature. 1693 // This function is only used for saving feature.
1694 void ResourceDispatcherHostImpl::BeginSaveFile(const GURL& url, 1694 void ResourceDispatcherHostImpl::BeginSaveFile(const GURL& url,
1695 const Referrer& referrer, 1695 const Referrer& referrer,
1696 int save_item_id,
1696 int save_package_id, 1697 int save_package_id,
1697 int child_id, 1698 int child_id,
1698 int render_view_route_id, 1699 int render_view_route_id,
1699 int render_frame_route_id, 1700 int render_frame_route_id,
1700 ResourceContext* context) { 1701 ResourceContext* context) {
1701 if (is_shutdown_) 1702 if (is_shutdown_)
1702 return; 1703 return;
1703 1704
1704 // http://crbug.com/90971 1705 // http://crbug.com/90971
1705 char url_buf[128]; 1706 char url_buf[128];
(...skipping 23 matching lines...) Expand all
1729 // future, maybe we can use a configuration to configure this behavior. 1730 // future, maybe we can use a configuration to configure this behavior.
1730 request->SetLoadFlags(net::LOAD_PREFERRING_CACHE); 1731 request->SetLoadFlags(net::LOAD_PREFERRING_CACHE);
1731 1732
1732 // Since we're just saving some resources we need, disallow downloading. 1733 // Since we're just saving some resources we need, disallow downloading.
1733 ResourceRequestInfoImpl* extra_info = 1734 ResourceRequestInfoImpl* extra_info =
1734 CreateRequestInfo(child_id, render_view_route_id, 1735 CreateRequestInfo(child_id, render_view_route_id,
1735 render_frame_route_id, false, context); 1736 render_frame_route_id, false, context);
1736 extra_info->AssociateWithRequest(request.get()); // Request takes ownership. 1737 extra_info->AssociateWithRequest(request.get()); // Request takes ownership.
1737 1738
1738 scoped_ptr<ResourceHandler> handler(new SaveFileResourceHandler( 1739 scoped_ptr<ResourceHandler> handler(new SaveFileResourceHandler(
1739 request.get(), save_package_id, child_id, render_frame_route_id, url, 1740 request.get(), save_item_id, save_package_id, child_id,
1740 save_file_manager_.get())); 1741 render_frame_route_id, url, save_file_manager_.get()));
1741 1742
1742 BeginRequestInternal(request.Pass(), handler.Pass()); 1743 BeginRequestInternal(request.Pass(), handler.Pass());
1743 } 1744 }
1744 1745
1745 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation( 1746 void ResourceDispatcherHostImpl::MarkAsTransferredNavigation(
1746 const GlobalRequestID& id) { 1747 const GlobalRequestID& id) {
1747 GetLoader(id)->MarkAsTransferring(); 1748 GetLoader(id)->MarkAsTransferring();
1748 } 1749 }
1749 1750
1750 void ResourceDispatcherHostImpl::CancelTransferringNavigation( 1751 void ResourceDispatcherHostImpl::CancelTransferringNavigation(
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2439 load_flags |= net::LOAD_PREFETCH; 2440 load_flags |= net::LOAD_PREFETCH;
2440 } 2441 }
2441 2442
2442 if (is_sync_load) 2443 if (is_sync_load)
2443 load_flags |= net::LOAD_IGNORE_LIMITS; 2444 load_flags |= net::LOAD_IGNORE_LIMITS;
2444 2445
2445 return load_flags; 2446 return load_flags;
2446 } 2447 }
2447 2448
2448 } // namespace content 2449 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698