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

Side by Side Diff: chrome/browser/sync/glue/session_model_associator.cc

Issue 26594002: Chrome sync: Put WeakPtrFactory members at the end (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 "chrome/browser/sync/glue/session_model_associator.h" 5 #include "chrome/browser/sync/glue/session_model_associator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 SessionModelAssociator::SessionModelAssociator( 117 SessionModelAssociator::SessionModelAssociator(
118 ProfileSyncService* sync_service, 118 ProfileSyncService* sync_service,
119 DataTypeErrorHandler* error_handler) 119 DataTypeErrorHandler* error_handler)
120 : local_tab_pool_(sync_service), 120 : local_tab_pool_(sync_service),
121 local_session_syncid_(syncer::kInvalidId), 121 local_session_syncid_(syncer::kInvalidId),
122 sync_service_(sync_service), 122 sync_service_(sync_service),
123 stale_session_threshold_days_(kDefaultStaleSessionThresholdDays), 123 stale_session_threshold_days_(kDefaultStaleSessionThresholdDays),
124 setup_for_test_(false), 124 setup_for_test_(false),
125 waiting_for_change_(false), 125 waiting_for_change_(false),
126 test_weak_factory_(this),
127 profile_(sync_service->profile()), 126 profile_(sync_service->profile()),
128 error_handler_(error_handler), 127 error_handler_(error_handler),
129 favicon_cache_(profile_, 128 favicon_cache_(profile_,
130 sync_service->current_experiments().favicon_sync_limit) { 129 sync_service->current_experiments().favicon_sync_limit),
130 test_weak_factory_(this) {
131 DCHECK(CalledOnValidThread()); 131 DCHECK(CalledOnValidThread());
132 DCHECK(sync_service_); 132 DCHECK(sync_service_);
133 DCHECK(profile_); 133 DCHECK(profile_);
134 } 134 }
135 135
136 SessionModelAssociator::SessionModelAssociator(ProfileSyncService* sync_service, 136 SessionModelAssociator::SessionModelAssociator(ProfileSyncService* sync_service,
137 bool setup_for_test) 137 bool setup_for_test)
138 : local_tab_pool_(sync_service), 138 : local_tab_pool_(sync_service),
139 local_session_syncid_(syncer::kInvalidId), 139 local_session_syncid_(syncer::kInvalidId),
140 sync_service_(sync_service), 140 sync_service_(sync_service),
141 stale_session_threshold_days_(kDefaultStaleSessionThresholdDays), 141 stale_session_threshold_days_(kDefaultStaleSessionThresholdDays),
142 setup_for_test_(setup_for_test), 142 setup_for_test_(setup_for_test),
143 waiting_for_change_(false), 143 waiting_for_change_(false),
144 test_weak_factory_(this),
145 profile_(sync_service->profile()), 144 profile_(sync_service->profile()),
146 error_handler_(NULL), 145 error_handler_(NULL),
147 favicon_cache_(profile_, kMaxSyncFavicons) { 146 favicon_cache_(profile_, kMaxSyncFavicons),
147 test_weak_factory_(this) {
148 DCHECK(CalledOnValidThread()); 148 DCHECK(CalledOnValidThread());
149 DCHECK(sync_service_); 149 DCHECK(sync_service_);
150 DCHECK(profile_); 150 DCHECK(profile_);
151 DCHECK(setup_for_test); 151 DCHECK(setup_for_test);
152 } 152 }
153 153
154 SessionModelAssociator::~SessionModelAssociator() { 154 SessionModelAssociator::~SessionModelAssociator() {
155 DCHECK(CalledOnValidThread()); 155 DCHECK(CalledOnValidThread());
156 } 156 }
157 157
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 tab_s->set_tab_id(new_tab_id); 1210 tab_s->set_tab_id(new_tab_id);
1211 tab_node.SetSessionSpecifics(session_specifics); 1211 tab_node.SetSessionSpecifics(session_specifics);
1212 // Update tab node pool with the new association. 1212 // Update tab node pool with the new association.
1213 local_tab_pool_.ReassociateTabNode(tab_node_id, new_tab_id); 1213 local_tab_pool_.ReassociateTabNode(tab_node_id, new_tab_id);
1214 } 1214 }
1215 } 1215 }
1216 } 1216 }
1217 } 1217 }
1218 1218
1219 } // namespace browser_sync 1219 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698