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

Side by Side Diff: content/public/browser/indexed_db_context.h

Issue 10069054: RefCounted types should not have public destructors, content/ remaining bits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to Trunk Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace base { 17 namespace base {
18 class Time; 18 class Time;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 22
23 // Represents the per-BrowserContext IndexedDB data. 23 // Represents the per-BrowserContext IndexedDB data.
24 // Call these methods only on the WebKit thread. 24 // Call these methods only on the WebKit thread.
25 class IndexedDBContext : public base::RefCountedThreadSafe<IndexedDBContext> { 25 class IndexedDBContext : public base::RefCountedThreadSafe<IndexedDBContext> {
26 public: 26 public:
27 virtual ~IndexedDBContext() {}
28
29 // Methods used in response to QuotaManager requests. 27 // Methods used in response to QuotaManager requests.
30 virtual std::vector<GURL> GetAllOrigins() = 0; 28 virtual std::vector<GURL> GetAllOrigins() = 0;
31 virtual int64 GetOriginDiskUsage(const GURL& origin_url) = 0; 29 virtual int64 GetOriginDiskUsage(const GURL& origin_url) = 0;
32 virtual base::Time GetOriginLastModified(const GURL& origin_url) = 0; 30 virtual base::Time GetOriginLastModified(const GURL& origin_url) = 0;
33 31
34 // Deletes all indexed db files for the given origin. 32 // Deletes all indexed db files for the given origin.
35 virtual void DeleteForOrigin(const GURL& origin_url) = 0; 33 virtual void DeleteForOrigin(const GURL& origin_url) = 0;
36 34
37 // Get the file name of the local storage file for the given origin. 35 // Get the file name of the local storage file for the given origin.
38 virtual FilePath GetFilePathForTesting(const string16& origin_id) const = 0; 36 virtual FilePath GetFilePathForTesting(const string16& origin_id) const = 0;
37
38 protected:
39 friend class base::RefCountedThreadSafe<IndexedDBContext>;
40 virtual ~IndexedDBContext() {}
39 }; 41 };
40 42
41 } // namespace content 43 } // namespace content
42 44
43 #endif // CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_ 45 #endif // CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_manager.h ('k') | content/public/browser/resource_dispatcher_host_login_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698