Chromium Code Reviews| Index: chrome/test/testing_profile.cc |
| diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc |
| index e78ee9b9a539831d0c16a5b4c66f0499bf067261..34cc0c367bcf7b723b7d2da4f7c9b4110ce361bb 100644 |
| --- a/chrome/test/testing_profile.cc |
| +++ b/chrome/test/testing_profile.cc |
| @@ -58,6 +58,8 @@ |
| #include "net/url_request/url_request_test_util.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| #include "webkit/database/database_tracker.h" |
| +#include "webkit/fileapi/file_system_context.h" |
| +#include "webkit/quota/quota_manager.h" |
| using base::Time; |
| using testing::NiceMock; |
| @@ -513,11 +515,30 @@ PersonalDataManager* TestingProfile::GetPersonalDataManager() { |
| } |
| fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() { |
| - return NULL; |
| + if (!file_system_context_) |
|
Paweł Hajdan Jr.
2011/05/24 16:30:31
nit: Multi-line "if" body should have braces {}.
Mike West
2011/05/24 16:53:51
Done.
|
| + file_system_context_ = new fileapi::FileSystemContext( |
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| + GetExtensionSpecialStoragePolicy(), |
| + GetQuotaManager()->proxy(), |
| + GetPath(), |
| + IsOffTheRecord(), |
| + true, // Allow file access from files. |
| + true, // Unlimited quota. |
| + NULL); |
| + DCHECK(file_system_context_.get()); |
|
Paweł Hajdan Jr.
2011/05/24 16:30:31
nit: Get rid of this strange DCHECK in testing cod
Mike West
2011/05/24 16:53:51
There are 8 other DCHECKs in this file. I'm happy
Paweł Hajdan Jr.
2011/05/24 17:04:19
No, let's not touch those other DCHECKs for now. I
|
| + return file_system_context_.get(); |
| } |
| quota::QuotaManager* TestingProfile::GetQuotaManager() { |
| - return NULL; |
| + if (!quota_manager_) |
|
Paweł Hajdan Jr.
2011/05/24 16:30:31
nit: Multi-line "if" body should have braces {}.
Mike West
2011/05/24 16:53:51
Done.
|
| + quota_manager_ = new quota::QuotaManager( |
| + IsOffTheRecord(), |
| + GetPath(), |
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)); |
| + DCHECK(quota_manager_.get()); |
|
Paweł Hajdan Jr.
2011/05/24 16:30:31
nit: Get rid of this strange DCHECK in testing cod
|
| + return quota_manager_.get(); |
| } |
| BrowserSignin* TestingProfile::GetBrowserSignin() { |