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

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

Issue 671873004: Migrates legacy packaged app data when it's upgraded to a platform app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses review comments Created 6 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
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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 // Only call the below methods by posting to this TaskRunner. 27 // Only call the below methods by posting to this TaskRunner.
28 virtual base::SequencedTaskRunner* TaskRunner() const = 0; 28 virtual base::SequencedTaskRunner* TaskRunner() const = 0;
29 29
30 // Methods used in response to QuotaManager requests. 30 // Methods used in response to QuotaManager requests.
31 virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() = 0; 31 virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() = 0;
32 virtual int64 GetOriginDiskUsage(const GURL& origin_url) = 0; 32 virtual int64 GetOriginDiskUsage(const GURL& origin_url) = 0;
33 33
34 // Deletes all indexed db files for the given origin. 34 // Deletes all indexed db files for the given origin.
35 virtual void DeleteForOrigin(const GURL& origin_url) = 0; 35 virtual void DeleteForOrigin(const GURL& origin_url) = 0;
36 36
37 // Copies the indexed db files from this context to another. The
38 // indexed db directory in the destination context needs to be empty.
39 virtual void CopyOriginData(const GURL& origin_url,
40 IndexedDBContext* dest_context) = 0;
41
37 // Get the file name of the local storage file for the given origin. 42 // Get the file name of the local storage file for the given origin.
38 virtual base::FilePath GetFilePathForTesting( 43 virtual base::FilePath GetFilePathForTesting(
39 const std::string& origin_id) const = 0; 44 const std::string& origin_id) const = 0;
40 // Set the task runner for tests if browser main loop is not initialized. 45 // Set the task runner for tests if browser main loop is not initialized.
41 virtual void SetTaskRunnerForTesting( 46 virtual void SetTaskRunnerForTesting(
42 base::SequencedTaskRunner* task_runner) = 0; 47 base::SequencedTaskRunner* task_runner) = 0;
43 48
44 protected: 49 protected:
45 friend class base::RefCountedThreadSafe<IndexedDBContext>; 50 friend class base::RefCountedThreadSafe<IndexedDBContext>;
46 virtual ~IndexedDBContext() {} 51 virtual ~IndexedDBContext() {}
47 }; 52 };
48 53
49 } // namespace content 54 } // namespace content
50 55
51 #endif // CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_ 56 #endif // CONTENT_PUBLIC_BROWSER_INDEXED_DB_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698