| 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/drive/fake_drive_service.h" | 5 #include "chrome/browser/drive/fake_drive_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 account_metadata_value_->SetString("entry.gd$quotaBytesUsed.$t", | 271 account_metadata_value_->SetString("entry.gd$quotaBytesUsed.$t", |
| 272 base::Int64ToString16(used)); | 272 base::Int64ToString16(used)); |
| 273 account_metadata_value_->SetString("entry.gd$quotaBytesTotal.$t", | 273 account_metadata_value_->SetString("entry.gd$quotaBytesTotal.$t", |
| 274 base::Int64ToString16(total)); | 274 base::Int64ToString16(total)); |
| 275 } | 275 } |
| 276 | 276 |
| 277 GURL FakeDriveService::GetFakeLinkUrl(const std::string& resource_id) { | 277 GURL FakeDriveService::GetFakeLinkUrl(const std::string& resource_id) { |
| 278 return GURL("https://fake_server/" + net::EscapePath(resource_id)); | 278 return GURL("https://fake_server/" + net::EscapePath(resource_id)); |
| 279 } | 279 } |
| 280 | 280 |
| 281 void FakeDriveService::Initialize() { | 281 void FakeDriveService::Initialize(const std::string& account_id) { |
| 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 283 } | 283 } |
| 284 | 284 |
| 285 void FakeDriveService::AddObserver(DriveServiceObserver* observer) { | 285 void FakeDriveService::AddObserver(DriveServiceObserver* observer) { |
| 286 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 286 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void FakeDriveService::RemoveObserver(DriveServiceObserver* observer) { | 289 void FakeDriveService::RemoveObserver(DriveServiceObserver* observer) { |
| 290 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 290 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 291 } | 291 } |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1663 FROM_HERE, | 1663 FROM_HERE, |
| 1664 base::Bind(callback, HTTP_SUCCESS, base::Passed(&resource_list))); | 1664 base::Bind(callback, HTTP_SUCCESS, base::Passed(&resource_list))); |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 GURL FakeDriveService::GetNewUploadSessionUrl() { | 1667 GURL FakeDriveService::GetNewUploadSessionUrl() { |
| 1668 return GURL("https://upload_session_url/" + | 1668 return GURL("https://upload_session_url/" + |
| 1669 base::Int64ToString(next_upload_sequence_number_++)); | 1669 base::Int64ToString(next_upload_sequence_number_++)); |
| 1670 } | 1670 } |
| 1671 | 1671 |
| 1672 } // namespace drive | 1672 } // namespace drive |
| OLD | NEW |