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

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

Issue 9453036: [Sync] Remove --create-mobile-bookmarks-folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 9 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) 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 "chrome/browser/sync/engine/syncer.h" 5 #include "chrome/browser/sync/engine/syncer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "build/build_config.h"
12 #include "chrome/browser/sync/engine/apply_updates_command.h" 13 #include "chrome/browser/sync/engine/apply_updates_command.h"
13 #include "chrome/browser/sync/engine/build_commit_command.h" 14 #include "chrome/browser/sync/engine/build_commit_command.h"
14 #include "chrome/browser/sync/engine/cleanup_disabled_types_command.h" 15 #include "chrome/browser/sync/engine/cleanup_disabled_types_command.h"
15 #include "chrome/browser/sync/engine/clear_data_command.h" 16 #include "chrome/browser/sync/engine/clear_data_command.h"
16 #include "chrome/browser/sync/engine/conflict_resolver.h" 17 #include "chrome/browser/sync/engine/conflict_resolver.h"
17 #include "chrome/browser/sync/engine/download_updates_command.h" 18 #include "chrome/browser/sync/engine/download_updates_command.h"
18 #include "chrome/browser/sync/engine/get_commit_ids_command.h" 19 #include "chrome/browser/sync/engine/get_commit_ids_command.h"
19 #include "chrome/browser/sync/engine/net/server_connection_manager.h" 20 #include "chrome/browser/sync/engine/net/server_connection_manager.h"
20 #include "chrome/browser/sync/engine/post_commit_message_command.h" 21 #include "chrome/browser/sync/engine/post_commit_message_command.h"
21 #include "chrome/browser/sync/engine/process_commit_response_command.h" 22 #include "chrome/browser/sync/engine/process_commit_response_command.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 next_step = CLEANUP_DISABLED_TYPES; 127 next_step = CLEANUP_DISABLED_TYPES;
127 break; 128 break;
128 case CLEANUP_DISABLED_TYPES: { 129 case CLEANUP_DISABLED_TYPES: {
129 CleanupDisabledTypesCommand cleanup; 130 CleanupDisabledTypesCommand cleanup;
130 cleanup.Execute(session); 131 cleanup.Execute(session);
131 next_step = DOWNLOAD_UPDATES; 132 next_step = DOWNLOAD_UPDATES;
132 break; 133 break;
133 } 134 }
134 case DOWNLOAD_UPDATES: { 135 case DOWNLOAD_UPDATES: {
135 DownloadUpdatesCommand download_updates; 136 // TODO(akalin): We may want to propagate this switch up
137 // eventually.
138 #if defined(OS_ANDROID)
139 const bool kCreateMobileBookmarksFolder = true;
140 #else
141 const bool kCreateMobileBookmarksFolder = false;
142 #endif
143 DownloadUpdatesCommand download_updates(kCreateMobileBookmarksFolder);
136 session->mutable_status_controller()->set_last_download_updates_result( 144 session->mutable_status_controller()->set_last_download_updates_result(
137 download_updates.Execute(session)); 145 download_updates.Execute(session));
138 next_step = PROCESS_CLIENT_COMMAND; 146 next_step = PROCESS_CLIENT_COMMAND;
139 break; 147 break;
140 } 148 }
141 case PROCESS_CLIENT_COMMAND: { 149 case PROCESS_CLIENT_COMMAND: {
142 ProcessClientCommand(session); 150 ProcessClientCommand(session);
143 next_step = VERIFY_UPDATES; 151 next_step = VERIFY_UPDATES;
144 break; 152 break;
145 } 153 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 entry->Put(SERVER_CTIME, Time()); 337 entry->Put(SERVER_CTIME, Time());
330 entry->Put(SERVER_VERSION, 0); 338 entry->Put(SERVER_VERSION, 0);
331 entry->Put(SERVER_IS_DIR, false); 339 entry->Put(SERVER_IS_DIR, false);
332 entry->Put(SERVER_IS_DEL, false); 340 entry->Put(SERVER_IS_DEL, false);
333 entry->Put(IS_UNAPPLIED_UPDATE, false); 341 entry->Put(IS_UNAPPLIED_UPDATE, false);
334 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); 342 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance());
335 entry->Put(SERVER_POSITION_IN_PARENT, 0); 343 entry->Put(SERVER_POSITION_IN_PARENT, 0);
336 } 344 }
337 345
338 } // namespace browser_sync 346 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/download_updates_command_unittest.cc ('k') | chrome/browser/sync/glue/bookmark_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698