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

Unified Diff: chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc

Issue 23694012: drive: Stop using resource ID to access local metadata in GetFileForSavingOpreation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc
index 08918e680de4a20baedc26a6a543847d668bfefb..a234111513df11be9b3b090daaa53ea242ff1df0 100644
--- a/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc
@@ -20,7 +20,7 @@ namespace file_system {
namespace {
-// If OnCacheFileUploadNeededByOperation is called, records the resource ID and
+// If OnCacheFileUploadNeededByOperation is called, records the local ID and
// calls |quit_closure|.
class TestObserver : public OperationObserver {
public:
@@ -28,8 +28,8 @@ class TestObserver : public OperationObserver {
quit_closure_ = quit_closure;
}
- const std::string& observerd_resource_id() const {
- return observed_resource_id_;
+ const std::string& observerd_local_id() const {
+ return observed_local_id_;
}
// OperationObserver overrides.
@@ -37,13 +37,13 @@ class TestObserver : public OperationObserver {
const base::FilePath& path) OVERRIDE {}
virtual void OnCacheFileUploadNeededByOperation(
- const std::string& resource_id) OVERRIDE {
- observed_resource_id_ = resource_id;
+ const std::string& local_id) OVERRIDE {
+ observed_local_id_ = local_id;
quit_closure_.Run();
}
private:
- std::string observed_resource_id_;
+ std::string observed_local_id_;
base::Closure quit_closure_;
};
@@ -93,7 +93,7 @@ TEST_F(GetFileForSavingOperationTest, GetFileForSaving_Exist) {
bool success = false;
FileCacheEntry cache_entry;
cache()->GetCacheEntryOnUIThread(
- src_entry.resource_id(),
+ GetLocalId(drive_path),
google_apis::test_util::CreateCopyResultCallback(&success, &cache_entry));
test_util::RunBlockingPoolTask();
EXPECT_TRUE(success);
@@ -106,7 +106,7 @@ TEST_F(GetFileForSavingOperationTest, GetFileForSaving_Exist) {
observer_.set_quit_closure(run_loop.QuitClosure());
google_apis::test_util::WriteStringToFile(local_path, "hello");
run_loop.Run();
- EXPECT_EQ(entry->resource_id(), observer_.observerd_resource_id());
+ EXPECT_EQ(GetLocalId(drive_path), observer_.observerd_local_id());
}
}
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698