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/browsing_data/browsing_data_api.h" | 9 #include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h" |
10 | 10 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } else { | 270 } else { |
271 StartRemoving(); | 271 StartRemoving(); |
272 } | 272 } |
273 | 273 |
274 // Will finish asynchronously. | 274 // Will finish asynchronously. |
275 return true; | 275 return true; |
276 } | 276 } |
277 | 277 |
278 void BrowsingDataRemoveFunction::CheckRemovingPluginDataSupported( | 278 void BrowsingDataRemoveFunction::CheckRemovingPluginDataSupported( |
279 scoped_refptr<PluginPrefs> plugin_prefs) { | 279 scoped_refptr<PluginPrefs> plugin_prefs) { |
280 if (!PluginDataRemoverHelper::IsSupported(plugin_prefs)) | 280 if (!PluginDataRemoverHelper::IsSupported(plugin_prefs.get())) |
281 removal_mask_ &= ~BrowsingDataRemover::REMOVE_PLUGIN_DATA; | 281 removal_mask_ &= ~BrowsingDataRemover::REMOVE_PLUGIN_DATA; |
282 | 282 |
283 BrowserThread::PostTask( | 283 BrowserThread::PostTask( |
284 BrowserThread::UI, FROM_HERE, | 284 BrowserThread::UI, FROM_HERE, |
285 base::Bind(&BrowsingDataRemoveFunction::StartRemoving, this)); | 285 base::Bind(&BrowsingDataRemoveFunction::StartRemoving, this)); |
286 } | 286 } |
287 | 287 |
288 void BrowsingDataRemoveFunction::StartRemoving() { | 288 void BrowsingDataRemoveFunction::StartRemoving() { |
289 if (BrowsingDataRemover::is_removing()) { | 289 if (BrowsingDataRemover::is_removing()) { |
290 error_ = extension_browsing_data_api_constants::kOneAtATimeError; | 290 error_ = extension_browsing_data_api_constants::kOneAtATimeError; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 return BrowsingDataRemover::REMOVE_PLUGIN_DATA; | 414 return BrowsingDataRemover::REMOVE_PLUGIN_DATA; |
415 } | 415 } |
416 | 416 |
417 int RemovePasswordsFunction::GetRemovalMask() { | 417 int RemovePasswordsFunction::GetRemovalMask() { |
418 return BrowsingDataRemover::REMOVE_PASSWORDS; | 418 return BrowsingDataRemover::REMOVE_PASSWORDS; |
419 } | 419 } |
420 | 420 |
421 int RemoveWebSQLFunction::GetRemovalMask() { | 421 int RemoveWebSQLFunction::GetRemovalMask() { |
422 return BrowsingDataRemover::REMOVE_WEBSQL; | 422 return BrowsingDataRemover::REMOVE_WEBSQL; |
423 } | 423 } |
OLD | NEW |