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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 ShowSingletonTab(GURL(report_page_url)); | 2243 ShowSingletonTab(GURL(report_page_url)); |
2244 } | 2244 } |
2245 | 2245 |
2246 void Browser::ShowOptionsTab(const std::string& sub_page) { | 2246 void Browser::ShowOptionsTab(const std::string& sub_page) { |
2247 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableUberPage)) { | 2247 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableUberPage)) { |
2248 browser::NavigateParams params(GetSingletonTabNavigateParams( | 2248 browser::NavigateParams params(GetSingletonTabNavigateParams( |
2249 GURL(chrome::kChromeUISettingsURL + sub_page))); | 2249 GURL(chrome::kChromeUISettingsURL + sub_page))); |
2250 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 2250 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
2251 ShowSingletonTabOverwritingNTP(params); | 2251 ShowSingletonTabOverwritingNTP(params); |
2252 } else { | 2252 } else { |
2253 browser::NavigateParams params(GetSingletonTabNavigateParams( | 2253 std::string url; |
2254 GURL(std::string(chrome::kChromeUIUberURL) + | 2254 if (sub_page == chrome::kExtensionsSubPage) { |
2255 chrome::kChromeUISettingsHost + '/' + sub_page))); | 2255 url = std::string(chrome::kChromeUIUberURL) + |
| 2256 chrome::kChromeUIExtensionsHost; |
| 2257 } else { |
| 2258 url = std::string(chrome::kChromeUIUberURL) + |
| 2259 chrome::kChromeUISettingsHost + '/' + sub_page; |
| 2260 } |
| 2261 browser::NavigateParams params(GetSingletonTabNavigateParams(GURL(url))); |
2256 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 2262 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
2257 ShowSingletonTabOverwritingNTP(params); | 2263 ShowSingletonTabOverwritingNTP(params); |
2258 } | 2264 } |
2259 } | 2265 } |
2260 | 2266 |
2261 void Browser::OpenClearBrowsingDataDialog() { | 2267 void Browser::OpenClearBrowsingDataDialog() { |
2262 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg")); | 2268 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg")); |
2263 ShowOptionsTab(chrome::kClearBrowserDataSubPage); | 2269 ShowOptionsTab(chrome::kClearBrowserDataSubPage); |
2264 } | 2270 } |
2265 | 2271 |
(...skipping 3221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5487 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); | 5493 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); |
5488 window_->GetLocationBar()->ShowFirstRunBubble(); | 5494 window_->GetLocationBar()->ShowFirstRunBubble(); |
5489 } else { | 5495 } else { |
5490 GlobalErrorService* service = | 5496 GlobalErrorService* service = |
5491 GlobalErrorServiceFactory::GetForProfile(profile()); | 5497 GlobalErrorServiceFactory::GetForProfile(profile()); |
5492 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5498 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5493 if (error) | 5499 if (error) |
5494 error->ShowBubbleView(this); | 5500 error->ShowBubbleView(this); |
5495 } | 5501 } |
5496 } | 5502 } |
OLD | NEW |