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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 #ifndef CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_
6 #define CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ 6 #define CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 16 matching lines...) Expand all
27 // semantics since a browser context has multiple URLRequestContexts which refer 27 // semantics since a browser context has multiple URLRequestContexts which refer
28 // to the same object, and those URLRequestContexts are refcounted independently 28 // to the same object, and those URLRequestContexts are refcounted independently
29 // of the owning browser context. 29 // of the owning browser context.
30 // 30 //
31 // All methods, except the ctor, are expected to be called on 31 // All methods, except the ctor, are expected to be called on
32 // the IO thread (unless specifically called out in doc comments). 32 // the IO thread (unless specifically called out in doc comments).
33 // 33 //
34 // TODO(dpranke): Fix dependencies on AppCacheService so that we don't have 34 // TODO(dpranke): Fix dependencies on AppCacheService so that we don't have
35 // to worry about clients calling AppCacheService methods. 35 // to worry about clients calling AppCacheService methods.
36 class CONTENT_EXPORT ChromeAppCacheService 36 class CONTENT_EXPORT ChromeAppCacheService
37 : public base::RefCountedThreadSafe<ChromeAppCacheService, 37 : public base::RefCountedThreadSafe<
38 BrowserThread::DeleteOnIOThread>, 38 ChromeAppCacheService, content::BrowserThread::DeleteOnIOThread>,
39 NON_EXPORTED_BASE(public appcache::AppCacheService), 39 NON_EXPORTED_BASE(public appcache::AppCacheService),
40 NON_EXPORTED_BASE(public appcache::AppCachePolicy), 40 NON_EXPORTED_BASE(public appcache::AppCachePolicy),
41 public content::NotificationObserver { 41 public content::NotificationObserver {
42 public: 42 public:
43 explicit ChromeAppCacheService(quota::QuotaManagerProxy* proxy); 43 explicit ChromeAppCacheService(quota::QuotaManagerProxy* proxy);
44 44
45 void InitializeOnIOThread( 45 void InitializeOnIOThread(
46 const FilePath& cache_path, // may be empty to use in-memory structures 46 const FilePath& cache_path, // may be empty to use in-memory structures
47 const content::ResourceContext* resource_context, 47 const content::ResourceContext* resource_context,
48 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); 48 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy);
49 49
50 private: 50 private:
51 friend class base::RefCountedThreadSafe<ChromeAppCacheService, 51 friend class base::RefCountedThreadSafe<
52 BrowserThread::DeleteOnIOThread>; 52 ChromeAppCacheService,
53 friend class BrowserThread; 53 content::BrowserThread::DeleteOnIOThread>;
54 friend class content::BrowserThread;
54 friend class DeleteTask<ChromeAppCacheService>; 55 friend class DeleteTask<ChromeAppCacheService>;
55 56
56 virtual ~ChromeAppCacheService(); 57 virtual ~ChromeAppCacheService();
57 58
58 // AppCachePolicy overrides 59 // AppCachePolicy overrides
59 virtual bool CanLoadAppCache(const GURL& manifest_url, 60 virtual bool CanLoadAppCache(const GURL& manifest_url,
60 const GURL& first_party); 61 const GURL& first_party);
61 virtual bool CanCreateAppCache(const GURL& manifest_url, 62 virtual bool CanCreateAppCache(const GURL& manifest_url,
62 const GURL& first_party); 63 const GURL& first_party);
63 64
64 // content::NotificationObserver override 65 // content::NotificationObserver override
65 virtual void Observe(int type, 66 virtual void Observe(int type,
66 const content::NotificationSource& source, 67 const content::NotificationSource& source,
67 const content::NotificationDetails& details); 68 const content::NotificationDetails& details);
68 69
69 const content::ResourceContext* resource_context_; 70 const content::ResourceContext* resource_context_;
70 content::NotificationRegistrar registrar_; 71 content::NotificationRegistrar registrar_;
71 FilePath cache_path_; 72 FilePath cache_path_;
72 73
73 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); 74 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService);
74 }; 75 };
75 76
76 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ 77 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.cc ('k') | content/browser/appcache/chrome_appcache_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698