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

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

Issue 6995013: More progress towards removing content settings code from the content layer. We can't use Cookie... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and sync Created 9 years, 7 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
« no previous file with comments | « chrome/browser/download/save_file_manager.cc ('k') | chrome/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 class SaveItem; 31 class SaveItem;
32 class SavePackage; 32 class SavePackage;
33 struct SavePackageParam; 33 struct SavePackageParam;
34 class TabContents; 34 class TabContents;
35 35
36 namespace base { 36 namespace base {
37 class Thread; 37 class Thread;
38 class Time; 38 class Time;
39 } 39 }
40 40
41 namespace net {
42 class URLRequestContextGetter;
43 }
44
45 41
46 // The SavePackage object manages the process of saving a page as only-html or 42 // The SavePackage object manages the process of saving a page as only-html or
47 // complete-html and providing the information for displaying saving status. 43 // complete-html and providing the information for displaying saving status.
48 // Saving page as only-html means means that we save web page to a single HTML 44 // Saving page as only-html means means that we save web page to a single HTML
49 // file regardless internal sub resources and sub frames. 45 // file regardless internal sub resources and sub frames.
50 // Saving page as complete-html page means we save not only the main html file 46 // Saving page as complete-html page means we save not only the main html file
51 // the user told it to save but also a directory for the auxiliary files such 47 // the user told it to save but also a directory for the auxiliary files such
52 // as all sub-frame html files, image files, css files and js files. 48 // as all sub-frame html files, image files, css files and js files.
53 // 49 //
54 // Each page saving job may include one or multiple files which need to be 50 // Each page saving job may include one or multiple files which need to be
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 const std::string& contents_mime_type); 253 const std::string& contents_mime_type);
258 254
259 typedef std::queue<SaveItem*> SaveItemQueue; 255 typedef std::queue<SaveItem*> SaveItemQueue;
260 // A queue for items we are about to start saving. 256 // A queue for items we are about to start saving.
261 SaveItemQueue waiting_item_queue_; 257 SaveItemQueue waiting_item_queue_;
262 258
263 typedef base::hash_map<int32, SaveItem*> SavedItemMap; 259 typedef base::hash_map<int32, SaveItem*> SavedItemMap;
264 // saved_success_items_ is map of all saving job which are successfully saved. 260 // saved_success_items_ is map of all saving job which are successfully saved.
265 SavedItemMap saved_success_items_; 261 SavedItemMap saved_success_items_;
266 262
267 // The request context which provides application-specific context for
268 // net::URLRequest instances.
269 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
270
271 // Non-owning pointer for handling file writing on the file thread. 263 // Non-owning pointer for handling file writing on the file thread.
272 SaveFileManager* file_manager_; 264 SaveFileManager* file_manager_;
273 265
274 // We use a fake DownloadItem here in order to reuse the DownloadItemView. 266 // We use a fake DownloadItem here in order to reuse the DownloadItemView.
275 // This class owns the pointer. 267 // This class owns the pointer.
276 DownloadItem* download_; 268 DownloadItem* download_;
277 269
278 // The URL of the page the user wants to save. 270 // The URL of the page the user wants to save.
279 GURL page_url_; 271 GURL page_url_;
280 FilePath saved_main_file_path_; 272 FilePath saved_main_file_path_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 friend class SavePackageTest; 315 friend class SavePackageTest;
324 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); 316 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames);
325 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); 317 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename);
326 318
327 ScopedRunnableMethodFactory<SavePackage> method_factory_; 319 ScopedRunnableMethodFactory<SavePackage> method_factory_;
328 320
329 DISALLOW_COPY_AND_ASSIGN(SavePackage); 321 DISALLOW_COPY_AND_ASSIGN(SavePackage);
330 }; 322 };
331 323
332 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 324 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/save_file_manager.cc ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698