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

Unified Diff: chrome/browser/extensions/api/content_settings/content_settings_store.cc

Issue 10544094: Add extension ID to crash dump info when trying to clear content settings for an unregistered exten… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/content_settings/content_settings_store.cc
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_store.cc b/chrome/browser/extensions/api/content_settings/content_settings_store.cc
index 71304fbe5f0a85c975b6510150e3dacef9e4955c..9157e3980cd3da169b582e9750f411227a8b4d4a 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_store.cc
+++ b/chrome/browser/extensions/api/content_settings/content_settings_store.cc
@@ -6,10 +6,12 @@
#include <set>
+#include "base/debug/alias.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/stl_util.h"
+#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/content_settings/content_settings_api_constants.h"
#include "chrome/browser/extensions/api/content_settings/content_settings_helpers.h"
@@ -219,8 +221,15 @@ void ContentSettingsStore::ClearContentSettingsForExtension(
{
base::AutoLock lock(lock_);
OriginIdentifierValueMap* map = GetValueMap(ext_id, scope);
- if (!map)
- return;
+ // TODO(bauerb): This is for debugging http://crbug.com/128652.
+ // Remove once the bug is fixed.
+ if (!map) {
+ char ext_id_buffer[33];
+ base::strlcpy(ext_id_buffer, ext_id.c_str(), sizeof(ext_id_buffer));
+ base::debug::Alias(ext_id_buffer);
+ // Do a clean crash.
+ CHECK(false);
+ }
notify = !map->empty();
map->clear();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698