Chromium Code Reviews| Index: chrome/browser/chromeos/extensions/file_browser_private_api.cc |
| diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc |
| index 825bc6908abb0e1b20fca5bd0c561e0fdcd7aa66..a1a72efe948c6ed5e829737c04a381c7cb85aebc 100644 |
| --- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc |
| +++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc |
| @@ -2128,3 +2128,20 @@ bool GetNetworkConnectionStateFunction::RunImpl() { |
| return true; |
| } |
| + |
| +bool RequestDirectoryRefreshFunction::RunImpl() { |
| + std::string file_url_as_string; |
|
tbarzic
2012/05/18 22:51:12
what if the file is under /gdata/.search/foo/file.
tbarzic
2012/05/18 22:56:13
Alternatively, you could use GetPathForDriveSearch
satorux1
2012/05/18 23:42:19
Per off-line discussion, added a check in GDataFil
|
| + if (!args_->GetString(0, &file_url_as_string)) |
| + return false; |
| + |
| + gdata::GDataSystemService* system_service = |
| + gdata::GDataSystemServiceFactory::GetForProfile(profile_); |
| + if (!system_service || !system_service->file_system()) |
| + return false; |
| + |
| + FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string)); |
|
tbarzic
2012/05/18 22:51:12
extra space after =
satorux1
2012/05/18 23:42:19
Done.
|
| + system_service->file_system()->RequestDirectoryRefresh( |
| + directory_path); |
|
tbarzic
2012/05/18 22:51:12
can't this feed in former line
satorux1
2012/05/18 23:42:19
Done.
|
| + |
| + return true; |
| +} |