| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "content/browser/geolocation/geolocation_permission_context.h" | 51 #include "content/browser/geolocation/geolocation_permission_context.h" |
| 52 #include "content/browser/in_process_webkit/webkit_context.h" | 52 #include "content/browser/in_process_webkit/webkit_context.h" |
| 53 #include "content/browser/mock_resource_context.h" | 53 #include "content/browser/mock_resource_context.h" |
| 54 #include "content/common/notification_service.h" | 54 #include "content/common/notification_service.h" |
| 55 #include "net/base/cookie_monster.h" | 55 #include "net/base/cookie_monster.h" |
| 56 #include "net/url_request/url_request_context.h" | 56 #include "net/url_request/url_request_context.h" |
| 57 #include "net/url_request/url_request_context_getter.h" | 57 #include "net/url_request/url_request_context_getter.h" |
| 58 #include "net/url_request/url_request_test_util.h" | 58 #include "net/url_request/url_request_test_util.h" |
| 59 #include "testing/gmock/include/gmock/gmock.h" | 59 #include "testing/gmock/include/gmock/gmock.h" |
| 60 #include "webkit/database/database_tracker.h" | 60 #include "webkit/database/database_tracker.h" |
| 61 #include "webkit/fileapi/file_system_context.h" |
| 62 #include "webkit/quota/quota_manager.h" |
| 61 | 63 |
| 62 using base::Time; | 64 using base::Time; |
| 63 using testing::NiceMock; | 65 using testing::NiceMock; |
| 64 using testing::Return; | 66 using testing::Return; |
| 65 | 67 |
| 66 namespace { | 68 namespace { |
| 67 | 69 |
| 68 // Task used to make sure history has finished processing a request. Intended | 70 // Task used to make sure history has finished processing a request. Intended |
| 69 // for use with BlockUntilHistoryProcessesPendingRequests. | 71 // for use with BlockUntilHistoryProcessesPendingRequests. |
| 70 | 72 |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 508 |
| 507 DownloadManager* TestingProfile::GetDownloadManager() { | 509 DownloadManager* TestingProfile::GetDownloadManager() { |
| 508 return NULL; | 510 return NULL; |
| 509 } | 511 } |
| 510 | 512 |
| 511 PersonalDataManager* TestingProfile::GetPersonalDataManager() { | 513 PersonalDataManager* TestingProfile::GetPersonalDataManager() { |
| 512 return NULL; | 514 return NULL; |
| 513 } | 515 } |
| 514 | 516 |
| 515 fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() { | 517 fileapi::FileSystemContext* TestingProfile::GetFileSystemContext() { |
| 516 return NULL; | 518 if (!file_system_context_) { |
| 519 file_system_context_ = new fileapi::FileSystemContext( |
| 520 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 521 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| 522 GetExtensionSpecialStoragePolicy(), |
| 523 NULL, |
| 524 GetPath(), |
| 525 IsOffTheRecord(), |
| 526 true, // Allow file access from files. |
| 527 true, // Unlimited quota. |
| 528 NULL); |
| 529 } |
| 530 return file_system_context_.get(); |
| 517 } | 531 } |
| 518 | 532 |
| 519 quota::QuotaManager* TestingProfile::GetQuotaManager() { | 533 quota::QuotaManager* TestingProfile::GetQuotaManager() { |
| 520 return NULL; | 534 return NULL; |
| 521 } | 535 } |
| 522 | 536 |
| 523 BrowserSignin* TestingProfile::GetBrowserSignin() { | 537 BrowserSignin* TestingProfile::GetBrowserSignin() { |
| 524 return NULL; | 538 return NULL; |
| 525 } | 539 } |
| 526 | 540 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 } | 787 } |
| 774 | 788 |
| 775 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) | 789 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) |
| 776 : original_profile_(profile) {} | 790 : original_profile_(profile) {} |
| 777 | 791 |
| 778 DerivedTestingProfile::~DerivedTestingProfile() {} | 792 DerivedTestingProfile::~DerivedTestingProfile() {} |
| 779 | 793 |
| 780 ProfileId DerivedTestingProfile::GetRuntimeId() { | 794 ProfileId DerivedTestingProfile::GetRuntimeId() { |
| 781 return original_profile_->GetRuntimeId(); | 795 return original_profile_->GetRuntimeId(); |
| 782 } | 796 } |
| OLD | NEW |