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 3401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3770 ASSERT_FALSE(AddPendingSyncInstall()); | 3769 ASSERT_FALSE(AddPendingSyncInstall()); |
3771 | 3770 |
3772 // Wait for the external source to install. | 3771 // Wait for the external source to install. |
3773 WaitForCrxInstall(crx_path_, true); | 3772 WaitForCrxInstall(crx_path_, true); |
3774 ASSERT_TRUE(IsCrxInstalled()); | 3773 ASSERT_TRUE(IsCrxInstalled()); |
3775 | 3774 |
3776 // Now that the extension is installed, sync request should fail | 3775 // Now that the extension is installed, sync request should fail |
3777 // because the extension is already installed. | 3776 // because the extension is already installed. |
3778 ASSERT_FALSE(AddPendingSyncInstall()); | 3777 ASSERT_FALSE(AddPendingSyncInstall()); |
3779 } | 3778 } |
OLD | NEW |