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

Side by Side Diff: components/sync/engine/model_safe_worker.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
« no previous file with comments | « components/sync/engine/engine_util.cc ('k') | components/sync/engine/net/http_bridge.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 "components/sync/engine/model_safe_worker.h" 5 #include "components/sync/engine/model_safe_worker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // destroyed (see MessageLoop::~MessageLoop). So syncer will be blocked 117 // destroyed (see MessageLoop::~MessageLoop). So syncer will be blocked
118 // indefinitely without signaling here. 118 // indefinitely without signaling here.
119 work_done_or_stopped_.Signal(); 119 work_done_or_stopped_.Signal();
120 120
121 DVLOG(1) << ModelSafeGroupToString(GetModelSafeGroup()) 121 DVLOG(1) << ModelSafeGroupToString(GetModelSafeGroup())
122 << " worker stops on destruction of its working thread."; 122 << " worker stops on destruction of its working thread.";
123 } 123 }
124 124
125 { 125 {
126 base::AutoLock l(working_task_runner_lock_); 126 base::AutoLock l(working_task_runner_lock_);
127 working_task_runner_ = NULL; 127 working_task_runner_ = nullptr;
128 } 128 }
129 129
130 if (observer_) 130 if (observer_)
131 observer_->OnWorkerLoopDestroyed(GetModelSafeGroup()); 131 observer_->OnWorkerLoopDestroyed(GetModelSafeGroup());
132 } 132 }
133 133
134 void ModelSafeWorker::SetWorkingLoopToCurrent() { 134 void ModelSafeWorker::SetWorkingLoopToCurrent() {
135 base::Callback<void(ModelSafeGroup)> unregister_done_callback; 135 base::Callback<void(ModelSafeGroup)> unregister_done_callback;
136 136
137 { 137 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return; 189 return;
190 DCHECK(working_task_runner_->BelongsToCurrentThread()); 190 DCHECK(working_task_runner_->BelongsToCurrentThread());
191 } 191 }
192 192
193 DCHECK(stopped_); 193 DCHECK(stopped_);
194 base::MessageLoop::current()->RemoveDestructionObserver(this); 194 base::MessageLoop::current()->RemoveDestructionObserver(this);
195 unregister_done_callback.Run(GetModelSafeGroup()); 195 unregister_done_callback.Run(GetModelSafeGroup());
196 } 196 }
197 197
198 } // namespace syncer 198 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine/engine_util.cc ('k') | components/sync/engine/net/http_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698