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

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

Issue 7373004: Move the save file code from chrome to content. This is just a file move so the DEPS in content\b... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 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 // Objects that handle file operations for saving files, on the file thread. 5 // Objects that handle file operations for saving files, on the file thread.
6 // 6 //
7 // The SaveFileManager owns a set of SaveFile objects, each of which connects 7 // The SaveFileManager owns a set of SaveFile objects, each of which connects
8 // with a SaveItem object which belongs to one SavePackage and runs on the file 8 // with a SaveItem object which belongs to one SavePackage and runs on the file
9 // thread for saving data in order to avoid disk activity on either network IO 9 // thread for saving data in order to avoid disk activity on either network IO
10 // thread or the UI thread. It coordinates the notifications from the network 10 // thread or the UI thread. It coordinates the notifications from the network
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Render process(stop serializing DOM and sending 48 // Render process(stop serializing DOM and sending
49 // data) 49 // data)
50 // 50 //
51 // 51 //
52 // The SaveFileManager tracks saving requests, mapping from a save ID 52 // The SaveFileManager tracks saving requests, mapping from a save ID
53 // (unique integer created in the IO thread) to the SavePackage for the 53 // (unique integer created in the IO thread) to the SavePackage for the
54 // tab where the saving job was initiated. In the event of a tab closure 54 // tab where the saving job was initiated. In the event of a tab closure
55 // during saving, the SavePackage will notice the SaveFileManage to 55 // during saving, the SavePackage will notice the SaveFileManage to
56 // cancel all SaveFile job. 56 // cancel all SaveFile job.
57 57
58 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H__ 58 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H_
59 #define CHROME_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H__ 59 #define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H_
60 #pragma once 60 #pragma once
61 61
62 #include <string> 62 #include <string>
63 63
64 #include "base/basictypes.h" 64 #include "base/basictypes.h"
65 #include "base/hash_tables.h" 65 #include "base/hash_tables.h"
66 #include "base/memory/ref_counted.h" 66 #include "base/memory/ref_counted.h"
67 #include "chrome/browser/download/save_types.h" 67 #include "content/browser/download/save_types.h"
68 68
69 class FilePath; 69 class FilePath;
70 class GURL; 70 class GURL;
71 class SaveFile; 71 class SaveFile;
72 class SavePackage; 72 class SavePackage;
73 class ResourceDispatcherHost; 73 class ResourceDispatcherHost;
74 class Task; 74 class Task;
75 75
76 namespace content { 76 namespace content {
77 class ResourceContext; 77 class ResourceContext;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // use a hashmap to map the tab id (we actually use render_process_id) to the 245 // use a hashmap to map the tab id (we actually use render_process_id) to the
246 // hashmap since it is possible to save same URL in different tab at 246 // hashmap since it is possible to save same URL in different tab at
247 // same time. 247 // same time.
248 typedef base::hash_map<std::string, SavePackage*> StartingRequestsMap; 248 typedef base::hash_map<std::string, SavePackage*> StartingRequestsMap;
249 typedef base::hash_map<int, StartingRequestsMap> TabToStartingRequestsMap; 249 typedef base::hash_map<int, StartingRequestsMap> TabToStartingRequestsMap;
250 TabToStartingRequestsMap tab_starting_requests_; 250 TabToStartingRequestsMap tab_starting_requests_;
251 251
252 DISALLOW_COPY_AND_ASSIGN(SaveFileManager); 252 DISALLOW_COPY_AND_ASSIGN(SaveFileManager);
253 }; 253 };
254 254
255 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H__ 255 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698