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

Side by Side Diff: cloud_print/gcp20/prototype/printer.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cloud_print/gcp20/prototype/printer.h" 5 #include "cloud_print/gcp20/prototype/printer.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return; 186 return;
187 dns_server_.Shutdown(); 187 dns_server_.Shutdown();
188 http_server_.Shutdown(); 188 http_server_.Shutdown();
189 requester_.reset(); 189 requester_.reset();
190 print_job_handler_.reset(); 190 print_job_handler_.reset();
191 xmpp_listener_.reset(); 191 xmpp_listener_.reset();
192 } 192 }
193 193
194 std::string Printer::GetRawCdd() { 194 std::string Printer::GetRawCdd() {
195 std::string json_str; 195 std::string json_str;
196 base::JSONWriter::WriteWithOptions(&GetCapabilities(), 196 base::JSONWriter::WriteWithOptions(GetCapabilities(),
197 base::JSONWriter::OPTIONS_PRETTY_PRINT, 197 base::JSONWriter::OPTIONS_PRETTY_PRINT,
198 &json_str); 198 &json_str);
199 return json_str; 199 return json_str;
200 } 200 }
201 201
202 void Printer::OnAuthError() { 202 void Printer::OnAuthError() {
203 LOG(ERROR) << "Auth error occurred"; 203 LOG(ERROR) << "Auth error occurred";
204 state_.access_token_update = base::Time(); 204 state_.access_token_update = base::Time();
205 FallOffline(true); 205 FallOffline(true);
206 } 206 }
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 956
957 dns_server_.UpdateMetadata(CreateTxt()); 957 dns_server_.UpdateMetadata(CreateTxt());
958 958
959 if (connection_state_ == OFFLINE) { 959 if (connection_state_ == OFFLINE) {
960 requester_.reset(); 960 requester_.reset();
961 xmpp_listener_.reset(); 961 xmpp_listener_.reset();
962 } 962 }
963 963
964 return true; 964 return true;
965 } 965 }
OLDNEW
« no previous file with comments | « cloud_print/gcp20/prototype/cloud_print_requester.cc ('k') | cloud_print/gcp20/prototype/printer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698