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

Side by Side Diff: cloud_print/gcp20/prototype/cloud_print_requester.cc

Issue 1553493002: Global conversion of Pass()→std::move() on OS=linux chromecast=1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix fragile include order Created 4 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
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/cloud_print_requester.h" 5 #include "cloud_print/gcp20/prototype/cloud_print_requester.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8
9 #include <limits> 8 #include <limits>
9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/json/json_writer.h" 12 #include "base/json/json_writer.h"
13 #include "base/md5.h" 13 #include "base/md5.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/rand_util.h" 15 #include "base/rand_util.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h" 17 #include "cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h"
18 #include "google_apis/google_api_keys.h" 18 #include "google_apis/google_api_keys.h"
19 #include "net/base/escape.h" 19 #include "net/base/escape.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 std::string LocalSettingsToJson(const LocalSettings& settings) { 83 std::string LocalSettingsToJson(const LocalSettings& settings) {
84 base::DictionaryValue dictionary; 84 base::DictionaryValue dictionary;
85 scoped_ptr<base::DictionaryValue> current(new base::DictionaryValue); 85 scoped_ptr<base::DictionaryValue> current(new base::DictionaryValue);
86 86
87 // TODO(maksymb): Formalize text as constants. 87 // TODO(maksymb): Formalize text as constants.
88 current->SetBoolean("local_discovery", settings.local_discovery); 88 current->SetBoolean("local_discovery", settings.local_discovery);
89 current->SetBoolean("access_token_enabled", settings.access_token_enabled); 89 current->SetBoolean("access_token_enabled", settings.access_token_enabled);
90 current->SetBoolean("printer/local_printing_enabled", 90 current->SetBoolean("printer/local_printing_enabled",
91 settings.local_printing_enabled); 91 settings.local_printing_enabled);
92 current->SetInteger("xmpp_timeout_value", settings.xmpp_timeout_value); 92 current->SetInteger("xmpp_timeout_value", settings.xmpp_timeout_value);
93 dictionary.Set("current", current.Pass()); 93 dictionary.Set("current", std::move(current));
94 94
95 std::string local_settings; 95 std::string local_settings;
96 base::JSONWriter::Write(dictionary, &local_settings); 96 base::JSONWriter::Write(dictionary, &local_settings);
97 return local_settings; 97 return local_settings;
98 } 98 }
99 99
100 } // namespace 100 } // namespace
101 101
102 using cloud_print_response_parser::Job; 102 using cloud_print_response_parser::Job;
103 103
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 delegate_->OnLocalSettingsReceived(state, settings); 463 delegate_->OnLocalSettingsReceived(state, settings);
464 } else { 464 } else {
465 delegate_->OnServerError(error_description); 465 delegate_->OnServerError(error_description);
466 } 466 }
467 } 467 }
468 468
469 void CloudPrintRequester::ParseLocalSettingUpdated( 469 void CloudPrintRequester::ParseLocalSettingUpdated(
470 const std::string& response) { 470 const std::string& response) {
471 delegate_->OnLocalSettingsUpdated(); 471 delegate_->OnLocalSettingsUpdated();
472 } 472 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698