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

Side by Side Diff: chrome/browser/sync/sync_setup_flow.cc

Issue 6134010: Revert 71167 - Remove wstring from gfx.... (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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/sync/sync_setup_flow.h" 5 #include "chrome/browser/sync/sync_setup_flow.h"
6 6
7 #include "app/gfx/font_util.h" 7 #include "app/gfx/font_util.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 SyncSetupFlow::~SyncSetupFlow() { 366 SyncSetupFlow::~SyncSetupFlow() {
367 flow_handler_->set_flow(NULL); 367 flow_handler_->set_flow(NULL);
368 if (owns_flow_handler_) { 368 if (owns_flow_handler_) {
369 delete flow_handler_; 369 delete flow_handler_;
370 } 370 }
371 } 371 }
372 372
373 void SyncSetupFlow::GetDialogSize(gfx::Size* size) const { 373 void SyncSetupFlow::GetDialogSize(gfx::Size* size) const {
374 PrefService* prefs = service_->profile()->GetPrefs(); 374 PrefService* prefs = service_->profile()->GetPrefs();
375 gfx::Font approximate_web_font = gfx::Font( 375 gfx::Font approximate_web_font = gfx::Font(
376 UTF8ToUTF16(prefs->GetString(prefs::kWebKitSansSerifFontFamily)), 376 UTF8ToWide(prefs->GetString(prefs::kWebKitSansSerifFontFamily)),
377 prefs->GetInteger(prefs::kWebKitDefaultFontSize)); 377 prefs->GetInteger(prefs::kWebKitDefaultFontSize));
378 378
379 *size = gfx::GetLocalizedContentsSizeForFont( 379 *size = gfx::GetLocalizedContentsSizeForFont(
380 IDS_SYNC_SETUP_WIZARD_WIDTH_CHARS, 380 IDS_SYNC_SETUP_WIZARD_WIDTH_CHARS,
381 IDS_SYNC_SETUP_WIZARD_HEIGHT_LINES, 381 IDS_SYNC_SETUP_WIZARD_HEIGHT_LINES,
382 approximate_web_font); 382 approximate_web_font);
383 383
384 #if defined(OS_MACOSX) 384 #if defined(OS_MACOSX)
385 // NOTE(akalin): This is a hack to work around a problem with font height on 385 // NOTE(akalin): This is a hack to work around a problem with font height on
386 // windows. Basically font metrics are incorrectly returned in logical units 386 // windows. Basically font metrics are incorrectly returned in logical units
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 service_->OnUserChoseDatatypes(false, registered_types); 753 service_->OnUserChoseDatatypes(false, registered_types);
754 } else if (option == "google") { 754 } else if (option == "google") {
755 // Implicit passphrase already set up. 755 // Implicit passphrase already set up.
756 Advance(SyncSetupWizard::DONE); 756 Advance(SyncSetupWizard::DONE);
757 } 757 }
758 } 758 }
759 759
760 void SyncSetupFlow::OnGoToDashboard() { 760 void SyncSetupFlow::OnGoToDashboard() {
761 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); 761 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate();
762 } 762 }
OLDNEW
« no previous file with comments | « chrome/browser/remoting/setup_flow.cc ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698