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

Side by Side Diff: chrome/browser/chromeos/drive/drive_file_system.cc

Issue 11143014: Add request header on gdata operation for testing ETag match. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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
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/drive/drive_file_system.h" 5 #include "chrome/browser/chromeos/drive/drive_file_system.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 params.mime_type, 1553 params.mime_type,
1554 REGULAR_FILE); 1554 REGULAR_FILE);
1555 return; 1555 return;
1556 } 1556 }
1557 1557
1558 // We have enough disk space. Start downloading the file. 1558 // We have enough disk space. Start downloading the file.
1559 drive_service_->DownloadFile( 1559 drive_service_->DownloadFile(
1560 params.virtual_file_path, 1560 params.virtual_file_path,
1561 params.local_tmp_path, 1561 params.local_tmp_path,
1562 content_url, 1562 content_url,
1563 std::string(), // ETag
1563 base::Bind(&DriveFileSystem::OnFileDownloaded, 1564 base::Bind(&DriveFileSystem::OnFileDownloaded,
1564 ui_weak_ptr_, 1565 ui_weak_ptr_,
1565 params), 1566 params),
1566 params.get_content_callback); 1567 params.get_content_callback);
1567 } 1568 }
1568 1569
1569 void DriveFileSystem::GetEntryInfoByPath(const FilePath& file_path, 1570 void DriveFileSystem::GetEntryInfoByPath(const FilePath& file_path,
1570 const GetEntryInfoCallback& callback) { 1571 const GetEntryInfoCallback& callback) {
1571 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || 1572 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
1572 BrowserThread::CurrentlyOn(BrowserThread::IO)); 1573 BrowserThread::CurrentlyOn(BrowserThread::IO));
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
3019 return; 3020 return;
3020 } 3021 }
3021 3022
3022 PlatformFileInfoProto entry_file_info; 3023 PlatformFileInfoProto entry_file_info;
3023 DriveEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); 3024 DriveEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info);
3024 *entry_proto->mutable_file_info() = entry_file_info; 3025 *entry_proto->mutable_file_info() = entry_file_info;
3025 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); 3026 callback.Run(DRIVE_FILE_OK, entry_proto.Pass());
3026 } 3027 }
3027 3028
3028 } // namespace drive 3029 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698