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

Side by Side Diff: chrome/browser/extensions/extension_install_ui_default.cc

Issue 11953021: Don't show the apps page on the NTP if the app launcher is installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move getShouldShowApps message to onLoad. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/app_launcher.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" 10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 if (extension->is_app()) { 182 if (extension->is_app()) {
183 bool use_bubble = false; 183 bool use_bubble = false;
184 184
185 #if defined(TOOLKIT_VIEWS) 185 #if defined(TOOLKIT_VIEWS)
186 CommandLine* cmdline = CommandLine::ForCurrentProcess(); 186 CommandLine* cmdline = CommandLine::ForCurrentProcess();
187 use_bubble = (use_app_installed_bubble_ || 187 use_bubble = (use_app_installed_bubble_ ||
188 cmdline->HasSwitch(switches::kAppsNewInstallBubble)); 188 cmdline->HasSwitch(switches::kAppsNewInstallBubble));
189 #endif 189 #endif
190 190
191 extensions::GetIsAppLauncherEnabled( 191 extensions::UpdateIsAppLauncherEnabled(
192 base::Bind(&OnAppLauncherEnabledCompleted, extension, browser, icon, 192 base::Bind(&OnAppLauncherEnabledCompleted, extension, browser, icon,
193 use_bubble)); 193 use_bubble));
194 return; 194 return;
195 } 195 }
196 196
197 chrome::ShowExtensionInstalledBubble(extension, browser, *icon); 197 chrome::ShowExtensionInstalledBubble(extension, browser, *icon);
198 } 198 }
199 199
200 void ExtensionInstallUIDefault::OnInstallFailure( 200 void ExtensionInstallUIDefault::OnInstallFailure(
201 const extensions::CrxInstallerError& error) { 201 const extensions::CrxInstallerError& error) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return new ExtensionInstallPrompt(web_contents); 261 return new ExtensionInstallPrompt(web_contents);
262 } 262 }
263 263
264 // static 264 // static
265 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile( 265 ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile(
266 Profile* profile) { 266 Profile* profile) {
267 Browser* browser = chrome::FindLastActiveWithProfile(profile, 267 Browser* browser = chrome::FindLastActiveWithProfile(profile,
268 chrome::GetActiveDesktop()); 268 chrome::GetActiveDesktop());
269 return CreateInstallPromptWithBrowser(browser); 269 return CreateInstallPromptWithBrowser(browser);
270 } 270 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_launcher.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698