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

Side by Side Diff: content/browser/appcache/chrome_appcache_service.cc

Issue 8366020: Create a secondary file thread, FILE_USER_BLOCKING... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 "content/browser/appcache/chrome_appcache_service.h" 5 #include "content/browser/appcache/chrome_appcache_service.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "content/common/notification_service.h" 9 #include "content/common/notification_service.h"
10 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 13 matching lines...) Expand all
24 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) { 24 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) {
25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
26 26
27 cache_path_ = cache_path; 27 cache_path_ = cache_path;
28 resource_context_ = resource_context; 28 resource_context_ = resource_context;
29 registrar_.Add( 29 registrar_.Add(
30 this, content::NOTIFICATION_PURGE_MEMORY, 30 this, content::NOTIFICATION_PURGE_MEMORY,
31 NotificationService::AllSources()); 31 NotificationService::AllSources());
32 32
33 // Init our base class. 33 // Init our base class.
34 Initialize(cache_path_, 34 Initialize(
35 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), 35 cache_path_,
36 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); 36 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::APPCACHE),
37 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
37 set_appcache_policy(this); 38 set_appcache_policy(this);
38 set_special_storage_policy(special_storage_policy); 39 set_special_storage_policy(special_storage_policy);
39 } 40 }
40 41
41 ChromeAppCacheService::~ChromeAppCacheService() { 42 ChromeAppCacheService::~ChromeAppCacheService() {
42 } 43 }
43 44
44 bool ChromeAppCacheService::CanLoadAppCache(const GURL& manifest_url, 45 bool ChromeAppCacheService::CanLoadAppCache(const GURL& manifest_url,
45 const GURL& first_party) { 46 const GURL& first_party) {
46 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 47 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
(...skipping 10 matching lines...) Expand all
57 } 58 }
58 59
59 void ChromeAppCacheService::Observe( 60 void ChromeAppCacheService::Observe(
60 int type, 61 int type,
61 const content::NotificationSource& source, 62 const content::NotificationSource& source,
62 const content::NotificationDetails& details) { 63 const content::NotificationDetails& details) {
63 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 64 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
64 DCHECK(type == content::NOTIFICATION_PURGE_MEMORY); 65 DCHECK(type == content::NOTIFICATION_PURGE_MEMORY);
65 PurgeMemory(); 66 PurgeMemory();
66 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698