Chromium Code Reviews| Index: chrome/browser/chromeos/drive/drive_file_system_util.cc |
| diff --git a/chrome/browser/chromeos/drive/drive_file_system_util.cc b/chrome/browser/chromeos/drive/drive_file_system_util.cc |
| index 107525bf7665863f7d3ffbc311d7c89b19a1ad9a..cf4d93859f8eb55c7339b32f075edd9c7f90c6e3 100644 |
| --- a/chrome/browser/chromeos/drive/drive_file_system_util.cc |
| +++ b/chrome/browser/chromeos/drive/drive_file_system_util.cc |
| @@ -115,18 +115,16 @@ void OpenEditURLUIThread(Profile* profile, const GURL& edit_url) { |
| void OnGetEntryInfoByResourceId(Profile* profile, |
| const std::string& resource_id, |
| DriveFileError error, |
| - const base::FilePath& /* drive_file_path */, |
| + const base::FilePath& drive_file_path, |
| scoped_ptr<DriveEntryProto> entry_proto) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| if (error != DRIVE_FILE_OK) |
| return; |
| - DCHECK(entry_proto.get()); |
| - const std::string& base_name = entry_proto->base_name(); |
| - const GURL edit_url = GetFileResourceUrl(resource_id, base_name); |
| + const GURL edit_url = GetFileResourceUrl(drive_file_path); |
| OpenEditURLUIThread(profile, edit_url); |
| - DVLOG(1) << "OnFindEntryByResourceId " << edit_url; |
| + DVLOG(1) << "OnGetEntryInfoByResourceId " << edit_url; |
| } |
| } // namespace |
| @@ -179,12 +177,10 @@ const base::FilePath& GetDriveMyDriveMountPointPath() { |
| return drive_mydrive_mount_path; |
| } |
| -GURL GetFileResourceUrl(const std::string& resource_id, |
| - const std::string& file_name) { |
| - std::string url(base::StringPrintf( |
| - "%s:%s", |
| - chrome::kDriveScheme, |
| - net::EscapePath(resource_id).c_str())); |
| +GURL GetFileResourceUrl(const base::FilePath& path) { |
| + std::string url(base::StringPrintf("%s:%s", |
| + chrome::kDriveScheme, |
| + path.AsUTF8Unsafe().c_str())); |
|
kinaba
2013/04/04 08:13:01
Don't we need to, say, net::EscapeUrlEncodedData a
hashimoto
2013/04/04 09:19:33
Oh, I should have tested with files with names con
|
| return GURL(url); |
| } |