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

Unified Diff: chrome/browser/chromeos/drive/fake_drive_file_system.cc

Issue 13579005: chromeos: Fix FilePath handling incompatibility between FakeDriveFileSystem::GetEntryInfoByResource… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 7 years, 9 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 | « no previous file | chrome/browser/chromeos/drive/fake_drive_file_system_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/fake_drive_file_system.cc
diff --git a/chrome/browser/chromeos/drive/fake_drive_file_system.cc b/chrome/browser/chromeos/drive/fake_drive_file_system.cc
index afb3cf3bf79fe0c75d9671f91adbdc4d13d0ce4d..21c6ee8f0a564a08641d74c500fad0708a9320cd 100644
--- a/chrome/browser/chromeos/drive/fake_drive_file_system.cc
+++ b/chrome/browser/chromeos/drive/fake_drive_file_system.cc
@@ -397,12 +397,11 @@ void FakeDriveFileSystem::GetEntryInfoByPathAfterGetResourceList(
const ScopedVector<google_apis::ResourceEntry>& entries =
resource_list->entries();
for (size_t i = 0; i < entries.size(); ++i) {
- const google_apis::ResourceEntry& entry = *entries[i];
- if (base::FilePath(entry.title()) == base_name) {
+ scoped_ptr<DriveEntryProto> entry(new DriveEntryProto(
+ ConvertResourceEntryToDriveEntryProto(*entries[i])));
+ if (entry->base_name() == base_name.AsUTF8Unsafe()) {
// Found the target entry.
- scoped_ptr<DriveEntryProto> entry_proto(new DriveEntryProto(
- ConvertResourceEntryToDriveEntryProto(entry)));
- callback.Run(DRIVE_FILE_OK, entry_proto.Pass());
+ callback.Run(DRIVE_FILE_OK, entry.Pass());
return;
}
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/fake_drive_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698