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

Side by Side Diff: sync/internal_api/public/engine/model_safe_worker.cc

Issue 1848793006: [Sync] Register USS types with ModelTypeRegistry before download (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 "sync/internal_api/public/engine/model_safe_worker.h" 5 #include "sync/internal_api/public/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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 case GROUP_DB: 56 case GROUP_DB:
57 return "GROUP_DB"; 57 return "GROUP_DB";
58 case GROUP_FILE: 58 case GROUP_FILE:
59 return "GROUP_FILE"; 59 return "GROUP_FILE";
60 case GROUP_HISTORY: 60 case GROUP_HISTORY:
61 return "GROUP_HISTORY"; 61 return "GROUP_HISTORY";
62 case GROUP_PASSIVE: 62 case GROUP_PASSIVE:
63 return "GROUP_PASSIVE"; 63 return "GROUP_PASSIVE";
64 case GROUP_PASSWORD: 64 case GROUP_PASSWORD:
65 return "GROUP_PASSWORD"; 65 return "GROUP_PASSWORD";
66 case GROUP_NON_BLOCKING:
67 return "GROUP_NON_BLOCKING";
66 default: 68 default:
67 NOTREACHED(); 69 NOTREACHED();
68 return "INVALID"; 70 return "INVALID";
69 } 71 }
70 } 72 }
71 73
72 ModelSafeWorker::ModelSafeWorker(WorkerLoopDestructionObserver* observer) 74 ModelSafeWorker::ModelSafeWorker(WorkerLoopDestructionObserver* observer)
73 : stopped_(false), 75 : stopped_(false),
74 work_done_or_stopped_(false, false), 76 work_done_or_stopped_(false, false),
75 observer_(observer), 77 observer_(observer),
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return; 191 return;
190 DCHECK_EQ(base::MessageLoop::current(), working_loop_); 192 DCHECK_EQ(base::MessageLoop::current(), working_loop_);
191 } 193 }
192 194
193 DCHECK(stopped_); 195 DCHECK(stopped_);
194 base::MessageLoop::current()->RemoveDestructionObserver(this); 196 base::MessageLoop::current()->RemoveDestructionObserver(this);
195 unregister_done_callback.Run(GetModelSafeGroup()); 197 unregister_done_callback.Run(GetModelSafeGroup());
196 } 198 }
197 199
198 } // namespace syncer 200 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698