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

Side by Side Diff: components/browser_sync/profile_sync_service.cc

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Comment Updates Created 3 years, 9 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 (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 "components/browser_sync/profile_sync_service.h" 5 #include "components/browser_sync/profile_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after
2104 2104
2105 syncer::ModelTypeSet awaiting_types_; 2105 syncer::ModelTypeSet awaiting_types_;
2106 base::Callback<void(std::unique_ptr<base::ListValue>)> callback_; 2106 base::Callback<void(std::unique_ptr<base::ListValue>)> callback_;
2107 }; 2107 };
2108 2108
2109 GetAllNodesRequestHelper::GetAllNodesRequestHelper( 2109 GetAllNodesRequestHelper::GetAllNodesRequestHelper(
2110 syncer::ModelTypeSet requested_types, 2110 syncer::ModelTypeSet requested_types,
2111 const base::Callback<void(std::unique_ptr<base::ListValue>)>& callback) 2111 const base::Callback<void(std::unique_ptr<base::ListValue>)>& callback)
2112 : result_accumulator_(new base::ListValue()), 2112 : result_accumulator_(new base::ListValue()),
2113 awaiting_types_(requested_types), 2113 awaiting_types_(requested_types),
2114 callback_(callback) {} 2114 callback_(callback) {
2115 result_accumulator_->Reserve(awaiting_types_.Size());
jdoerrie 2017/03/15 10:10:41 This was a tricky one to debug. Prior to this chan
skym 2017/03/15 16:57:23 While I don't understand why noexcept is required
brettw 2017/03/15 22:14:14 I thought about this for a while and it doesn't ma
jdoerrie 2017/03/16 19:01:56 I reinvestigated this today, but it still does not
2116 }
2115 2117
2116 GetAllNodesRequestHelper::~GetAllNodesRequestHelper() { 2118 GetAllNodesRequestHelper::~GetAllNodesRequestHelper() {
2117 if (!awaiting_types_.Empty()) { 2119 if (!awaiting_types_.Empty()) {
2118 DLOG(WARNING) 2120 DLOG(WARNING)
2119 << "GetAllNodesRequest deleted before request was fulfilled. " 2121 << "GetAllNodesRequest deleted before request was fulfilled. "
2120 << "Missing types are: " << ModelTypeSetToString(awaiting_types_); 2122 << "Missing types are: " << ModelTypeSetToString(awaiting_types_);
2121 } 2123 }
2122 } 2124 }
2123 2125
2124 // Called when the set of nodes for a type has been returned. 2126 // Called when the set of nodes for a type has been returned.
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2437 return; 2439 return;
2438 2440
2439 DCHECK(startup_controller_->IsSetupInProgress()); 2441 DCHECK(startup_controller_->IsSetupInProgress());
2440 startup_controller_->SetSetupInProgress(false); 2442 startup_controller_->SetSetupInProgress(false);
2441 2443
2442 if (IsEngineInitialized()) 2444 if (IsEngineInitialized())
2443 ReconfigureDatatypeManager(); 2445 ReconfigureDatatypeManager();
2444 NotifyObservers(); 2446 NotifyObservers();
2445 } 2447 }
2446 } // namespace browser_sync 2448 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698