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

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

Issue 10836137: gdata: Remove hide_hosted_documents from ReadDirectoryCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments 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/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 d236d1f47cfb29f9c018193e099930d70744a4ef..52565ac3d7e66f78875d728bd8a00fd085da81fe 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
@@ -15,6 +15,9 @@
#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
+#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "webkit/blob/shareable_file_reference.h"
#include "webkit/fileapi/file_system_file_util_proxy.h"
@@ -177,8 +180,10 @@ base::FileUtilProxy::Entry GDataEntryProtoToFileUtilProxyEntry(
// GDataFileSystemProxy class implementation.
GDataFileSystemProxy::GDataFileSystemProxy(
- GDataFileSystemInterface* file_system)
- : file_system_(file_system) {
+ GDataFileSystemInterface* file_system,
+ Profile* profile)
+ : file_system_(file_system),
+ profile_(profile) {
// Should be created from the file browser extension API (AddMountFunction)
// on UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -676,10 +681,13 @@ void GDataFileSystemProxy::OnReadDirectory(
const FileSystemOperationInterface::ReadDirectoryCallback&
callback,
GDataFileError error,
- bool hide_hosted_documents,
scoped_ptr<gdata::GDataEntryProtoVector> proto_entries) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ PrefService* pref_service = profile_->GetPrefs();
+ const bool hide_hosted_documents =
+ pref_service->GetBoolean(prefs::kDisableGDataHostedFiles);
+
if (error != GDATA_FILE_OK) {
callback.Run(util::GDataFileErrorToPlatformError(error),
std::vector<base::FileUtilProxy::Entry>(),
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system_proxy.h ('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