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

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

Issue 1991009: Shorten several apps-related flags (Closed)
Patch Set: Created 10 years, 7 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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.h" 5 #include "chrome/browser/extensions/extension_install_ui.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 // GetLastActiveWithProfile will fail on the build bots. This needs to be 199 // GetLastActiveWithProfile will fail on the build bots. This needs to be
200 // implemented differently if any test is created which depends on 200 // implemented differently if any test is created which depends on
201 // ExtensionInstalledBubble showing. 201 // ExtensionInstalledBubble showing.
202 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); 202 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
203 203
204 if (extension->GetFullLaunchURL().is_valid()) { 204 if (extension->GetFullLaunchURL().is_valid()) {
205 std::string hash_params = "app-id="; 205 std::string hash_params = "app-id=";
206 hash_params += extension->id(); 206 hash_params += extension->id();
207 207
208 if (CommandLine::ForCurrentProcess()->HasSwitch( 208 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) {
209 switches::kAppLauncherForNewTab)) {
210 #if defined(TOOLKIT_VIEWS) 209 #if defined(TOOLKIT_VIEWS)
211 AppLauncher::ShowForNewTab(browser, hash_params); 210 AppLauncher::ShowForNewTab(browser, hash_params);
212 #else 211 #else
213 NOTREACHED(); 212 NOTREACHED();
214 #endif 213 #endif
215 } else { 214 } else {
216 std::string url(chrome::kChromeUINewTabURL); 215 std::string url(chrome::kChromeUINewTabURL);
217 url += "/#"; 216 url += "/#";
218 url += hash_params; 217 url += hash_params;
219 browser->AddTabWithURL(GURL(url), GURL(), PageTransition::TYPED, -1, 218 browser->AddTabWithURL(GURL(url), GURL(), PageTransition::TYPED, -1,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 TabContents* tab_contents, Extension* new_theme, 387 TabContents* tab_contents, Extension* new_theme,
389 const std::string& previous_theme_id, bool previous_use_system_theme) { 388 const std::string& previous_theme_id, bool previous_use_system_theme) {
390 #if defined(TOOLKIT_GTK) 389 #if defined(TOOLKIT_GTK)
391 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, 390 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme,
392 previous_theme_id, previous_use_system_theme); 391 previous_theme_id, previous_use_system_theme);
393 #else 392 #else
394 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, 393 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme,
395 previous_theme_id); 394 previous_theme_id);
396 #endif 395 #endif
397 } 396 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698