| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/testing_profile.h" | 5 #include "chrome/test/testing_profile.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "content/browser/geolocation/geolocation_permission_context.h" | 52 #include "content/browser/geolocation/geolocation_permission_context.h" |
| 53 #include "content/browser/in_process_webkit/webkit_context.h" | 53 #include "content/browser/in_process_webkit/webkit_context.h" |
| 54 #include "content/browser/mock_resource_context.h" | 54 #include "content/browser/mock_resource_context.h" |
| 55 #include "content/common/notification_service.h" | 55 #include "content/common/notification_service.h" |
| 56 #include "net/base/cookie_monster.h" | 56 #include "net/base/cookie_monster.h" |
| 57 #include "net/url_request/url_request_context.h" | 57 #include "net/url_request/url_request_context.h" |
| 58 #include "net/url_request/url_request_context_getter.h" | 58 #include "net/url_request/url_request_context_getter.h" |
| 59 #include "net/url_request/url_request_test_util.h" | 59 #include "net/url_request/url_request_test_util.h" |
| 60 #include "testing/gmock/include/gmock/gmock.h" | 60 #include "testing/gmock/include/gmock/gmock.h" |
| 61 #include "webkit/database/database_tracker.h" | 61 #include "webkit/database/database_tracker.h" |
| 62 #include "webkit/fileapi/file_system_context.h" |
| 63 #include "webkit/quota/quota_manager.h" |
| 62 | 64 |
| 63 using base::Time; | 65 using base::Time; |
| 64 using testing::NiceMock; | 66 using testing::NiceMock; |
| 65 using testing::Return; | 67 using testing::Return; |
| 66 | 68 |
| 67 namespace { | 69 namespace { |
| 68 | 70 |
| 69 // Task used to make sure history has finished processing a request. Intended | 71 // Task used to make sure history has finished processing a request. Intended |
| 70 // for use with BlockUntilHistoryProcessesPendingRequests. | 72 // for use with BlockUntilHistoryProcessesPendingRequests. |
| 71 | 73 |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 | 509 |
| 508 DownloadManager* TestingProfile::GetDownloadManager() { | 510 DownloadManager* TestingProfile::GetDownloadManager() { |
| 509 return NULL; | 511 return NULL; |
| 510 } | 512 } |
| 511 | 513 |
| 512 PersonalDataManager* TestingProfile::GetPersonalDataManager() { | 514 PersonalDataManager* TestingProfile::GetPersonalDataManager() { |
| 513 return NULL; | 515 return NULL; |
| 514 } | 516 } |
| 515 | 517 |
| 516 fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() { | 518 fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() { |
| 517 return NULL; | 519 if (!file_system_context_) { |
| 520 file_system_context_ = new fileapi::FileSystemContext( |
| 521 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 522 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| 523 GetExtensionSpecialStoragePolicy(), |
| 524 NULL, |
| 525 GetPath(), |
| 526 IsOffTheRecord(), |
| 527 true, // Allow file access from files. |
| 528 true, // Unlimited quota. |
| 529 NULL); |
| 530 } |
| 531 return file_system_context_.get(); |
| 518 } | 532 } |
| 519 | 533 |
| 520 quota::QuotaManager* TestingProfile::GetQuotaManager() { | 534 quota::QuotaManager* TestingProfile::GetQuotaManager() { |
| 521 return NULL; | 535 return NULL; |
| 522 } | 536 } |
| 523 | 537 |
| 524 BrowserSignin* TestingProfile::GetBrowserSignin() { | 538 BrowserSignin* TestingProfile::GetBrowserSignin() { |
| 525 return NULL; | 539 return NULL; |
| 526 } | 540 } |
| 527 | 541 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 } | 790 } |
| 777 | 791 |
| 778 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) | 792 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) |
| 779 : original_profile_(profile) {} | 793 : original_profile_(profile) {} |
| 780 | 794 |
| 781 DerivedTestingProfile::~DerivedTestingProfile() {} | 795 DerivedTestingProfile::~DerivedTestingProfile() {} |
| 782 | 796 |
| 783 ProfileId DerivedTestingProfile::GetRuntimeId() { | 797 ProfileId DerivedTestingProfile::GetRuntimeId() { |
| 784 return original_profile_->GetRuntimeId(); | 798 return original_profile_->GetRuntimeId(); |
| 785 } | 799 } |
| OLD | NEW |