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

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

Issue 8586042: Revert 110555 - sync: Remove ModelNeutralExecuteImpl() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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_changing_syncer_command.h" 5 #include "chrome/browser/sync/engine/model_changing_syncer_command.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback_old.h" 8 #include "base/callback_old.h"
9 #include "chrome/browser/sync/engine/model_safe_worker.h" 9 #include "chrome/browser/sync/engine/model_safe_worker.h"
10 #include "chrome/browser/sync/sessions/status_controller.h" 10 #include "chrome/browser/sync/sessions/status_controller.h"
11 #include "chrome/browser/sync/sessions/sync_session.h" 11 #include "chrome/browser/sync/sessions/sync_session.h"
12 #include "chrome/browser/sync/util/unrecoverable_error_info.h" 12 #include "chrome/browser/sync/util/unrecoverable_error_info.h"
13 13
14 namespace browser_sync { 14 namespace browser_sync {
15 15
16 void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) { 16 void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) {
17 work_session_ = session; 17 work_session_ = session;
18 if (!ModelNeutralExecuteImpl(work_session_)) {
19 return;
20 }
18 21
19 // Project the list of active types (i.e., types in the routing 22 // Project the list of active types (i.e., types in the routing
20 // info) to a list of groups. 23 // info) to a list of groups.
21 // 24 //
22 // TODO(akalin): Make this overrideable by subclasses (who might be 25 // TODO(akalin): Make this overrideable by subclasses (who might be
23 // working on a subset of |active_groups|). (See 26 // working on a subset of |active_groups|). (See
24 // http://crbug.com/97832.) 27 // http://crbug.com/97832.)
25 std::set<ModelSafeGroup> active_groups; 28 std::set<ModelSafeGroup> active_groups;
26 const ModelSafeRoutingInfo& routing_info = session->routing_info(); 29 const ModelSafeRoutingInfo& routing_info = session->routing_info();
27 for (ModelSafeRoutingInfo::const_iterator it = routing_info.begin(); 30 for (ModelSafeRoutingInfo::const_iterator it = routing_info.begin();
(...skipping 21 matching lines...) Expand all
49 // We wait until the callback is executed. So it is safe to use 52 // We wait until the callback is executed. So it is safe to use
50 // unretained. 53 // unretained.
51 base::Unretained(this)); 54 base::Unretained(this));
52 55
53 // TODO(lipalani): Check the return value for an unrecoverable error. 56 // TODO(lipalani): Check the return value for an unrecoverable error.
54 ignore_result(worker->DoWorkAndWaitUntilDone(c)); 57 ignore_result(worker->DoWorkAndWaitUntilDone(c));
55 58
56 } 59 }
57 } 60 }
58 61
62 bool ModelChangingSyncerCommand::ModelNeutralExecuteImpl(
63 sessions::SyncSession* session) {
64 return true;
65 }
66
59 } // namespace browser_sync 67 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/model_changing_syncer_command.h ('k') | chrome/browser/sync/engine/process_updates_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698