| OLD | NEW |
| 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 <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 UserMetrics::RecordAction(UserMetricsAction("LoadURL")); | 1429 UserMetrics::RecordAction(UserMetricsAction("LoadURL")); |
| 1430 LocationBar* location_bar = window_->GetLocationBar(); | 1430 LocationBar* location_bar = window_->GetLocationBar(); |
| 1431 if (!location_bar) | 1431 if (!location_bar) |
| 1432 return; | 1432 return; |
| 1433 | 1433 |
| 1434 WindowOpenDisposition open_disposition = | 1434 WindowOpenDisposition open_disposition = |
| 1435 location_bar->GetWindowOpenDisposition(); | 1435 location_bar->GetWindowOpenDisposition(); |
| 1436 if (OpenInstant(open_disposition)) | 1436 if (OpenInstant(open_disposition)) |
| 1437 return; | 1437 return; |
| 1438 | 1438 |
| 1439 GURL url(WideToUTF8(location_bar->GetInputString())); | 1439 GURL url(location_bar->GetInputString()); |
| 1440 | 1440 |
| 1441 if (open_disposition == CURRENT_TAB && TabFinder::IsEnabled()) { | 1441 if (open_disposition == CURRENT_TAB && TabFinder::IsEnabled()) { |
| 1442 Browser* existing_browser = NULL; | 1442 Browser* existing_browser = NULL; |
| 1443 TabContents* existing_tab = TabFinder::GetInstance()->FindTab( | 1443 TabContents* existing_tab = TabFinder::GetInstance()->FindTab( |
| 1444 this, url, &existing_browser); | 1444 this, url, &existing_browser); |
| 1445 if (existing_tab) { | 1445 if (existing_tab) { |
| 1446 existing_browser->ActivateContents(existing_tab); | 1446 existing_browser->ActivateContents(existing_tab); |
| 1447 return; | 1447 return; |
| 1448 } | 1448 } |
| 1449 } | 1449 } |
| (...skipping 3402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4852 } | 4852 } |
| 4853 | 4853 |
| 4854 void Browser::ShowSyncSetup() { | 4854 void Browser::ShowSyncSetup() { |
| 4855 ProfileSyncService* service = | 4855 ProfileSyncService* service = |
| 4856 profile()->GetOriginalProfile()->GetProfileSyncService(); | 4856 profile()->GetOriginalProfile()->GetProfileSyncService(); |
| 4857 if (service->HasSyncSetupCompleted()) | 4857 if (service->HasSyncSetupCompleted()) |
| 4858 ShowOptionsTab(chrome::kSyncSetupSubPage); | 4858 ShowOptionsTab(chrome::kSyncSetupSubPage); |
| 4859 else | 4859 else |
| 4860 service->ShowLoginDialog(); | 4860 service->ShowLoginDialog(); |
| 4861 } | 4861 } |
| OLD | NEW |