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

Side by Side Diff: sync/syncable/entry_kernel.cc

Issue 1539843002: Convert Pass()→std::move() in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 (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 "sync/syncable/entry_kernel.h" 5 #include "sync/syncable/entry_kernel.h"
6 6
7 #include <utility>
8
7 #include "base/json/string_escape.h" 9 #include "base/json/string_escape.h"
8 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
9 #include "sync/protocol/proto_value_conversions.h" 11 #include "sync/protocol/proto_value_conversions.h"
10 #include "sync/syncable/syncable_columns.h" 12 #include "sync/syncable/syncable_columns.h"
11 #include "sync/syncable/syncable_enum_conversions.h" 13 #include "sync/syncable/syncable_enum_conversions.h"
12 #include "sync/util/cryptographer.h" 14 #include "sync/util/cryptographer.h"
13 15
14 namespace syncer { 16 namespace syncer {
15 namespace syncable { 17 namespace syncable {
16 18
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const sync_pb::EncryptedData& encrypted = kernel.ref(field).encrypted(); 104 const sync_pb::EncryptedData& encrypted = kernel.ref(field).encrypted();
103 if (cryptographer && 105 if (cryptographer &&
104 kernel.ref(field).has_encrypted() && 106 kernel.ref(field).has_encrypted() &&
105 cryptographer->CanDecrypt(encrypted) && 107 cryptographer->CanDecrypt(encrypted) &&
106 cryptographer->Decrypt(encrypted, &decrypted)) { 108 cryptographer->Decrypt(encrypted, &decrypted)) {
107 value = EntitySpecificsToValue(decrypted); 109 value = EntitySpecificsToValue(decrypted);
108 value->SetBoolean("encrypted", true); 110 value->SetBoolean("encrypted", true);
109 } else { 111 } else {
110 value = EntitySpecificsToValue(kernel.ref(field)); 112 value = EntitySpecificsToValue(kernel.ref(field));
111 } 113 }
112 dictionary_value->Set(key, value.Pass()); 114 dictionary_value->Set(key, std::move(value));
113 } 115 }
114 } 116 }
115 117
116 // Helper functions for SetFieldValues(). 118 // Helper functions for SetFieldValues().
117 119
118 base::StringValue* Int64ToValue(int64 i) { 120 base::StringValue* Int64ToValue(int64 i) {
119 return new base::StringValue(base::Int64ToString(i)); 121 return new base::StringValue(base::Int64ToString(i));
120 } 122 }
121 123
122 base::StringValue* TimeToValue(const base::Time& t) { 124 base::StringValue* TimeToValue(const base::Time& t) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 os << "TempFlags: "; 284 os << "TempFlags: ";
283 for (; i < BIT_TEMPS_END; ++i) { 285 for (; i < BIT_TEMPS_END; ++i) {
284 if (kernel->ref(static_cast<BitTemp>(i))) 286 if (kernel->ref(static_cast<BitTemp>(i)))
285 os << "#" << i - BIT_TEMPS_BEGIN << ", "; 287 os << "#" << i - BIT_TEMPS_BEGIN << ", ";
286 } 288 }
287 return os; 289 return os;
288 } 290 }
289 291
290 } // namespace syncable 292 } // namespace syncable
291 } // namespace syncer 293 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698