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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 virtual ChromeAppCacheService* GetAppCacheService() { | 345 virtual ChromeAppCacheService* GetAppCacheService() { |
346 if (!appcache_service_) { | 346 if (!appcache_service_) { |
347 appcache_service_ = new ChromeAppCacheService; | 347 appcache_service_ = new ChromeAppCacheService; |
348 if (!BrowserThread::PostTask( | 348 if (!BrowserThread::PostTask( |
349 BrowserThread::IO, FROM_HERE, | 349 BrowserThread::IO, FROM_HERE, |
350 NewRunnableMethod( | 350 NewRunnableMethod( |
351 appcache_service_.get(), | 351 appcache_service_.get(), |
352 &ChromeAppCacheService::InitializeOnIOThread, | 352 &ChromeAppCacheService::InitializeOnIOThread, |
353 IsOffTheRecord() | 353 IsOffTheRecord() |
354 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), | 354 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), |
355 make_scoped_refptr(GetHostContentSettingsMap()), | 355 &GetResourceContext(), |
356 make_scoped_refptr(GetExtensionSpecialStoragePolicy()), | 356 make_scoped_refptr(GetExtensionSpecialStoragePolicy()), |
357 false))) | 357 false))) |
358 NOTREACHED(); | 358 NOTREACHED(); |
359 } | 359 } |
360 return appcache_service_; | 360 return appcache_service_; |
361 } | 361 } |
362 | 362 |
363 virtual fileapi::FileSystemContext* GetFileSystemContext() { | 363 virtual fileapi::FileSystemContext* GetFileSystemContext() { |
364 if (!file_system_context_) | 364 if (!file_system_context_) |
365 file_system_context_ = CreateFileSystemContext( | 365 file_system_context_ = CreateFileSystemContext( |
(...skipping 3429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3795 ASSERT_FALSE(AddPendingSyncInstall()); | 3795 ASSERT_FALSE(AddPendingSyncInstall()); |
3796 | 3796 |
3797 // Wait for the external source to install. | 3797 // Wait for the external source to install. |
3798 WaitForCrxInstall(crx_path_, true); | 3798 WaitForCrxInstall(crx_path_, true); |
3799 ASSERT_TRUE(IsCrxInstalled()); | 3799 ASSERT_TRUE(IsCrxInstalled()); |
3800 | 3800 |
3801 // Now that the extension is installed, sync request should fail | 3801 // Now that the extension is installed, sync request should fail |
3802 // because the extension is already installed. | 3802 // because the extension is already installed. |
3803 ASSERT_FALSE(AddPendingSyncInstall()); | 3803 ASSERT_FALSE(AddPendingSyncInstall()); |
3804 } | 3804 } |
OLD | NEW |