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

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 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/public/browser/content_browser_client.h" 9 #include "content/public/browser/content_browser_client.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 15 matching lines...) Expand all
26 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) { 26 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) {
27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
28 28
29 cache_path_ = cache_path; 29 cache_path_ = cache_path;
30 resource_context_ = resource_context; 30 resource_context_ = resource_context;
31 registrar_.Add( 31 registrar_.Add(
32 this, content::NOTIFICATION_PURGE_MEMORY, 32 this, content::NOTIFICATION_PURGE_MEMORY,
33 content::NotificationService::AllSources()); 33 content::NotificationService::AllSources());
34 34
35 // Init our base class. 35 // Init our base class.
36 Initialize(cache_path_, 36 Initialize(
37 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), 37 cache_path_,
38 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); 38 BrowserThread::GetMessageLoopProxyForThread(
39 BrowserThread::FILE_USER_BLOCKING),
40 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
39 set_appcache_policy(this); 41 set_appcache_policy(this);
40 set_special_storage_policy(special_storage_policy); 42 set_special_storage_policy(special_storage_policy);
41 } 43 }
42 44
43 ChromeAppCacheService::~ChromeAppCacheService() { 45 ChromeAppCacheService::~ChromeAppCacheService() {
44 } 46 }
45 47
46 bool ChromeAppCacheService::CanLoadAppCache(const GURL& manifest_url, 48 bool ChromeAppCacheService::CanLoadAppCache(const GURL& manifest_url,
47 const GURL& first_party) { 49 const GURL& first_party) {
48 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 50 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
(...skipping 10 matching lines...) Expand all
59 } 61 }
60 62
61 void ChromeAppCacheService::Observe( 63 void ChromeAppCacheService::Observe(
62 int type, 64 int type,
63 const content::NotificationSource& source, 65 const content::NotificationSource& source,
64 const content::NotificationDetails& details) { 66 const content::NotificationDetails& details) {
65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
66 DCHECK(type == content::NOTIFICATION_PURGE_MEMORY); 68 DCHECK(type == content::NOTIFICATION_PURGE_MEMORY);
67 PurgeMemory(); 69 PurgeMemory();
68 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/thread_watcher.cc ('k') | content/browser/appcache/chrome_appcache_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698