| 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 #include "chrome/browser/ui/extensions/extension_install_ui_default.h" | 5 #include "chrome/browser/ui/extensions/extension_install_ui_default.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/extensions/extension_install_prompt.h" | 10 #include "chrome/browser/extensions/extension_install_prompt.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 if (previous_theme) | 212 if (previous_theme) |
| 213 previous_theme_id_ = previous_theme->id(); | 213 previous_theme_id_ = previous_theme->id(); |
| 214 previous_using_system_theme_ = | 214 previous_using_system_theme_ = |
| 215 ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); | 215 ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 | 218 |
| 219 ExtensionInstallUIDefault::~ExtensionInstallUIDefault() {} | 219 ExtensionInstallUIDefault::~ExtensionInstallUIDefault() {} |
| 220 | 220 |
| 221 void ExtensionInstallUIDefault::OnInstallSuccess(const Extension* extension, | 221 void ExtensionInstallUIDefault::OnInstallSuccess(const Extension* extension, |
| 222 SkBitmap* icon) { | 222 const SkBitmap* icon) { |
| 223 if (skip_post_install_ui()) | 223 if (skip_post_install_ui()) |
| 224 return; | 224 return; |
| 225 | 225 |
| 226 if (!profile()) { | 226 if (!profile()) { |
| 227 // TODO(zelidrag): Figure out what exact conditions cause crash | 227 // TODO(zelidrag): Figure out what exact conditions cause crash |
| 228 // http://crbug.com/159437 and write browser test to cover it. | 228 // http://crbug.com/159437 and write browser test to cover it. |
| 229 NOTREACHED(); | 229 NOTREACHED(); |
| 230 return; | 230 return; |
| 231 } | 231 } |
| 232 | 232 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 browser->tab_strip_model()->GetActiveWebContents(); | 285 browser->tab_strip_model()->GetActiveWebContents(); |
| 286 if (!web_contents) | 286 if (!web_contents) |
| 287 return; | 287 return; |
| 288 ErrorInfoBarDelegate::Create(InfoBarService::FromWebContents(web_contents), | 288 ErrorInfoBarDelegate::Create(InfoBarService::FromWebContents(web_contents), |
| 289 error); | 289 error); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void ExtensionInstallUIDefault::SetUseAppInstalledBubble(bool use_bubble) { | 292 void ExtensionInstallUIDefault::SetUseAppInstalledBubble(bool use_bubble) { |
| 293 use_app_installed_bubble_ = use_bubble; | 293 use_app_installed_bubble_ = use_bubble; |
| 294 } | 294 } |
| OLD | NEW |