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/chrome_pages.h" | 5 #include "chrome/browser/ui/chrome_pages.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; | 85 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; |
86 ShowSingletonTabOverwritingNTP(browser, params); | 86 ShowSingletonTabOverwritingNTP(browser, params); |
87 } | 87 } |
88 | 88 |
89 // Shows either the help app or the appropriate help page for |source|. If | 89 // Shows either the help app or the appropriate help page for |source|. If |
90 // |browser| is NULL and the help page is used (vs the app), the help page is | 90 // |browser| is NULL and the help page is used (vs the app), the help page is |
91 // shown in the last active browser. If there is no such browser, a new browser | 91 // shown in the last active browser. If there is no such browser, a new browser |
92 // is created. | 92 // is created. |
93 void ShowHelpImpl(Browser* browser, Profile* profile, HelpSource source) { | 93 void ShowHelpImpl(Browser* browser, Profile* profile, HelpSource source) { |
94 base::RecordAction(UserMetricsAction("ShowHelpTab")); | 94 base::RecordAction(UserMetricsAction("ShowHelpTab")); |
95 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD) | 95 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) |
96 const extensions::Extension* extension = | 96 const extensions::Extension* extension = |
97 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( | 97 extensions::ExtensionRegistry::Get(profile)->GetExtensionById( |
98 genius_app::kGeniusAppId, | 98 genius_app::kGeniusAppId, |
99 extensions::ExtensionRegistry::EVERYTHING); | 99 extensions::ExtensionRegistry::EVERYTHING); |
100 extensions::AppLaunchSource app_launch_source(extensions::SOURCE_UNTRACKED); | 100 extensions::AppLaunchSource app_launch_source(extensions::SOURCE_UNTRACKED); |
101 switch (source) { | 101 switch (source) { |
102 case HELP_SOURCE_KEYBOARD: | 102 case HELP_SOURCE_KEYBOARD: |
103 app_launch_source = extensions::SOURCE_KEYBOARD; | 103 app_launch_source = extensions::SOURCE_KEYBOARD; |
104 break; | 104 break; |
105 case HELP_SOURCE_MENU: | 105 case HELP_SOURCE_MENU: |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 SigninManagerFactory::GetForProfile(original_profile); | 456 SigninManagerFactory::GetForProfile(original_profile); |
457 DCHECK(manager->IsSigninAllowed()); | 457 DCHECK(manager->IsSigninAllowed()); |
458 if (manager->IsAuthenticated()) | 458 if (manager->IsAuthenticated()) |
459 ShowSettings(browser); | 459 ShowSettings(browser); |
460 else | 460 else |
461 ShowBrowserSignin(browser, access_point); | 461 ShowBrowserSignin(browser, access_point); |
462 } | 462 } |
463 #endif | 463 #endif |
464 | 464 |
465 } // namespace chrome | 465 } // namespace chrome |
OLD | NEW |