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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_upload_file_info.cc

Issue 10919093: Rename GDataUplaoder to DriveUploader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix after rebase Created 8 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h"
6
7 #include "base/string_number_conversions.h"
8 #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h"
9
10 namespace gdata {
11
12 UploadFileInfo::UploadFileInfo()
13 : upload_id(-1),
14 file_size(0),
15 content_length(0),
16 upload_mode(UPLOAD_INVALID),
17 file_stream(NULL),
18 buf_len(0),
19 start_range(0),
20 end_range(-1),
21 all_bytes_present(false),
22 upload_paused(false),
23 should_retry_file_open(false),
24 num_file_open_tries(0) {
25 }
26
27 UploadFileInfo::~UploadFileInfo() {
28 // The file stream is closed by the destructor asynchronously.
29 if (file_stream) {
30 delete file_stream;
31 file_stream = NULL;
32 }
33 }
34
35 int64 UploadFileInfo::SizeRemaining() const {
36 DCHECK(file_size > end_range);
37 // Note that uploaded_bytes = end_range + 1;
38 return file_size - end_range - 1;
39 }
40
41 std::string UploadFileInfo::DebugString() const {
42 return "title=[" + title +
43 "], file_path=[" + file_path.value() +
44 "], content_type=[" + content_type +
45 "], file_size=[" + base::UintToString(file_size) +
46 "], gdata_path=[" + gdata_path.value() +
47 "]";
48 }
49
50 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_upload_file_info.h ('k') | chrome/browser/chromeos/gdata/gdata_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698