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

Side by Side Diff: chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | chrome/renderer/net/net_error_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/webui/signin/profile_signin_confirmation_dialog.h" 5 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 std::string ProfileSigninConfirmationDialog::GetDialogArgs() const { 168 std::string ProfileSigninConfirmationDialog::GetDialogArgs() const {
169 std::string data; 169 std::string data;
170 base::DictionaryValue dict; 170 base::DictionaryValue dict;
171 dict.SetString("username", username_); 171 dict.SetString("username", username_);
172 dict.SetBoolean("promptForNewProfile", prompt_for_new_profile_); 172 dict.SetBoolean("promptForNewProfile", prompt_for_new_profile_);
173 #if defined(OS_WIN) 173 #if defined(OS_WIN)
174 dict.SetBoolean("hideTitle", true); 174 dict.SetBoolean("hideTitle", true);
175 #endif 175 #endif
176 base::JSONWriter::Write(&dict, &data); 176 base::JSONWriter::Write(dict, &data);
177 return data; 177 return data;
178 } 178 }
179 179
180 void ProfileSigninConfirmationDialog::OnDialogClosed( 180 void ProfileSigninConfirmationDialog::OnDialogClosed(
181 const std::string& json_retval) { 181 const std::string& json_retval) {
182 if (!closed_by_handler_) 182 if (!closed_by_handler_)
183 signin_delegate_->OnCancelSignin(); 183 signin_delegate_->OnCancelSignin();
184 } 184 }
185 185
186 void ProfileSigninConfirmationDialog::OnCloseContents( 186 void ProfileSigninConfirmationDialog::OnCloseContents(
187 content::WebContents* source, 187 content::WebContents* source,
188 bool* out_close_dialog) { 188 bool* out_close_dialog) {
189 *out_close_dialog = true; 189 *out_close_dialog = true;
190 } 190 }
191 191
192 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const { 192 bool ProfileSigninConfirmationDialog::ShouldShowDialogTitle() const {
193 return true; 193 return true;
194 } 194 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | chrome/renderer/net/net_error_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698