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

Side by Side Diff: components/sync/engine_impl/sync_encryption_handler_impl.cc

Issue 2427803002: [Sync] Replacing NULL with nullptr in code and null in comments for components/sync/ (Closed)
Patch Set: Fixing start of sentence capitlization. Created 4 years, 2 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/sync/engine_impl/sync_encryption_handler_impl.h" 5 #include "components/sync/engine_impl/sync_encryption_handler_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return false; 165 return false;
166 } 166 }
167 std::string decrypted_keystore_bootstrap; 167 std::string decrypted_keystore_bootstrap;
168 if (!encryptor->DecryptString(base64_decoded_keystore_bootstrap, 168 if (!encryptor->DecryptString(base64_decoded_keystore_bootstrap,
169 &decrypted_keystore_bootstrap)) { 169 &decrypted_keystore_bootstrap)) {
170 return false; 170 return false;
171 } 171 }
172 172
173 JSONStringValueDeserializer json(decrypted_keystore_bootstrap); 173 JSONStringValueDeserializer json(decrypted_keystore_bootstrap);
174 std::unique_ptr<base::Value> deserialized_keystore_keys( 174 std::unique_ptr<base::Value> deserialized_keystore_keys(
175 json.Deserialize(NULL, NULL)); 175 json.Deserialize(nullptr, nullptr));
176 if (!deserialized_keystore_keys) 176 if (!deserialized_keystore_keys)
177 return false; 177 return false;
178 base::ListValue* internal_list_value = NULL; 178 base::ListValue* internal_list_value = nullptr;
179 if (!deserialized_keystore_keys->GetAsList(&internal_list_value)) 179 if (!deserialized_keystore_keys->GetAsList(&internal_list_value))
180 return false; 180 return false;
181 int number_of_keystore_keys = internal_list_value->GetSize(); 181 int number_of_keystore_keys = internal_list_value->GetSize();
182 if (!internal_list_value->GetString(number_of_keystore_keys - 1, 182 if (!internal_list_value->GetString(number_of_keystore_keys - 1,
183 current_keystore_key)) { 183 current_keystore_key)) {
184 return false; 184 return false;
185 } 185 }
186 old_keystore_keys->resize(number_of_keystore_keys - 1); 186 old_keystore_keys->resize(number_of_keystore_keys - 1);
187 for (int i = 0; i < number_of_keystore_keys - 1; ++i) 187 for (int i = 0; i < number_of_keystore_keys - 1; ++i)
188 internal_list_value->GetString(i, &(*old_keystore_keys)[i]); 188 internal_list_value->GetString(i, &(*old_keystore_keys)[i]);
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 base::Time SyncEncryptionHandlerImpl::GetExplicitPassphraseTime( 1678 base::Time SyncEncryptionHandlerImpl::GetExplicitPassphraseTime(
1679 PassphraseType passphrase_type) const { 1679 PassphraseType passphrase_type) const {
1680 if (passphrase_type == PassphraseType::FROZEN_IMPLICIT_PASSPHRASE) 1680 if (passphrase_type == PassphraseType::FROZEN_IMPLICIT_PASSPHRASE)
1681 return migration_time(); 1681 return migration_time();
1682 else if (passphrase_type == PassphraseType::CUSTOM_PASSPHRASE) 1682 else if (passphrase_type == PassphraseType::CUSTOM_PASSPHRASE)
1683 return custom_passphrase_time(); 1683 return custom_passphrase_time();
1684 return base::Time(); 1684 return base::Time();
1685 } 1685 }
1686 1686
1687 } // namespace syncer 1687 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698