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

Unified Diff: remoting/host/disconnect_window_linux.cc

Issue 7669045: Make ChromotingHost::ui_strings() immutable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/disconnect_window_linux.cc
diff --git a/remoting/host/disconnect_window_linux.cc b/remoting/host/disconnect_window_linux.cc
index ad2707d9f789da6cafbbd2149cf6882d70089583..764996adcac4469dbe7d018a43e846d1d411ed00 100644
--- a/remoting/host/disconnect_window_linux.cc
+++ b/remoting/host/disconnect_window_linux.cc
@@ -36,7 +36,7 @@ class DisconnectWindowLinux : public DisconnectWindow {
private:
CHROMEGTK_CALLBACK_1(DisconnectWindowLinux, void, OnResponse, int);
- void CreateWindow(UiStrings* ui_strings);
+ void CreateWindow(const UiStrings& ui_strings);
ChromotingHost* host_;
GtkWidget* disconnect_window_;
@@ -53,14 +53,14 @@ DisconnectWindowLinux::DisconnectWindowLinux()
DisconnectWindowLinux::~DisconnectWindowLinux() {
}
-void DisconnectWindowLinux::CreateWindow(UiStrings* ui_strings) {
+void DisconnectWindowLinux::CreateWindow(const UiStrings& ui_strings) {
if (disconnect_window_) return;
disconnect_window_ = gtk_dialog_new_with_buttons(
- ui_strings->product_name.c_str(),
+ ui_strings.product_name.c_str(),
NULL,
GTK_DIALOG_NO_SEPARATOR,
- ui_strings->disconnect_button_text_plus_shortcut.c_str(), GTK_RESPONSE_OK,
+ ui_strings.disconnect_button_text_plus_shortcut.c_str(), GTK_RESPONSE_OK,
NULL);
GtkWindow* window = GTK_WINDOW(disconnect_window_);
@@ -98,7 +98,7 @@ void DisconnectWindowLinux::Show(ChromotingHost* host,
host_ = host;
CreateWindow(host->ui_strings());
gtk_label_set_text(GTK_LABEL(message_),
- host->ui_strings()->disconnect_message.c_str());
+ host->ui_strings().disconnect_message.c_str());
gtk_window_present(GTK_WINDOW(disconnect_window_));
}

Powered by Google App Engine
This is Rietveld 408576698