| 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/browser/extensions/extension_service_unittest.h" | 5 #include "chrome/browser/extensions/extension_service_unittest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 if (!appcache_service_) { | 347 if (!appcache_service_) { |
| 348 appcache_service_ = new ChromeAppCacheService(NULL); | 348 appcache_service_ = new ChromeAppCacheService(NULL); |
| 349 if (!BrowserThread::PostTask( | 349 if (!BrowserThread::PostTask( |
| 350 BrowserThread::IO, FROM_HERE, | 350 BrowserThread::IO, FROM_HERE, |
| 351 NewRunnableMethod( | 351 NewRunnableMethod( |
| 352 appcache_service_.get(), | 352 appcache_service_.get(), |
| 353 &ChromeAppCacheService::InitializeOnIOThread, | 353 &ChromeAppCacheService::InitializeOnIOThread, |
| 354 IsOffTheRecord() | 354 IsOffTheRecord() |
| 355 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), | 355 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), |
| 356 &GetResourceContext(), | 356 &GetResourceContext(), |
| 357 make_scoped_refptr(GetExtensionSpecialStoragePolicy()), | 357 make_scoped_refptr(GetExtensionSpecialStoragePolicy())))) |
| 358 false))) | |
| 359 NOTREACHED(); | 358 NOTREACHED(); |
| 360 } | 359 } |
| 361 return appcache_service_; | 360 return appcache_service_; |
| 362 } | 361 } |
| 363 | 362 |
| 364 virtual fileapi::FileSystemContext* GetFileSystemContext() { | 363 virtual fileapi::FileSystemContext* GetFileSystemContext() { |
| 365 if (!file_system_context_) { | 364 if (!file_system_context_) { |
| 366 quota::QuotaManager* quota_manager = GetQuotaManager(); | 365 quota::QuotaManager* quota_manager = GetQuotaManager(); |
| 367 file_system_context_ = CreateFileSystemContext( | 366 file_system_context_ = CreateFileSystemContext( |
| 368 GetPath(), IsOffTheRecord(), | 367 GetPath(), IsOffTheRecord(), |
| (...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3765 ASSERT_FALSE(AddPendingSyncInstall()); | 3764 ASSERT_FALSE(AddPendingSyncInstall()); |
| 3766 | 3765 |
| 3767 // Wait for the external source to install. | 3766 // Wait for the external source to install. |
| 3768 WaitForCrxInstall(crx_path_, true); | 3767 WaitForCrxInstall(crx_path_, true); |
| 3769 ASSERT_TRUE(IsCrxInstalled()); | 3768 ASSERT_TRUE(IsCrxInstalled()); |
| 3770 | 3769 |
| 3771 // Now that the extension is installed, sync request should fail | 3770 // Now that the extension is installed, sync request should fail |
| 3772 // because the extension is already installed. | 3771 // because the extension is already installed. |
| 3773 ASSERT_FALSE(AddPendingSyncInstall()); | 3772 ASSERT_FALSE(AddPendingSyncInstall()); |
| 3774 } | 3773 } |
| OLD | NEW |