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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 6245010: Use HelpApp in guest mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 using base::TimeDelta; 135 using base::TimeDelta;
136 136
137 /////////////////////////////////////////////////////////////////////////////// 137 ///////////////////////////////////////////////////////////////////////////////
138 138
139 namespace { 139 namespace {
140 140
141 // The URL to be loaded to display Help. 141 // The URL to be loaded to display Help.
142 #if defined(OS_CHROMEOS) 142 #if defined(OS_CHROMEOS)
143 const char kHelpContentUrl[] = 143 const char kHelpContentUrl[] =
144 "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html"; 144 "chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html";
145 const char kHelpContentOnlineUrl[] =
146 "http://www.google.com/support/chromeos/";
147 #else 145 #else
148 const char kHelpContentUrl[] = 146 const char kHelpContentUrl[] =
149 "http://www.google.com/support/chrome/"; 147 "http://www.google.com/support/chrome/";
150 #endif 148 #endif
151 149
152 // The URL to be opened when the Help link on the Autofill dialog is clicked. 150 // The URL to be opened when the Help link on the Autofill dialog is clicked.
153 const char kAutofillHelpUrl[] = 151 const char kAutofillHelpUrl[] =
154 #if defined(OS_CHROMEOS) 152 #if defined(OS_CHROMEOS)
155 "http://www.google.com/support/chromeos/bin/answer.py?answer=142893"; 153 "http://www.google.com/support/chromeos/bin/answer.py?answer=142893";
156 #else 154 #else
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 #endif 1853 #endif
1856 } 1854 }
1857 1855
1858 void Browser::OpenUpdateChromeDialog() { 1856 void Browser::OpenUpdateChromeDialog() {
1859 UserMetrics::RecordAction(UserMetricsAction("UpdateChrome"), profile_); 1857 UserMetrics::RecordAction(UserMetricsAction("UpdateChrome"), profile_);
1860 window_->ShowUpdateChromeDialog(); 1858 window_->ShowUpdateChromeDialog();
1861 } 1859 }
1862 1860
1863 void Browser::OpenHelpTab() { 1861 void Browser::OpenHelpTab() {
1864 GURL help_url(kHelpContentUrl); 1862 GURL help_url(kHelpContentUrl);
1865 #if defined(OS_CHROMEOS)
1866 // TODO(nkostylev): Always redirect to HelpApp http://crosbug.com/6923
1867 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession))
1868 help_url = GURL(kHelpContentOnlineUrl);
1869 #endif
1870 GURL localized_help_url = google_util::AppendGoogleLocaleParam(help_url); 1863 GURL localized_help_url = google_util::AppendGoogleLocaleParam(help_url);
1871 AddSelectedTabWithURL(localized_help_url, PageTransition::AUTO_BOOKMARK); 1864 AddSelectedTabWithURL(localized_help_url, PageTransition::AUTO_BOOKMARK);
1872 } 1865 }
1873 1866
1874 void Browser::OpenThemeGalleryTabAndActivate() { 1867 void Browser::OpenThemeGalleryTabAndActivate() {
1875 AddSelectedTabWithURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)), 1868 AddSelectedTabWithURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
1876 PageTransition::LINK); 1869 PageTransition::LINK);
1877 } 1870 }
1878 1871
1879 void Browser::OpenPrivacyDashboardTabAndActivate() { 1872 void Browser::OpenPrivacyDashboardTabAndActivate() {
(...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 // The page transition below is only for the purpose of inserting the tab. 4255 // The page transition below is only for the purpose of inserting the tab.
4263 browser->AddTab(view_source_contents, PageTransition::LINK); 4256 browser->AddTab(view_source_contents, PageTransition::LINK);
4264 } 4257 }
4265 4258
4266 if (profile_->HasSessionService()) { 4259 if (profile_->HasSessionService()) {
4267 SessionService* session_service = profile_->GetSessionService(); 4260 SessionService* session_service = profile_->GetSessionService();
4268 if (session_service) 4261 if (session_service)
4269 session_service->TabRestored(&view_source_contents->controller(), false); 4262 session_service->TabRestored(&view_source_contents->controller(), false);
4270 } 4263 }
4271 } 4264 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698