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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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) 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/gtk/first_run_bubble.h" 5 #include "chrome/browser/ui/gtk/first_run_bubble.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 26 matching lines...) Expand all
37 void FirstRunBubble::BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) { 37 void FirstRunBubble::BubbleClosing(BubbleGtk* bubble, bool closed_by_escape) {
38 // TODO(port): Enable parent window 38 // TODO(port): Enable parent window
39 } 39 }
40 40
41 FirstRunBubble::FirstRunBubble(Browser* browser, 41 FirstRunBubble::FirstRunBubble(Browser* browser,
42 GtkWidget* anchor, 42 GtkWidget* anchor,
43 const gfx::Rect& rect) 43 const gfx::Rect& rect)
44 : browser_(browser), 44 : browser_(browser),
45 bubble_(NULL) { 45 bubble_(NULL) {
46 GtkThemeService* theme_service = GtkThemeService::GetFrom(browser->profile()); 46 GtkThemeService* theme_service = GtkThemeService::GetFrom(browser->profile());
47 GtkWidget* title = theme_service->BuildLabel("", ui::kGdkBlack); 47 GtkWidget* title = theme_service->BuildLabel(std::string(), ui::kGdkBlack);
48 char* markup = g_markup_printf_escaped(kSearchLabelMarkup, 48 char* markup = g_markup_printf_escaped(
49 kSearchLabelMarkup,
49 l10n_util::GetStringFUTF8(IDS_FR_BUBBLE_TITLE, 50 l10n_util::GetStringFUTF8(IDS_FR_BUBBLE_TITLE,
50 GetDefaultSearchEngineName(browser->profile())).c_str()); 51 GetDefaultSearchEngineName(browser->profile()))
52 .c_str());
51 gtk_label_set_markup(GTK_LABEL(title), markup); 53 gtk_label_set_markup(GTK_LABEL(title), markup);
52 g_free(markup); 54 g_free(markup);
53 55
54 GtkWidget* change = theme_service->BuildChromeLinkButton( 56 GtkWidget* change = theme_service->BuildChromeLinkButton(
55 l10n_util::GetStringUTF8(IDS_FR_BUBBLE_CHANGE)); 57 l10n_util::GetStringUTF8(IDS_FR_BUBBLE_CHANGE));
56 g_signal_connect(change, "clicked", G_CALLBACK(&HandleChangeLinkThunk), this); 58 g_signal_connect(change, "clicked", G_CALLBACK(&HandleChangeLinkThunk), this);
57 59
58 GtkWidget* subtext = theme_service->BuildLabel( 60 GtkWidget* subtext = theme_service->BuildLabel(
59 l10n_util::GetStringUTF8(IDS_FR_BUBBLE_SUBTEXT), ui::kGdkBlack); 61 l10n_util::GetStringUTF8(IDS_FR_BUBBLE_SUBTEXT), ui::kGdkBlack);
60 62
(...skipping 29 matching lines...) Expand all
90 92
91 void FirstRunBubble::HandleChangeLink(GtkWidget* sender) { 93 void FirstRunBubble::HandleChangeLink(GtkWidget* sender) {
92 first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_CHANGE_INVOKED); 94 first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_CHANGE_INVOKED);
93 95
94 // Cache browser_ before closing the bubble, which deletes |this|. 96 // Cache browser_ before closing the bubble, which deletes |this|.
95 Browser* browser = browser_; 97 Browser* browser = browser_;
96 bubble_->Close(); 98 bubble_->Close();
97 if (browser) 99 if (browser)
98 chrome::ShowSearchEngineSettings(browser); 100 chrome::ShowSearchEngineSettings(browser);
99 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698