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

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2802193002: Remove Noexcept and ModelTypeDebugInfo (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/values_unittest.cc ('k') | components/sync/model/model_type_debug_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/profile_sync_service.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 5eb7949df19312fb33f3f7d137fa9432ae7ff581..f4e201bd7620def41ec15fbaedf00cbc653907d3 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -2139,11 +2139,14 @@ void GetAllNodesRequestHelper::OnReceivedNodesForType(
std::unique_ptr<base::ListValue> node_list) {
DCHECK(thread_checker_.CalledOnValidThread());
- // Add these results to our list.
- std::unique_ptr<base::DictionaryValue> type_dict(new base::DictionaryValue());
- type_dict->SetString("type", ModelTypeToString(type));
- type_dict->Set("nodes", std::move(node_list));
- result_accumulator_->Append(std::move(type_dict));
+ if (node_list) {
+ // Add these results to our list.
+ std::unique_ptr<base::DictionaryValue> type_dict(
+ new base::DictionaryValue());
+ type_dict->SetString("type", ModelTypeToString(type));
+ type_dict->Set("nodes", std::move(node_list));
+ result_accumulator_->Append(std::move(type_dict));
+ }
// Remember that this part of the request is satisfied.
awaiting_types_.Remove(type);
« no previous file with comments | « base/values_unittest.cc ('k') | components/sync/model/model_type_debug_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698