OLD | NEW |
---|---|
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 CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ |
7 | 7 |
8 #include "url/gurl.h" | 8 #include <string> |
9 #include "base/basictypes.h" | |
9 | 10 |
10 class Profile; | 11 class Profile; |
12 class GURL; | |
13 | |
14 namespace content { | |
15 class StoragePartition; | |
16 }; | |
not at google - send to devlin
2014/01/08 18:01:36
no ;
mlamouri (slow - plz ping)
2014/01/08 23:44:08
Done.
| |
11 | 17 |
12 namespace extensions { | 18 namespace extensions { |
13 | 19 |
20 class Extension; | |
21 | |
14 class DataDeleter { | 22 class DataDeleter { |
15 public: | 23 public: |
16 // Starts removing data. The extension should not be running when this is | 24 // Starts removing data. The extension should not be running when this is |
17 // called. Cookies are deleted on the current thread, local storage and | 25 // called. Cookies are deleted on the current thread, local storage and |
18 // databases/settings are deleted asynchronously on the webkit and file | 26 // databases/settings are deleted asynchronously on the webkit and file |
19 // threads, respectively. This function must be called from the UI thread. | 27 // threads, respectively. This function must be called from the UI thread. |
20 static void StartDeleting( | 28 static void StartDeleting(Profile* profile, const Extension* extenion); |
21 Profile* profile, | 29 |
22 const std::string& extension_id, | 30 private: |
23 const GURL& storage_origin); | 31 // Helper function that deletes data of a given |storage_origin| in a given |
32 // |partition|. | |
33 static void DeleteOrigin( | |
34 Profile* profile, | |
35 content::StoragePartition* partition, | |
36 const GURL& origin); | |
24 | 37 |
25 DISALLOW_COPY_AND_ASSIGN(DataDeleter); | 38 DISALLOW_COPY_AND_ASSIGN(DataDeleter); |
26 }; | 39 }; |
27 | 40 |
28 } // namespace extensions | 41 } // namespace extensions |
29 | 42 |
30 #endif // CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ | 43 #endif // CHROME_BROWSER_EXTENSIONS_DATA_DELETER_H_ |
OLD | NEW |