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

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: Cleaned up Created 4 years, 12 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 | « sync/syncable/directory_backing_store.cc ('k') | sync/test/fake_server/fake_server.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) 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 <stdint.h> 7 #include <stdint.h>
8 #include <utility>
8 9
9 #include "base/json/string_escape.h" 10 #include "base/json/string_escape.h"
10 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
11 #include "sync/protocol/proto_value_conversions.h" 12 #include "sync/protocol/proto_value_conversions.h"
12 #include "sync/syncable/syncable_columns.h" 13 #include "sync/syncable/syncable_columns.h"
13 #include "sync/syncable/syncable_enum_conversions.h" 14 #include "sync/syncable/syncable_enum_conversions.h"
14 #include "sync/util/cryptographer.h" 15 #include "sync/util/cryptographer.h"
15 16
16 namespace syncer { 17 namespace syncer {
17 namespace syncable { 18 namespace syncable {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const sync_pb::EncryptedData& encrypted = kernel.ref(field).encrypted(); 105 const sync_pb::EncryptedData& encrypted = kernel.ref(field).encrypted();
105 if (cryptographer && 106 if (cryptographer &&
106 kernel.ref(field).has_encrypted() && 107 kernel.ref(field).has_encrypted() &&
107 cryptographer->CanDecrypt(encrypted) && 108 cryptographer->CanDecrypt(encrypted) &&
108 cryptographer->Decrypt(encrypted, &decrypted)) { 109 cryptographer->Decrypt(encrypted, &decrypted)) {
109 value = EntitySpecificsToValue(decrypted); 110 value = EntitySpecificsToValue(decrypted);
110 value->SetBoolean("encrypted", true); 111 value->SetBoolean("encrypted", true);
111 } else { 112 } else {
112 value = EntitySpecificsToValue(kernel.ref(field)); 113 value = EntitySpecificsToValue(kernel.ref(field));
113 } 114 }
114 dictionary_value->Set(key, value.Pass()); 115 dictionary_value->Set(key, std::move(value));
115 } 116 }
116 } 117 }
117 118
118 // Helper functions for SetFieldValues(). 119 // Helper functions for SetFieldValues().
119 120
120 base::StringValue* Int64ToValue(int64_t i) { 121 base::StringValue* Int64ToValue(int64_t i) {
121 return new base::StringValue(base::Int64ToString(i)); 122 return new base::StringValue(base::Int64ToString(i));
122 } 123 }
123 124
124 base::StringValue* TimeToValue(const base::Time& t) { 125 base::StringValue* TimeToValue(const base::Time& t) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 os << "TempFlags: "; 285 os << "TempFlags: ";
285 for (; i < BIT_TEMPS_END; ++i) { 286 for (; i < BIT_TEMPS_END; ++i) {
286 if (kernel->ref(static_cast<BitTemp>(i))) 287 if (kernel->ref(static_cast<BitTemp>(i)))
287 os << "#" << i - BIT_TEMPS_BEGIN << ", "; 288 os << "#" << i - BIT_TEMPS_BEGIN << ", ";
288 } 289 }
289 return os; 290 return os;
290 } 291 }
291 292
292 } // namespace syncable 293 } // namespace syncable
293 } // namespace syncer 294 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/syncable/directory_backing_store.cc ('k') | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698