Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1323)

Unified Diff: chrome/browser/extensions/api/browsing_data/browsing_data_api.cc

Issue 2504943002: Remove the "one at a time" restriction from the browsingData API (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/browsing_data/browsing_data_api.cc
diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc b/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc
index b15e0576bfebeb5c1805183ed5080d301481e2c0..827f9ead4e705fd33b179f8f3be175935fd9f369 100644
--- a/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc
+++ b/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc
@@ -65,8 +65,6 @@ const char kUnprotectedWebKey[] = "unprotectedWeb";
const char kBadDataTypeDetails[] = "Invalid value for data type '%s'.";
const char kDeleteProhibitedError[] = "Browsing history and downloads are not "
"permitted to be removed.";
-const char kOneAtATimeError[] = "Only one 'browsingData' API call can run at "
- "a time.";
} // namespace extension_browsing_data_api_constants
@@ -314,14 +312,7 @@ void BrowsingDataRemoverFunction::CheckRemovingPluginDataSupported(
void BrowsingDataRemoverFunction::StartRemoving() {
BrowsingDataRemover* remover =
BrowsingDataRemoverFactory::GetForBrowserContext(GetProfile());
- // TODO(msramek): This restriction is no longer needed. Remove it.
- if (remover->is_removing()) {
- error_ = extension_browsing_data_api_constants::kOneAtATimeError;
- SendResponse(false);
- return;
- }
-
- // If we're good to go, add a ref (Balanced in OnBrowsingDataRemoverDone)
+ // Add a ref (Balanced in OnBrowsingDataRemoverDone)
AddRef();
// Create a BrowsingDataRemover, set the current object as an observer (so

Powered by Google App Engine
This is Rietveld 408576698