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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc

Issue 10274002: Add gdata content search (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style nits Created 8 years, 7 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/gdata/gdata_file_system_proxy.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
index 992a6949af1f697df5197f31738d41b1f575e97f..2657643d8b64a10e1b64dd3ba8401656b87e26b1 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
@@ -12,9 +12,10 @@
#include "base/string_util.h"
#include "base/values.h"
#include "content/public/browser/browser_thread.h"
+#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata.pb.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
+#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "webkit/blob/shareable_file_reference.h"
#include "webkit/fileapi/file_system_file_util_proxy.h"
#include "webkit/fileapi/file_system_types.h"
@@ -152,6 +153,20 @@ void GDataFileSystemProxy::ReadDirectory(const GURL& file_url,
return;
}
+ // File paths with type GDATA_SEARH_PATH_QUERY are virtual path reserved for
+ // displaying gdata content search results. They are formatted so their base
+ // name equals to search query. So to get their contents, we have to kick off
+ // content search.
+ if (util::GetSearchPathStatus(file_path) == util::GDATA_SEARCH_PATH_QUERY) {
+ file_system_->SearchAsync(
+ file_path.BaseName().value(),
+ base::Bind(&GDataFileSystemProxy::OnReadDirectory,
+ this,
+ file_system_->hide_hosted_documents(),
+ callback));
+ return;
+ }
+
file_system_->ReadDirectoryByPathAsync(
file_path,
base::Bind(&GDataFileSystemProxy::OnReadDirectory,
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698