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" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/metrics/user_metrics.h" |
13 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
15 #include "build/build_config.h" | 16 #include "build/build_config.h" |
16 #include "chrome/browser/download/download_shelf.h" | 17 #include "chrome/browser/download/download_shelf.h" |
17 #include "chrome/browser/extensions/launch_util.h" | 18 #include "chrome/browser/extensions/launch_util.h" |
18 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profile_manager.h" |
20 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/browser/ui/browser_finder.h" | 22 #include "chrome/browser/ui/browser_finder.h" |
22 #include "chrome/browser/ui/browser_navigator_params.h" | 23 #include "chrome/browser/ui/browser_navigator_params.h" |
23 #include "chrome/browser/ui/browser_window.h" | 24 #include "chrome/browser/ui/browser_window.h" |
24 #include "chrome/browser/ui/extensions/app_launch_params.h" | 25 #include "chrome/browser/ui/extensions/app_launch_params.h" |
25 #include "chrome/browser/ui/extensions/application_launch.h" | 26 #include "chrome/browser/ui/extensions/application_launch.h" |
26 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 27 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
27 #include "chrome/browser/ui/settings_window_manager.h" | 28 #include "chrome/browser/ui/settings_window_manager.h" |
28 #include "chrome/browser/ui/singleton_tabs.h" | 29 #include "chrome/browser/ui/singleton_tabs.h" |
29 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 30 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
30 #include "chrome/browser/ui/webui/options/content_settings_handler.h" | 31 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
31 #include "chrome/browser/ui/webui/site_settings_helper.h" | 32 #include "chrome/browser/ui/webui/site_settings_helper.h" |
32 #include "chrome/common/chrome_features.h" | 33 #include "chrome/common/chrome_features.h" |
33 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
34 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
35 #include "components/signin/core/browser/signin_header_helper.h" | 36 #include "components/signin/core/browser/signin_header_helper.h" |
36 #include "components/signin/core/common/profile_management_switches.h" | 37 #include "components/signin/core/common/profile_management_switches.h" |
37 #include "content/public/browser/user_metrics.h" | |
38 #include "content/public/browser/web_contents.h" | 38 #include "content/public/browser/web_contents.h" |
39 #include "extensions/browser/extension_prefs.h" | 39 #include "extensions/browser/extension_prefs.h" |
40 #include "extensions/common/constants.h" | 40 #include "extensions/common/constants.h" |
41 #include "google_apis/gaia/gaia_urls.h" | 41 #include "google_apis/gaia/gaia_urls.h" |
42 #include "net/base/url_util.h" | 42 #include "net/base/url_util.h" |
43 #include "ui/base/window_open_disposition.h" | 43 #include "ui/base/window_open_disposition.h" |
44 | 44 |
45 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
46 #include "chrome/browser/win/enumerate_modules_model.h" | 46 #include "chrome/browser/win/enumerate_modules_model.h" |
47 #endif | 47 #endif |
(...skipping 15 matching lines...) Expand all Loading... |
63 using base::UserMetricsAction; | 63 using base::UserMetricsAction; |
64 | 64 |
65 namespace chrome { | 65 namespace chrome { |
66 namespace { | 66 namespace { |
67 | 67 |
68 const char kHashMark[] = "#"; | 68 const char kHashMark[] = "#"; |
69 | 69 |
70 void OpenBookmarkManagerWithHash(Browser* browser, | 70 void OpenBookmarkManagerWithHash(Browser* browser, |
71 const std::string& action, | 71 const std::string& action, |
72 int64_t node_id) { | 72 int64_t node_id) { |
73 content::RecordAction(UserMetricsAction("ShowBookmarkManager")); | 73 base::RecordAction(UserMetricsAction("ShowBookmarkManager")); |
74 content::RecordAction(UserMetricsAction("ShowBookmarks")); | 74 base::RecordAction(UserMetricsAction("ShowBookmarks")); |
75 NavigateParams params(GetSingletonTabNavigateParams( | 75 NavigateParams params(GetSingletonTabNavigateParams( |
76 browser, | 76 browser, |
77 GURL(kChromeUIBookmarksURL).Resolve(base::StringPrintf( | 77 GURL(kChromeUIBookmarksURL).Resolve(base::StringPrintf( |
78 "/#%s%s", action.c_str(), base::Int64ToString(node_id).c_str())))); | 78 "/#%s%s", action.c_str(), base::Int64ToString(node_id).c_str())))); |
79 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; | 79 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; |
80 ShowSingletonTabOverwritingNTP(browser, params); | 80 ShowSingletonTabOverwritingNTP(browser, params); |
81 } | 81 } |
82 | 82 |
83 void NavigateToSingletonTab(Browser* browser, const GURL& url) { | 83 void NavigateToSingletonTab(Browser* browser, const GURL& url) { |
84 NavigateParams params(GetSingletonTabNavigateParams(browser, url)); | 84 NavigateParams params(GetSingletonTabNavigateParams(browser, url)); |
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 content::RecordAction(UserMetricsAction("ShowHelpTab")); | 94 base::RecordAction(UserMetricsAction("ShowHelpTab")); |
95 #if defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD) | 95 #if defined(OS_CHROMEOS) && defined(OFFICIAL_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; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
177 std::string GenerateContentSettingsSearchQueryPath(int query_message_id) { | 177 std::string GenerateContentSettingsSearchQueryPath(int query_message_id) { |
178 return std::string(chrome::kDeprecatedOptionsSearchSubPage) + kHashMark + | 178 return std::string(chrome::kDeprecatedOptionsSearchSubPage) + kHashMark + |
179 l10n_util::GetStringUTF8(query_message_id); | 179 l10n_util::GetStringUTF8(query_message_id); |
180 } | 180 } |
181 #endif | 181 #endif |
182 | 182 |
183 } // namespace | 183 } // namespace |
184 | 184 |
185 void ShowBookmarkManager(Browser* browser) { | 185 void ShowBookmarkManager(Browser* browser) { |
186 content::RecordAction(UserMetricsAction("ShowBookmarkManager")); | 186 base::RecordAction(UserMetricsAction("ShowBookmarkManager")); |
187 content::RecordAction(UserMetricsAction("ShowBookmarks")); | 187 base::RecordAction(UserMetricsAction("ShowBookmarks")); |
188 ShowSingletonTabOverwritingNTP( | 188 ShowSingletonTabOverwritingNTP( |
189 browser, | 189 browser, |
190 GetSingletonTabNavigateParams(browser, GURL(kChromeUIBookmarksURL))); | 190 GetSingletonTabNavigateParams(browser, GURL(kChromeUIBookmarksURL))); |
191 } | 191 } |
192 | 192 |
193 void ShowBookmarkManagerForNode(Browser* browser, int64_t node_id) { | 193 void ShowBookmarkManagerForNode(Browser* browser, int64_t node_id) { |
194 OpenBookmarkManagerWithHash(browser, std::string(), node_id); | 194 OpenBookmarkManagerWithHash(browser, std::string(), node_id); |
195 } | 195 } |
196 | 196 |
197 void ShowHistory(Browser* browser) { | 197 void ShowHistory(Browser* browser) { |
198 content::RecordAction(UserMetricsAction("ShowHistory")); | 198 base::RecordAction(UserMetricsAction("ShowHistory")); |
199 NavigateParams params( | 199 NavigateParams params( |
200 GetSingletonTabNavigateParams(browser, GURL(kChromeUIHistoryURL))); | 200 GetSingletonTabNavigateParams(browser, GURL(kChromeUIHistoryURL))); |
201 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; | 201 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; |
202 ShowSingletonTabOverwritingNTP(browser, params); | 202 ShowSingletonTabOverwritingNTP(browser, params); |
203 } | 203 } |
204 | 204 |
205 void ShowDownloads(Browser* browser) { | 205 void ShowDownloads(Browser* browser) { |
206 content::RecordAction(UserMetricsAction("ShowDownloads")); | 206 base::RecordAction(UserMetricsAction("ShowDownloads")); |
207 if (browser->window() && browser->window()->IsDownloadShelfVisible()) | 207 if (browser->window() && browser->window()->IsDownloadShelfVisible()) |
208 browser->window()->GetDownloadShelf()->Close(DownloadShelf::USER_ACTION); | 208 browser->window()->GetDownloadShelf()->Close(DownloadShelf::USER_ACTION); |
209 | 209 |
210 ShowSingletonTabOverwritingNTP( | 210 ShowSingletonTabOverwritingNTP( |
211 browser, | 211 browser, |
212 GetSingletonTabNavigateParams(browser, GURL(kChromeUIDownloadsURL))); | 212 GetSingletonTabNavigateParams(browser, GURL(kChromeUIDownloadsURL))); |
213 } | 213 } |
214 | 214 |
215 void ShowExtensions(Browser* browser, | 215 void ShowExtensions(Browser* browser, |
216 const std::string& extension_to_highlight) { | 216 const std::string& extension_to_highlight) { |
217 content::RecordAction(UserMetricsAction("ShowExtensions")); | 217 base::RecordAction(UserMetricsAction("ShowExtensions")); |
218 NavigateParams params( | 218 NavigateParams params( |
219 GetSingletonTabNavigateParams(browser, GURL(kChromeUIExtensionsURL))); | 219 GetSingletonTabNavigateParams(browser, GURL(kChromeUIExtensionsURL))); |
220 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; | 220 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; |
221 if (!extension_to_highlight.empty()) { | 221 if (!extension_to_highlight.empty()) { |
222 GURL::Replacements replacements; | 222 GURL::Replacements replacements; |
223 std::string query("id="); | 223 std::string query("id="); |
224 query += extension_to_highlight; | 224 query += extension_to_highlight; |
225 replacements.SetQueryStr(query); | 225 replacements.SetQueryStr(query); |
226 params.url = params.url.ReplaceComponents(replacements); | 226 params.url = params.url.ReplaceComponents(replacements); |
227 } | 227 } |
228 ShowSingletonTabOverwritingNTP(browser, params); | 228 ShowSingletonTabOverwritingNTP(browser, params); |
229 } | 229 } |
230 | 230 |
231 void ShowConflicts(Browser* browser) { | 231 void ShowConflicts(Browser* browser) { |
232 #if defined(OS_WIN) | 232 #if defined(OS_WIN) |
233 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); | 233 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); |
234 GURL conflict_url = model->GetConflictUrl(); | 234 GURL conflict_url = model->GetConflictUrl(); |
235 if (conflict_url.is_valid()) { | 235 if (conflict_url.is_valid()) { |
236 ShowSingletonTab(browser, conflict_url); | 236 ShowSingletonTab(browser, conflict_url); |
237 model->AcknowledgeConflictNotification(); | 237 model->AcknowledgeConflictNotification(); |
238 return; | 238 return; |
239 } | 239 } |
240 #endif | 240 #endif |
241 | 241 |
242 content::RecordAction(UserMetricsAction("AboutConflicts")); | 242 base::RecordAction(UserMetricsAction("AboutConflicts")); |
243 ShowSingletonTab(browser, GURL(kChromeUIConflictsURL)); | 243 ShowSingletonTab(browser, GURL(kChromeUIConflictsURL)); |
244 } | 244 } |
245 | 245 |
246 void ShowHelp(Browser* browser, HelpSource source) { | 246 void ShowHelp(Browser* browser, HelpSource source) { |
247 ShowHelpImpl(browser, browser->profile(), source); | 247 ShowHelpImpl(browser, browser->profile(), source); |
248 } | 248 } |
249 | 249 |
250 void ShowHelpForProfile(Profile* profile, HelpSource source) { | 250 void ShowHelpForProfile(Profile* profile, HelpSource source) { |
251 ShowHelpImpl(NULL, profile, source); | 251 ShowHelpImpl(NULL, profile, source); |
252 } | 252 } |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } else { | 321 } else { |
322 if (sub_page == chrome::kPowerSubPage) { | 322 if (sub_page == chrome::kPowerSubPage) { |
323 // TODO(stevenjbj/derat): Remove this once we have a 'power' subpage, | 323 // TODO(stevenjbj/derat): Remove this once we have a 'power' subpage, |
324 // crbug.com/633455. | 324 // crbug.com/633455. |
325 sub_page_path = "device"; | 325 sub_page_path = "device"; |
326 } | 326 } |
327 } | 327 } |
328 #endif | 328 #endif |
329 | 329 |
330 if (::switches::SettingsWindowEnabled()) { | 330 if (::switches::SettingsWindowEnabled()) { |
331 content::RecordAction(base::UserMetricsAction("ShowOptions")); | 331 base::RecordAction(base::UserMetricsAction("ShowOptions")); |
332 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( | 332 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( |
333 profile, GetSettingsUrl(sub_page_path)); | 333 profile, GetSettingsUrl(sub_page_path)); |
334 return; | 334 return; |
335 } | 335 } |
336 Browser* browser = chrome::FindTabbedBrowser(profile, false); | 336 Browser* browser = chrome::FindTabbedBrowser(profile, false); |
337 if (!browser) { | 337 if (!browser) { |
338 browser = new Browser(Browser::CreateParams(profile, true)); | 338 browser = new Browser(Browser::CreateParams(profile, true)); |
339 } | 339 } |
340 ShowSettingsSubPageInTabbedBrowser(browser, sub_page_path); | 340 ShowSettingsSubPageInTabbedBrowser(browser, sub_page_path); |
341 } | 341 } |
342 | 342 |
343 void ShowSettingsSubPageInTabbedBrowser(Browser* browser, | 343 void ShowSettingsSubPageInTabbedBrowser(Browser* browser, |
344 const std::string& sub_page) { | 344 const std::string& sub_page) { |
345 content::RecordAction(UserMetricsAction("ShowOptions")); | 345 base::RecordAction(UserMetricsAction("ShowOptions")); |
346 GURL gurl = GetSettingsUrl(sub_page); | 346 GURL gurl = GetSettingsUrl(sub_page); |
347 NavigateParams params(GetSingletonTabNavigateParams(browser, gurl)); | 347 NavigateParams params(GetSingletonTabNavigateParams(browser, gurl)); |
348 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; | 348 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; |
349 ShowSingletonTabOverwritingNTP(browser, params); | 349 ShowSingletonTabOverwritingNTP(browser, params); |
350 } | 350 } |
351 | 351 |
352 void ShowContentSettingsExceptions(Browser* browser, | 352 void ShowContentSettingsExceptions(Browser* browser, |
353 ContentSettingsType content_settings_type) { | 353 ContentSettingsType content_settings_type) { |
354 ShowSettingsSubPage( | 354 ShowSettingsSubPage( |
355 browser, GenerateContentSettingsExceptionsSubPage(content_settings_type)); | 355 browser, GenerateContentSettingsExceptionsSubPage(content_settings_type)); |
356 } | 356 } |
357 | 357 |
358 void ShowContentSettingsExceptionsInWindow( | 358 void ShowContentSettingsExceptionsInWindow( |
359 Profile* profile, | 359 Profile* profile, |
360 ContentSettingsType content_settings_type) { | 360 ContentSettingsType content_settings_type) { |
361 DCHECK(switches::SettingsWindowEnabled()); | 361 DCHECK(switches::SettingsWindowEnabled()); |
362 ShowSettingsSubPageForProfile( | 362 ShowSettingsSubPageForProfile( |
363 profile, GenerateContentSettingsExceptionsSubPage(content_settings_type)); | 363 profile, GenerateContentSettingsExceptionsSubPage(content_settings_type)); |
364 } | 364 } |
365 | 365 |
366 void ShowContentSettings(Browser* browser, | 366 void ShowContentSettings(Browser* browser, |
367 ContentSettingsType content_settings_type) { | 367 ContentSettingsType content_settings_type) { |
368 ShowSettingsSubPage( | 368 ShowSettingsSubPage( |
369 browser, | 369 browser, |
370 kContentSettingsSubPage + std::string(kHashMark) + | 370 kContentSettingsSubPage + std::string(kHashMark) + |
371 site_settings::ContentSettingsTypeToGroupName(content_settings_type)); | 371 site_settings::ContentSettingsTypeToGroupName(content_settings_type)); |
372 } | 372 } |
373 | 373 |
374 void ShowClearBrowsingDataDialog(Browser* browser) { | 374 void ShowClearBrowsingDataDialog(Browser* browser) { |
375 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg")); | 375 base::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg")); |
376 ShowSettingsSubPage(browser, kClearBrowserDataSubPage); | 376 ShowSettingsSubPage(browser, kClearBrowserDataSubPage); |
377 } | 377 } |
378 | 378 |
379 void ShowPasswordManager(Browser* browser) { | 379 void ShowPasswordManager(Browser* browser) { |
380 content::RecordAction(UserMetricsAction("Options_ShowPasswordManager")); | 380 base::RecordAction(UserMetricsAction("Options_ShowPasswordManager")); |
381 ShowSettingsSubPage(browser, kPasswordManagerSubPage); | 381 ShowSettingsSubPage(browser, kPasswordManagerSubPage); |
382 } | 382 } |
383 | 383 |
384 void ShowImportDialog(Browser* browser) { | 384 void ShowImportDialog(Browser* browser) { |
385 content::RecordAction(UserMetricsAction("Import_ShowDlg")); | 385 base::RecordAction(UserMetricsAction("Import_ShowDlg")); |
386 ShowSettingsSubPage(browser, kImportDataSubPage); | 386 ShowSettingsSubPage(browser, kImportDataSubPage); |
387 } | 387 } |
388 | 388 |
389 void ShowAboutChrome(Browser* browser) { | 389 void ShowAboutChrome(Browser* browser) { |
390 content::RecordAction(UserMetricsAction("AboutChrome")); | 390 base::RecordAction(UserMetricsAction("AboutChrome")); |
391 if (::switches::SettingsWindowEnabled()) { | 391 if (::switches::SettingsWindowEnabled()) { |
392 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( | 392 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( |
393 browser->profile(), GURL(kChromeUIHelpURL)); | 393 browser->profile(), GURL(kChromeUIHelpURL)); |
394 return; | 394 return; |
395 } | 395 } |
396 NavigateParams params( | 396 NavigateParams params( |
397 GetSingletonTabNavigateParams(browser, GURL(kChromeUIHelpURL))); | 397 GetSingletonTabNavigateParams(browser, GURL(kChromeUIHelpURL))); |
398 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; | 398 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; |
399 ShowSingletonTabOverwritingNTP(browser, params); | 399 ShowSingletonTabOverwritingNTP(browser, params); |
400 } | 400 } |
401 | 401 |
402 void ShowSearchEngineSettings(Browser* browser) { | 402 void ShowSearchEngineSettings(Browser* browser) { |
403 content::RecordAction(UserMetricsAction("EditSearchEngines")); | 403 base::RecordAction(UserMetricsAction("EditSearchEngines")); |
404 ShowSettingsSubPage(browser, kSearchEnginesSubPage); | 404 ShowSettingsSubPage(browser, kSearchEnginesSubPage); |
405 } | 405 } |
406 | 406 |
407 #if !defined(OS_ANDROID) | 407 #if !defined(OS_ANDROID) |
408 void ShowBrowserSignin(Browser* browser, | 408 void ShowBrowserSignin(Browser* browser, |
409 signin_metrics::AccessPoint access_point) { | 409 signin_metrics::AccessPoint access_point) { |
410 Profile* original_profile = browser->profile()->GetOriginalProfile(); | 410 Profile* original_profile = browser->profile()->GetOriginalProfile(); |
411 SigninManagerBase* manager = | 411 SigninManagerBase* manager = |
412 SigninManagerFactory::GetForProfile(original_profile); | 412 SigninManagerFactory::GetForProfile(original_profile); |
413 DCHECK(manager->IsSigninAllowed()); | 413 DCHECK(manager->IsSigninAllowed()); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 SigninManagerFactory::GetForProfile(original_profile); | 455 SigninManagerFactory::GetForProfile(original_profile); |
456 DCHECK(manager->IsSigninAllowed()); | 456 DCHECK(manager->IsSigninAllowed()); |
457 if (manager->IsAuthenticated()) | 457 if (manager->IsAuthenticated()) |
458 ShowSettings(browser); | 458 ShowSettings(browser); |
459 else | 459 else |
460 ShowBrowserSignin(browser, access_point); | 460 ShowBrowserSignin(browser, access_point); |
461 } | 461 } |
462 #endif | 462 #endif |
463 | 463 |
464 } // namespace chrome | 464 } // namespace chrome |
OLD | NEW |