| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 if (!appcache_service_) { | 330 if (!appcache_service_) { |
| 331 appcache_service_ = new ChromeAppCacheService(NULL); | 331 appcache_service_ = new ChromeAppCacheService(NULL); |
| 332 if (!BrowserThread::PostTask( | 332 if (!BrowserThread::PostTask( |
| 333 BrowserThread::IO, FROM_HERE, | 333 BrowserThread::IO, FROM_HERE, |
| 334 NewRunnableMethod( | 334 NewRunnableMethod( |
| 335 appcache_service_.get(), | 335 appcache_service_.get(), |
| 336 &ChromeAppCacheService::InitializeOnIOThread, | 336 &ChromeAppCacheService::InitializeOnIOThread, |
| 337 IsOffTheRecord() | 337 IsOffTheRecord() |
| 338 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), | 338 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), |
| 339 &GetResourceContext(), | 339 &GetResourceContext(), |
| 340 make_scoped_refptr(GetExtensionSpecialStoragePolicy()), | 340 make_scoped_refptr(GetExtensionSpecialStoragePolicy())))) |
| 341 false))) | |
| 342 NOTREACHED(); | 341 NOTREACHED(); |
| 343 } | 342 } |
| 344 return appcache_service_; | 343 return appcache_service_; |
| 345 } | 344 } |
| 346 | 345 |
| 347 virtual fileapi::FileSystemContext* GetFileSystemContext() { | 346 virtual fileapi::FileSystemContext* GetFileSystemContext() { |
| 348 if (!file_system_context_) { | 347 if (!file_system_context_) { |
| 349 quota::QuotaManager* quota_manager = GetQuotaManager(); | 348 quota::QuotaManager* quota_manager = GetQuotaManager(); |
| 350 file_system_context_ = CreateFileSystemContext( | 349 file_system_context_ = CreateFileSystemContext( |
| 351 GetPath(), IsOffTheRecord(), | 350 GetPath(), IsOffTheRecord(), |
| (...skipping 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3787 ASSERT_FALSE(AddPendingSyncInstall()); | 3786 ASSERT_FALSE(AddPendingSyncInstall()); |
| 3788 | 3787 |
| 3789 // Wait for the external source to install. | 3788 // Wait for the external source to install. |
| 3790 WaitForCrxInstall(crx_path_, true); | 3789 WaitForCrxInstall(crx_path_, true); |
| 3791 ASSERT_TRUE(IsCrxInstalled()); | 3790 ASSERT_TRUE(IsCrxInstalled()); |
| 3792 | 3791 |
| 3793 // Now that the extension is installed, sync request should fail | 3792 // Now that the extension is installed, sync request should fail |
| 3794 // because the extension is already installed. | 3793 // because the extension is already installed. |
| 3795 ASSERT_FALSE(AddPendingSyncInstall()); | 3794 ASSERT_FALSE(AddPendingSyncInstall()); |
| 3796 } | 3795 } |
| OLD | NEW |