OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 virtual ChromeAppCacheService* GetAppCacheService() { | 377 virtual ChromeAppCacheService* GetAppCacheService() { |
378 if (!appcache_service_) { | 378 if (!appcache_service_) { |
379 appcache_service_ = new ChromeAppCacheService(NULL); | 379 appcache_service_ = new ChromeAppCacheService(NULL); |
380 if (!BrowserThread::PostTask( | 380 if (!BrowserThread::PostTask( |
381 BrowserThread::IO, FROM_HERE, | 381 BrowserThread::IO, FROM_HERE, |
382 base::Bind( | 382 base::Bind( |
383 &ChromeAppCacheService::InitializeOnIOThread, | 383 &ChromeAppCacheService::InitializeOnIOThread, |
384 appcache_service_.get(), | 384 appcache_service_.get(), |
385 IsOffTheRecord() | 385 IsOffTheRecord() |
386 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), | 386 ? FilePath() : GetPath().Append(chrome::kAppCacheDirname), |
387 &GetResourceContext(), | 387 GetResourceContext(), |
388 make_scoped_refptr(GetExtensionSpecialStoragePolicy())))) | 388 make_scoped_refptr(GetExtensionSpecialStoragePolicy())))) |
389 NOTREACHED(); | 389 NOTREACHED(); |
390 } | 390 } |
391 return appcache_service_; | 391 return appcache_service_; |
392 } | 392 } |
393 | 393 |
394 virtual fileapi::FileSystemContext* GetFileSystemContext() { | 394 virtual fileapi::FileSystemContext* GetFileSystemContext() { |
395 if (!file_system_context_) { | 395 if (!file_system_context_) { |
396 quota::QuotaManager* quota_manager = GetQuotaManager(); | 396 quota::QuotaManager* quota_manager = GetQuotaManager(); |
397 file_system_context_ = CreateFileSystemContext( | 397 file_system_context_ = CreateFileSystemContext( |
(...skipping 4390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4788 ASSERT_FALSE(AddPendingSyncInstall()); | 4788 ASSERT_FALSE(AddPendingSyncInstall()); |
4789 | 4789 |
4790 // Wait for the external source to install. | 4790 // Wait for the external source to install. |
4791 WaitForCrxInstall(crx_path_, INSTALL_NEW); | 4791 WaitForCrxInstall(crx_path_, INSTALL_NEW); |
4792 ASSERT_TRUE(IsCrxInstalled()); | 4792 ASSERT_TRUE(IsCrxInstalled()); |
4793 | 4793 |
4794 // Now that the extension is installed, sync request should fail | 4794 // Now that the extension is installed, sync request should fail |
4795 // because the extension is already installed. | 4795 // because the extension is already installed. |
4796 ASSERT_FALSE(AddPendingSyncInstall()); | 4796 ASSERT_FALSE(AddPendingSyncInstall()); |
4797 } | 4797 } |
OLD | NEW |