| OLD | NEW |
| 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 // Defines the Chrome Extensions BrowsingData API functions, which entail | 5 // Defines the Chrome Extensions BrowsingData API functions, which entail |
| 6 // clearing browsing data, and clearing the browser's cache (which, let's be | 6 // clearing browsing data, and clearing the browser's cache (which, let's be |
| 7 // honest, are the same thing), as specified in the extension API JSON. | 7 // honest, are the same thing), as specified in the extension API JSON. |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/api/browsingdata/browsing_data_api.h" | 9 #include "chrome/browser/extensions/api/browsingdata/browsing_data_api.h" |
| 10 | 10 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 if (removal_mask_ & BrowsingDataRemover::REMOVE_PLUGIN_DATA) { | 140 if (removal_mask_ & BrowsingDataRemover::REMOVE_PLUGIN_DATA) { |
| 141 // If we're being asked to remove plugin data, check whether it's actually | 141 // If we're being asked to remove plugin data, check whether it's actually |
| 142 // supported. | 142 // supported. |
| 143 Profile* profile = GetCurrentBrowser()->profile(); | 143 Profile* profile = GetCurrentBrowser()->profile(); |
| 144 BrowserThread::PostTask( | 144 BrowserThread::PostTask( |
| 145 BrowserThread::FILE, FROM_HERE, | 145 BrowserThread::FILE, FROM_HERE, |
| 146 base::Bind( | 146 base::Bind( |
| 147 &BrowsingDataExtensionFunction::CheckRemovingPluginDataSupported, | 147 &BrowsingDataExtensionFunction::CheckRemovingPluginDataSupported, |
| 148 this, | 148 this, |
| 149 make_scoped_refptr(PluginPrefs::GetForProfile(profile)))); | 149 PluginPrefs::GetForProfile(profile))); |
| 150 } else { | 150 } else { |
| 151 StartRemoving(); | 151 StartRemoving(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 // Will finish asynchronously. | 154 // Will finish asynchronously. |
| 155 return true; | 155 return true; |
| 156 } | 156 } |
| 157 | 157 |
| 158 void BrowsingDataExtensionFunction::CheckRemovingPluginDataSupported( | 158 void BrowsingDataExtensionFunction::CheckRemovingPluginDataSupported( |
| 159 scoped_refptr<PluginPrefs> plugin_prefs) { | 159 scoped_refptr<PluginPrefs> plugin_prefs) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 return BrowsingDataRemover::REMOVE_PLUGIN_DATA; | 232 return BrowsingDataRemover::REMOVE_PLUGIN_DATA; |
| 233 } | 233 } |
| 234 | 234 |
| 235 int RemovePasswordsFunction::GetRemovalMask() const { | 235 int RemovePasswordsFunction::GetRemovalMask() const { |
| 236 return BrowsingDataRemover::REMOVE_PASSWORDS; | 236 return BrowsingDataRemover::REMOVE_PASSWORDS; |
| 237 } | 237 } |
| 238 | 238 |
| 239 int RemoveWebSQLFunction::GetRemovalMask() const { | 239 int RemoveWebSQLFunction::GetRemovalMask() const { |
| 240 return BrowsingDataRemover::REMOVE_WEBSQL; | 240 return BrowsingDataRemover::REMOVE_WEBSQL; |
| 241 } | 241 } |
| OLD | NEW |