Commit b54525e9 authored by tessamac@google.com's avatar tessamac@google.com

Change DCHECK in BookmarkBarGtk to DLOG and return.

If the BookmarkBarNode isn't loaded (yet) then we shouldn't be creating any bookmark buttons.  This fixes the crashes reported in ExtensionInstallUIBrowserTest.

BUG=44548
TEST=browser_tests, unit_tests, trybots

Review URL: http://codereview.chromium.org/6209001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72197 0039d316-1c4b-4281-b951-d872f2087c98
parent ee852cb3
......@@ -34,9 +34,8 @@ class ExtensionInstallUIBrowserTest : public ExtensionBrowserTest {
}
};
// Crashy, http://crbug.com/44548.
IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
DISABLED_TestThemeInstallUndoResetsToDefault) {
TestThemeInstallUndoResetsToDefault) {
// Install theme once and undo to verify we go back to default theme.
FilePath theme_path = test_data_dir_.AppendASCII("theme.crx");
ASSERT_TRUE(InstallExtensionWithUI(theme_path, 1));
......
......@@ -805,14 +805,11 @@ void BookmarkBarGtk::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
if (type == NotificationType::BROWSER_THEME_CHANGED) {
if (model_) {
if (model_ && model_->IsLoaded()) {
// Regenerate the bookmark bar with all new objects with their theme
// properties set correctly for the new theme.
RemoveAllBookmarkButtons();
CreateAllBookmarkButtons();
} else {
DLOG(ERROR) << "Received a theme change notification while we "
<< "don't have a BookmarkModel. Taking no action.";
}
UpdateEventBoxPaintability();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment