Chromium Code Reviews| 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 CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_ | 6 #define CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
|
viettrungluu
2012/04/11 02:48:10
Eh?
(Though I still wonder where base::Time is co
| |
| 13 #include "content/public/browser/plugin_data_remover.h" | 14 #include "content/public/browser/plugin_data_remover.h" |
| 14 | 15 |
| 15 class CONTENT_EXPORT PluginDataRemoverImpl : public content::PluginDataRemover { | 16 namespace content { |
| 17 | |
| 18 class CONTENT_EXPORT PluginDataRemoverImpl : public PluginDataRemover { | |
| 16 public: | 19 public: |
| 17 explicit PluginDataRemoverImpl(content::ResourceContext* resource_context); | 20 explicit PluginDataRemoverImpl(BrowserContext* browser_context); |
| 18 virtual ~PluginDataRemoverImpl(); | 21 virtual ~PluginDataRemoverImpl(); |
| 19 | 22 |
| 20 // content::PluginDataRemover implementation: | 23 // PluginDataRemover implementation: |
| 21 virtual base::WaitableEvent* StartRemoving(base::Time begin_time) OVERRIDE; | 24 virtual base::WaitableEvent* StartRemoving(base::Time begin_time) OVERRIDE; |
| 22 | 25 |
| 23 // The plug-in whose data should be removed (usually Flash) is specified via | 26 // The plug-in whose data should be removed (usually Flash) is specified via |
| 24 // its MIME type. This method sets a different MIME type in order to call a | 27 // its MIME type. This method sets a different MIME type in order to call a |
| 25 // different plug-in (for example in tests). | 28 // different plug-in (for example in tests). |
| 26 void set_mime_type(const std::string& mime_type) { mime_type_ = mime_type; } | 29 void set_mime_type(const std::string& mime_type) { mime_type_ = mime_type; } |
| 27 | 30 |
| 28 private: | 31 private: |
| 29 class Context; | 32 class Context; |
| 30 | 33 |
| 31 std::string mime_type_; | 34 std::string mime_type_; |
| 32 // The resource context for the profile. | 35 |
| 33 content::ResourceContext* resource_context_; | 36 // The browser context for the profile. |
| 37 BrowserContext* browser_context_; | |
| 34 | 38 |
| 35 // This allows this object to be deleted on the UI thread while it's still | 39 // This allows this object to be deleted on the UI thread while it's still |
| 36 // being used on the IO thread. | 40 // being used on the IO thread. |
| 37 scoped_refptr<Context> context_; | 41 scoped_refptr<Context> context_; |
| 38 | 42 |
| 39 DISALLOW_COPY_AND_ASSIGN(PluginDataRemoverImpl); | 43 DISALLOW_COPY_AND_ASSIGN(PluginDataRemoverImpl); |
| 40 }; | 44 }; |
| 41 | 45 |
| 46 } // namespace content | |
| 47 | |
| 42 #endif // CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_ | 48 #endif // CONTENT_BROWSER_PLUGIN_DATA_REMOVER_IMPL_H_ |
| OLD | NEW |