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

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

Issue 9947002: Wired preference that hides hosted documents for the directory view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes Created 8 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
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 7300f2e4cfeeace90042cd11b848a8637a51d6c2..0533d91bafcf21fc9ef7f75fe313748ba224d0b7 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
@@ -158,6 +158,7 @@ void GDataFileSystemProxy::ReadDirectory(const GURL& file_url,
file_path,
base::Bind(&GDataFileSystemProxy::OnReadDirectory,
this,
+ file_system_->hide_hosted_documents(),
proxy,
callback));
}
@@ -248,6 +249,7 @@ void GDataFileSystemProxy::OnGetMetadata(
}
void GDataFileSystemProxy::OnReadDirectory(
+ bool hide_hosted_documents,
scoped_refptr<base::MessageLoopProxy> proxy,
const FileSystemOperationInterface::ReadDirectoryCallback& callback,
base::PlatformFileError error,
@@ -271,6 +273,12 @@ void GDataFileSystemProxy::OnReadDirectory(
for (GDataFileCollection::const_iterator iter =
directory->children().begin();
iter != directory->children().end(); ++iter) {
+ if (hide_hosted_documents) {
+ GDataFile* file = iter->second->AsGDataFile();
+ if (file && file->is_hosted_document())
+ continue;
+ }
+
entries.push_back(GDataFileToFileUtilProxyEntry(*(iter->second)));
}
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system_proxy.h ('k') | chrome/browser/chromeos/gdata/mock_gdata_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698