| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSION_DATA_DELETER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| 12 #include "chrome/browser/chrome_thread.h" | 12 #include "chrome/browser/chrome_thread.h" |
| 13 #include "chrome/browser/in_process_webkit/webkit_context.h" | 13 #include "chrome/browser/in_process_webkit/webkit_context.h" |
| 14 #include "chrome/common/net/url_request_context_getter.h" | 14 #include "chrome/common/net/url_request_context_getter.h" |
| 15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 16 #include "webkit/database/database_tracker.h" | 16 #include "webkit/database/database_tracker.h" |
| 17 | 17 |
| 18 class Extension; | |
| 19 class Profile; | 18 class Profile; |
| 20 | 19 |
| 21 // A helper class that takes care of removing local storage, databases and | 20 // A helper class that takes care of removing local storage, databases and |
| 22 // cookies for a given extension. This is used by | 21 // cookies for a given extension. This is used by |
| 23 // ExtensionsService::ClearExtensionData() upon uninstalling an extension. | 22 // ExtensionsService::ClearExtensionData() upon uninstalling an extension. |
| 24 class ExtensionDataDeleter | 23 class ExtensionDataDeleter |
| 25 : public base::RefCountedThreadSafe<ExtensionDataDeleter, | 24 : public base::RefCountedThreadSafe<ExtensionDataDeleter, |
| 26 ChromeThread::DeleteOnUIThread> { | 25 ChromeThread::DeleteOnUIThread> { |
| 27 public: | 26 public: |
| 28 ExtensionDataDeleter(Profile* profile, const GURL& extension_url); | 27 ExtensionDataDeleter(Profile* profile, const GURL& extension_url); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 58 // The security origin identifier for which we're deleting stuff. | 57 // The security origin identifier for which we're deleting stuff. |
| 59 string16 origin_id_; | 58 string16 origin_id_; |
| 60 | 59 |
| 61 // Webkit context for accessing the DOM storage helper. | 60 // Webkit context for accessing the DOM storage helper. |
| 62 scoped_refptr<WebKitContext> webkit_context_; | 61 scoped_refptr<WebKitContext> webkit_context_; |
| 63 | 62 |
| 64 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter); | 63 DISALLOW_COPY_AND_ASSIGN(ExtensionDataDeleter); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ | 66 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DATA_DELETER_H_ |
| OLD | NEW |