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

Side by Side Diff: chrome/browser/sync/engine/model_safe_worker.cc

Issue 7891054: Add GROUP_FILE ModelSafeGroup (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix worker count in unittest Created 9 years, 3 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/engine/model_safe_worker.h" 5 #include "chrome/browser/sync/engine/model_safe_worker.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 return it->second; 53 return it->second;
54 } 54 }
55 55
56 std::string ModelSafeGroupToString(ModelSafeGroup group) { 56 std::string ModelSafeGroupToString(ModelSafeGroup group) {
57 switch (group) { 57 switch (group) {
58 case GROUP_UI: 58 case GROUP_UI:
59 return "GROUP_UI"; 59 return "GROUP_UI";
60 case GROUP_DB: 60 case GROUP_DB:
61 return "GROUP_DB"; 61 return "GROUP_DB";
62 case GROUP_FILE:
63 return "GROUP_FILE";
62 case GROUP_HISTORY: 64 case GROUP_HISTORY:
63 return "GROUP_HISTORY"; 65 return "GROUP_HISTORY";
64 case GROUP_PASSIVE: 66 case GROUP_PASSIVE:
65 return "GROUP_PASSIVE"; 67 return "GROUP_PASSIVE";
66 case GROUP_PASSWORD: 68 case GROUP_PASSWORD:
67 return "GROUP_PASSWORD"; 69 return "GROUP_PASSWORD";
68 default: 70 default:
69 NOTREACHED(); 71 NOTREACHED();
70 return "INVALID"; 72 return "INVALID";
71 } 73 }
72 } 74 }
73 75
74 ModelSafeWorker::ModelSafeWorker() {} 76 ModelSafeWorker::ModelSafeWorker() {}
75 77
76 ModelSafeWorker::~ModelSafeWorker() {} 78 ModelSafeWorker::~ModelSafeWorker() {}
77 79
78 void ModelSafeWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { 80 void ModelSafeWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) {
79 work->Run(); // For GROUP_PASSIVE, we do the work on the current thread. 81 work->Run(); // For GROUP_PASSIVE, we do the work on the current thread.
80 } 82 }
81 83
82 ModelSafeGroup ModelSafeWorker::GetModelSafeGroup() { 84 ModelSafeGroup ModelSafeWorker::GetModelSafeGroup() {
83 return GROUP_PASSIVE; 85 return GROUP_PASSIVE;
84 } 86 }
85 87
86 } // namespace browser_sync 88 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/model_safe_worker.h ('k') | chrome/browser/sync/glue/browser_thread_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698