Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 7210006: AppCaches which belong to hosted apps are not protected from deletion (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Test beautification. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698