| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/file_system/browser_file_system_context.h" | |
| 6 | |
| 7 #include "base/file_path.h" | |
| 8 #include "base/command_line.h" | |
| 9 #include "chrome/common/chrome_switches.h" | |
| 10 #include "webkit/fileapi/file_system_quota_manager.h" | |
| 11 | |
| 12 BrowserFileSystemContext::BrowserFileSystemContext( | |
| 13 const FilePath& profile_path, bool is_incognito) | |
| 14 : fileapi::SandboxedFileSystemContext( | |
| 15 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | |
| 16 profile_path, | |
| 17 is_incognito, | |
| 18 CommandLine::ForCurrentProcess()->HasSwitch( | |
| 19 switches::kAllowFileAccessFromFiles), | |
| 20 CommandLine::ForCurrentProcess()->HasSwitch( | |
| 21 switches::kUnlimitedQuotaForFiles)) { | |
| 22 } | |
| 23 | |
| 24 void BrowserFileSystemContext::SetOriginQuotaUnlimited(const GURL& url) { | |
| 25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
| 26 quota_manager()->SetOriginQuotaUnlimited(url); | |
| 27 } | |
| 28 | |
| 29 void BrowserFileSystemContext::ResetOriginQuotaUnlimited(const GURL& url) { | |
| 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
| 31 quota_manager()->ResetOriginQuotaUnlimited(url); | |
| 32 } | |
| 33 | |
| 34 BrowserFileSystemContext::~BrowserFileSystemContext() {} | |
| OLD | NEW |