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

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

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « content/browser/download/save_file_manager.cc ('k') | content/browser/download/save_item.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_ITEM_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_ITEM_H_
6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_ITEM_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_ITEM_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "content/browser/download/save_types.h" 10 #include "content/browser/download/save_types.h"
(...skipping 30 matching lines...) Expand all
41 void Cancel(); 41 void Cancel();
42 42
43 // Saving operation completed. 43 // Saving operation completed.
44 void Finish(int64 size, bool is_success); 44 void Finish(int64 size, bool is_success);
45 45
46 // Rough percent complete, -1 means we don't know (since we didn't receive a 46 // Rough percent complete, -1 means we don't know (since we didn't receive a
47 // total size). 47 // total size).
48 int PercentComplete() const; 48 int PercentComplete() const;
49 49
50 // Update path for SaveItem, the actual file is renamed on the file thread. 50 // Update path for SaveItem, the actual file is renamed on the file thread.
51 void Rename(const FilePath& full_path); 51 void Rename(const base::FilePath& full_path);
52 52
53 void SetSaveId(int32 save_id); 53 void SetSaveId(int32 save_id);
54 54
55 void SetTotalBytes(int64 total_bytes); 55 void SetTotalBytes(int64 total_bytes);
56 56
57 // Accessors. 57 // Accessors.
58 SaveState state() const { return state_; } 58 SaveState state() const { return state_; }
59 const FilePath& full_path() const { return full_path_; } 59 const base::FilePath& full_path() const { return full_path_; }
60 const FilePath& file_name() const { return file_name_; } 60 const base::FilePath& file_name() const { return file_name_; }
61 const GURL& url() const { return url_; } 61 const GURL& url() const { return url_; }
62 const Referrer& referrer() const { return referrer_; } 62 const Referrer& referrer() const { return referrer_; }
63 int64 total_bytes() const { return total_bytes_; } 63 int64 total_bytes() const { return total_bytes_; }
64 int64 received_bytes() const { return received_bytes_; } 64 int64 received_bytes() const { return received_bytes_; }
65 int32 save_id() const { return save_id_; } 65 int32 save_id() const { return save_id_; }
66 bool has_final_name() const { return has_final_name_; } 66 bool has_final_name() const { return has_final_name_; }
67 bool success() const { return is_success_; } 67 bool success() const { return is_success_; }
68 SaveFileCreateInfo::SaveFileSource save_source() const { 68 SaveFileCreateInfo::SaveFileSource save_source() const {
69 return save_source_; 69 return save_source_;
70 } 70 }
71 SavePackage* package() const { return package_; } 71 SavePackage* package() const { return package_; }
72 72
73 private: 73 private:
74 // Internal helper for maintaining consistent received and total sizes. 74 // Internal helper for maintaining consistent received and total sizes.
75 void UpdateSize(int64 size); 75 void UpdateSize(int64 size);
76 76
77 // Request ID assigned by the ResourceDispatcherHost. 77 // Request ID assigned by the ResourceDispatcherHost.
78 int32 save_id_; 78 int32 save_id_;
79 79
80 // Full path to the save item file. 80 // Full path to the save item file.
81 FilePath full_path_; 81 base::FilePath full_path_;
82 82
83 // Short display version of the file. 83 // Short display version of the file.
84 FilePath file_name_; 84 base::FilePath file_name_;
85 85
86 // The URL for this save item. 86 // The URL for this save item.
87 GURL url_; 87 GURL url_;
88 Referrer referrer_; 88 Referrer referrer_;
89 89
90 // Total bytes expected. 90 // Total bytes expected.
91 int64 total_bytes_; 91 int64 total_bytes_;
92 92
93 // Current received bytes. 93 // Current received bytes.
94 int64 received_bytes_; 94 int64 received_bytes_;
(...skipping 11 matching lines...) Expand all
106 106
107 // Our owning object. 107 // Our owning object.
108 SavePackage* package_; 108 SavePackage* package_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(SaveItem); 110 DISALLOW_COPY_AND_ASSIGN(SaveItem);
111 }; 111 };
112 112
113 } // namespace content 113 } // namespace content
114 114
115 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_ITEM_H_ 115 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_ITEM_H_
OLDNEW
« no previous file with comments | « content/browser/download/save_file_manager.cc ('k') | content/browser/download/save_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698