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

Side by Side Diff: content/browser/download/save_package.h

Issue 1422473004: Vector-of-structs (instead of struct-of-vectors) in "savable resources" IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page-serialization-original-url-yay
Patch Set: Rebasing... Created 5 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
« no previous file with comments | « no previous file | content/browser/download/save_package.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 17 matching lines...) Expand all
28 #include "net/base/net_errors.h" 28 #include "net/base/net_errors.h"
29 #include "url/gurl.h" 29 #include "url/gurl.h"
30 30
31 class GURL; 31 class GURL;
32 32
33 namespace content { 33 namespace content {
34 class DownloadItemImpl; 34 class DownloadItemImpl;
35 class DownloadManagerImpl; 35 class DownloadManagerImpl;
36 class FrameTreeNode; 36 class FrameTreeNode;
37 class RenderFrameHostImpl; 37 class RenderFrameHostImpl;
38 struct SavableSubframe;
38 class SaveFileManager; 39 class SaveFileManager;
39 class SaveItem; 40 class SaveItem;
40 class SavePackage; 41 class SavePackage;
41 class WebContents; 42 class WebContents;
42 43
43 // The SavePackage object manages the process of saving a page as only-html or 44 // The SavePackage object manages the process of saving a page as only-html or
44 // complete-html or MHTML and providing the information for displaying saving 45 // complete-html or MHTML and providing the information for displaying saving
45 // status. Saving page as only-html means means that we save web page to a 46 // status. Saving page as only-html means means that we save web page to a
46 // single HTML file regardless internal sub resources and sub frames. Saving 47 // single HTML file regardless internal sub resources and sub frames. Saving
47 // page as complete-html page means we save not only the main html file the user 48 // page as complete-html page means we save not only the main html file the user
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void GetSavableResourceLinks(); 194 void GetSavableResourceLinks();
194 195
195 // Asks a given frame for its savable resources. 196 // Asks a given frame for its savable resources.
196 void GetSavableResourceLinksForFrame(RenderFrameHost* target); 197 void GetSavableResourceLinksForFrame(RenderFrameHost* target);
197 198
198 // Response from |sender| frame to GetSavableResourceLinksForFrame request. 199 // Response from |sender| frame to GetSavableResourceLinksForFrame request.
199 void OnSavableResourceLinksResponse( 200 void OnSavableResourceLinksResponse(
200 RenderFrameHostImpl* sender, 201 RenderFrameHostImpl* sender,
201 const std::vector<GURL>& resources_list, 202 const std::vector<GURL>& resources_list,
202 const Referrer& referrer, 203 const Referrer& referrer,
203 const std::vector<GURL>& subframe_original_urls, 204 const std::vector<SavableSubframe>& subframes);
204 const std::vector<int>& subframe_routing_ids);
205 205
206 // Helper for finding or creating a SaveItem with the given parameters. 206 // Helper for finding or creating a SaveItem with the given parameters.
207 SaveItem* FindOrCreatePendingSaveItem( 207 SaveItem* FindOrCreatePendingSaveItem(
208 int container_frame_tree_node_id, 208 int container_frame_tree_node_id,
209 const GURL& url, 209 const GURL& url,
210 const Referrer& referrer, 210 const Referrer& referrer,
211 SaveFileCreateInfo::SaveFileSource save_source); 211 SaveFileCreateInfo::SaveFileSource save_source);
212 212
213 // Helper to enqueue a savable resource reported by 213 // Helper to enqueue a savable resource reported by
214 // GetSavableResourceLinksForFrame. 214 // GetSavableResourceLinksForFrame.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 friend class SavePackageTest; 408 friend class SavePackageTest;
409 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); 409 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames);
410 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); 410 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename);
411 411
412 DISALLOW_COPY_AND_ASSIGN(SavePackage); 412 DISALLOW_COPY_AND_ASSIGN(SavePackage);
413 }; 413 };
414 414
415 } // namespace content 415 } // namespace content
416 416
417 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 417 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698