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

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

Issue 7550050: Convert LocationBar::GetInputString from wstring to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gurl string16 Created 9 years, 4 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
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 <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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_omnibox_apitest.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698