OLD | NEW |
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 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return "ods"; | 52 return "ods"; |
53 case TSV: | 53 case TSV: |
54 return "tsv"; | 54 return "tsv"; |
55 default: | 55 default: |
56 return "pdf"; | 56 return "pdf"; |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 | 61 |
| 62 ResumeUploadResponse::ResumeUploadResponse(GDataErrorCode code, |
| 63 int64 start_range_received, |
| 64 int64 end_range_received) |
| 65 : code(code), |
| 66 start_range_received(start_range_received), |
| 67 end_range_received(end_range_received) { |
| 68 } |
| 69 |
| 70 ResumeUploadResponse::~ResumeUploadResponse() { |
| 71 } |
| 72 |
| 73 InitiateUploadParams::InitiateUploadParams( |
| 74 UploadMode upload_mode, |
| 75 const std::string& title, |
| 76 const std::string& content_type, |
| 77 int64 content_length, |
| 78 const GURL& upload_location, |
| 79 const FilePath& virtual_path) |
| 80 : upload_mode(upload_mode), |
| 81 title(title), |
| 82 content_type(content_type), |
| 83 content_length(content_length), |
| 84 upload_location(upload_location), |
| 85 virtual_path(virtual_path) { |
| 86 } |
| 87 |
| 88 InitiateUploadParams::~InitiateUploadParams() { |
| 89 } |
| 90 |
| 91 ResumeUploadParams::ResumeUploadParams( |
| 92 UploadMode upload_mode, |
| 93 int64 start_range, |
| 94 int64 end_range, |
| 95 int64 content_length, |
| 96 const std::string& content_type, |
| 97 scoped_refptr<net::IOBuffer> buf, |
| 98 const GURL& upload_location, |
| 99 const FilePath& virtual_path) : upload_mode(upload_mode), |
| 100 start_range(start_range), |
| 101 end_range(end_range), |
| 102 content_length(content_length), |
| 103 content_type(content_type), |
| 104 buf(buf), |
| 105 upload_location(upload_location), |
| 106 virtual_path(virtual_path) { |
| 107 } |
| 108 |
| 109 ResumeUploadParams::~ResumeUploadParams() { |
| 110 } |
| 111 |
62 DocumentsService::DocumentsService() | 112 DocumentsService::DocumentsService() |
63 : profile_(NULL), | 113 : profile_(NULL), |
64 runner_(NULL) { | 114 runner_(NULL) { |
65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 115 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
66 } | 116 } |
67 | 117 |
68 DocumentsService::~DocumentsService() { | 118 DocumentsService::~DocumentsService() { |
69 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 119 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
70 } | 120 } |
71 | 121 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 return runner_->auth_service()->HasAccessToken(); | 345 return runner_->auth_service()->HasAccessToken(); |
296 } | 346 } |
297 | 347 |
298 bool DocumentsService::HasRefreshToken() const { | 348 bool DocumentsService::HasRefreshToken() const { |
299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 349 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
300 | 350 |
301 return runner_->auth_service()->HasRefreshToken(); | 351 return runner_->auth_service()->HasRefreshToken(); |
302 } | 352 } |
303 | 353 |
304 } // namespace gdata | 354 } // namespace gdata |
OLD | NEW |