| 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/extensions/extension_install_ui_default.h" | 5 #include "chrome/browser/extensions/extension_install_ui_default.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" | 10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 CommandLine* cmdline = CommandLine::ForCurrentProcess(); | 133 CommandLine* cmdline = CommandLine::ForCurrentProcess(); |
| 134 use_bubble_for_apps = (use_app_installed_bubble_ || | 134 use_bubble_for_apps = (use_app_installed_bubble_ || |
| 135 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); | 135 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); |
| 136 #endif | 136 #endif |
| 137 | 137 |
| 138 if (extension->is_app() && !use_bubble_for_apps) { | 138 if (extension->is_app() && !use_bubble_for_apps) { |
| 139 ExtensionInstallUI::OpenAppInstalledUI(browser, extension->id()); | 139 ExtensionInstallUI::OpenAppInstalledUI(browser, extension->id()); |
| 140 return; | 140 return; |
| 141 } | 141 } |
| 142 | 142 |
| 143 browser::ShowExtensionInstalledBubble(extension, browser, *icon); | 143 chrome::ShowExtensionInstalledBubble(extension, browser, *icon); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void ExtensionInstallUIDefault::OnInstallFailure( | 146 void ExtensionInstallUIDefault::OnInstallFailure( |
| 147 const CrxInstallerError& error) { | 147 const CrxInstallerError& error) { |
| 148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 149 if (disable_failure_ui_for_tests || skip_post_install_ui_) | 149 if (disable_failure_ui_for_tests || skip_post_install_ui_) |
| 150 return; | 150 return; |
| 151 | 151 |
| 152 Browser* browser = browser::FindLastActiveWithProfile(browser_->profile()); | 152 Browser* browser = browser::FindLastActiveWithProfile(browser_->profile()); |
| 153 TabContents* tab_contents = chrome::GetActiveTabContents(browser); | 153 TabContents* tab_contents = chrome::GetActiveTabContents(browser); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 #else | 253 #else |
| 254 NOTREACHED(); | 254 NOTREACHED(); |
| 255 #endif | 255 #endif |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 // static | 259 // static |
| 260 void ExtensionInstallUI::DisableFailureUIForTests() { | 260 void ExtensionInstallUI::DisableFailureUIForTests() { |
| 261 disable_failure_ui_for_tests = true; | 261 disable_failure_ui_for_tests = true; |
| 262 } | 262 } |
| OLD | NEW |