diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 10:17:12 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 10:17:12 +0000 |
commit | 72cbd32707a2ede460bcc1b3cb199e653282a8ed (patch) | |
tree | d212d36fbd064fd4b8c5783a9002f235c98d7a2d /net/base/upload_data.h | |
parent | 2fe25aac3d317086338a761e3b040cbcffc3a873 (diff) | |
download | chromium_src-72cbd32707a2ede460bcc1b3cb199e653282a8ed.zip chromium_src-72cbd32707a2ede460bcc1b3cb199e653282a8ed.tar.gz chromium_src-72cbd32707a2ede460bcc1b3cb199e653282a8ed.tar.bz2 |
Switching things to FilePath:
Remove following deprecated wstring-using functions:
net/net_util: FilePathToFileURL
net/net_util: FileURLToFilePath
Switch net/base/upload_data to FilePath.
Switch upload-related parts of net/url_request/url_request to FilePath.
Made necessary adjustments in rest of code (a lot).
Review URL: http://codereview.chromium.org/63011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/upload_data.h')
-rw-r--r-- | net/base/upload_data.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/base/upload_data.h b/net/base/upload_data.h index 231b40b..56a1339 100644 --- a/net/base/upload_data.h +++ b/net/base/upload_data.h @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/file_path.h" #include "base/ref_counted.h" namespace net { @@ -29,7 +30,7 @@ class UploadData : public base::RefCounted<UploadData> { Type type() const { return type_; } const std::vector<char>& bytes() const { return bytes_; } - const std::wstring& file_path() const { return file_path_; } + const FilePath& file_path() const { return file_path_; } uint64 file_range_offset() const { return file_range_offset_; } uint64 file_range_length() const { return file_range_length_; } @@ -38,11 +39,11 @@ class UploadData : public base::RefCounted<UploadData> { bytes_.assign(bytes, bytes + bytes_len); } - void SetToFilePath(const std::wstring& path) { + void SetToFilePath(const FilePath& path) { SetToFilePathRange(path, 0, kuint64max); } - void SetToFilePathRange(const std::wstring& path, + void SetToFilePathRange(const FilePath& path, uint64 offset, uint64 length) { type_ = TYPE_FILE; file_path_ = path; @@ -57,7 +58,7 @@ class UploadData : public base::RefCounted<UploadData> { private: Type type_; std::vector<char> bytes_; - std::wstring file_path_; + FilePath file_path_; uint64 file_range_offset_; uint64 file_range_length_; }; @@ -69,12 +70,12 @@ class UploadData : public base::RefCounted<UploadData> { } } - void AppendFile(const std::wstring& file_path) { + void AppendFile(const FilePath& file_path) { elements_.push_back(Element()); elements_.back().SetToFilePath(file_path); } - void AppendFileRange(const std::wstring& file_path, + void AppendFileRange(const FilePath& file_path, uint64 offset, uint64 length) { elements_.push_back(Element()); elements_.back().SetToFilePathRange(file_path, offset, length); |