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

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: Moving test helpers to webkit/appcache. 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
« no previous file with comments | « chrome/browser/browsing_data_remover_unittest.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_remover_unittest.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698