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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10837091: Drive: Adds clearDriveCache API to file_browser_private. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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 c52d35102109abd52c973e15721189a0a5101252..edf20d8bb6d6f47fbd7b9ae8a2f59c1f7c8d0023 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -2381,6 +2381,20 @@ void SearchDriveFunction::OnSearch(
SendResponse(true);
}
+bool ClearDriveCacheFunction::RunImpl() {
+ gdata::GDataSystemService* system_service =
+ gdata::GDataSystemServiceFactory::GetForProfile(profile_);
+ // |system_service| is NULL if incognito window / guest login.
+ if (!system_service || !system_service->file_system())
+ return false;
+
+ // TODO(yoshiki): Receive a callback from JS-side and pass it to ClearCache().
satorux1 2012/08/03 17:54:21 Please file a bug that describes the plan and add
yoshiki 2012/08/03 20:09:48 Done.
+ system_service->ClearCache(base::Callback<void(bool)>());
+
+ SendResponse(true);
+ return true;
+}
+
bool GetNetworkConnectionStateFunction::RunImpl() {
chromeos::NetworkLibrary* network_library =
chromeos::CrosLibrary::Get()->GetNetworkLibrary();

Powered by Google App Engine
This is Rietveld 408576698