Re-enable index-basics-workers test to see if still times
[chromium-blink-merge.git] / content / public / browser / indexed_db_context.h
blobce3c2c67fa14d9e7640f32a4abd96a38b83c0661
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h"
13 #include "content/common/content_export.h"
14 #include "content/public/browser/indexed_db_info.h"
16 namespace content {
18 // Represents the per-BrowserContext IndexedDB data.
19 // Call these methods only on the WebKit thread.
20 class IndexedDBContext : public base::RefCountedThreadSafe<IndexedDBContext> {
21 public:
22 // Methods used in response to QuotaManager requests.
23 virtual std::vector<GURL> GetAllOrigins() = 0;
24 virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() = 0;
25 virtual int64 GetOriginDiskUsage(const GURL& origin_url) = 0;
26 virtual base::Time GetOriginLastModified(const GURL& origin_url) = 0;
28 // Deletes all indexed db files for the given origin.
29 virtual void DeleteForOrigin(const GURL& origin_url) = 0;
31 // Get the file name of the local storage file for the given origin.
32 virtual base::FilePath GetFilePathForTesting(
33 const string16& origin_id) const = 0;
35 protected:
36 friend class base::RefCountedThreadSafe<IndexedDBContext>;
37 virtual ~IndexedDBContext() {}
40 } // namespace content
42 #endif // CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_