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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 9 years 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/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index d9c187670b071cfa3ee175f5c5540cc731fb24c3..c7c31e637ba643b9761483dd98f0ade93739f1d8 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -59,6 +59,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "webkit/database/database_tracker.h"
#include "webkit/fileapi/file_system_context.h"
+#include "webkit/fileapi/file_system_options.h"
#include "webkit/quota/mock_quota_manager.h"
#include "webkit/quota/quota_manager.h"
@@ -125,6 +126,16 @@ ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) {
return new DesktopNotificationService(profile, NULL);
}
+class TestingFileSystemOptions : public fileapi::FileSystemOptions {
+ public:
+ explicit TestingFileSystemOptions(bool is_incognito)
+ : is_incognito_(is_incognito) {}
+ virtual bool is_incognito() const OVERRIDE { return is_incognito_; }
+ virtual bool allow_file_access_from_files() const OVERRIDE { return true; }
+ private:
+ bool is_incognito_;
+};
+
} // namespace
TestingProfile::TestingProfile()
@@ -609,9 +620,7 @@ fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() {
GetExtensionSpecialStoragePolicy(),
NULL,
GetPath(),
- IsOffTheRecord(),
- true, // Allow file access from files.
- NULL);
+ new TestingFileSystemOptions(IsOffTheRecord()));
}
return file_system_context_.get();
}

Powered by Google App Engine
This is Rietveld 408576698