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

Unified Diff: chrome/browser/ui/webui/settings/site_settings_handler.cc

Issue 2358563002: Site Settings Desktop: Fix crash when deleting storage for a site. (Closed)
Patch Set: Created 4 years, 3 months 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/ui/webui/settings/site_settings_handler.cc
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler.cc b/chrome/browser/ui/webui/settings/site_settings_handler.cc
index 90f2b508f7b82ece96fd8a309d3654a832afd331..bb0f9368a238fe978acb16ffdd752420dbb7e2d6 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.cc
@@ -320,8 +320,8 @@ void SiteSettingsHandler::HandleClearUsage(
CHECK_EQ(2U, args->GetSize());
std::string origin;
CHECK(args->GetString(0, &origin));
- std::string type;
- CHECK(args->GetString(1, &type));
+ double storage_type;
+ CHECK(args->GetDouble(1, &storage_type));
Finnur 2016/09/20 11:37:27 This was the source of the crash. When I checked t
dschuyler 2016/09/20 18:28:51 Would it be ok to GetInteger here instead of GetDo
Dan Beam 2016/09/20 19:01:59 I don't think that will work
GURL url(origin);
if (url.is_valid()) {
@@ -332,8 +332,7 @@ void SiteSettingsHandler::HandleClearUsage(
= new StorageInfoFetcher(profile_);
storage_info_fetcher->ClearStorage(
url.host(),
- static_cast<storage::StorageType>(static_cast<int>(
- site_settings::ContentSettingsTypeFromGroupName(type))),
+ static_cast<storage::StorageType>(static_cast<int>(storage_type)),
base::Bind(&SiteSettingsHandler::OnUsageInfoCleared,
base::Unretained(this)));

Powered by Google App Engine
This is Rietveld 408576698