| OLD | NEW |
| 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/engine/download_updates_command.h" | 5 #include "sync/engine/download_updates_command.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "sync/engine/syncer.h" | 10 #include "sync/engine/syncer.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 get_updates->set_fetch_folders(true); | 104 get_updates->set_fetch_folders(true); |
| 105 | 105 |
| 106 // Set GetUpdatesMessage.GetUpdatesCallerInfo information. | 106 // Set GetUpdatesMessage.GetUpdatesCallerInfo information. |
| 107 get_updates->mutable_caller_info()->set_source( | 107 get_updates->mutable_caller_info()->set_source( |
| 108 session->source().updates_source); | 108 session->source().updates_source); |
| 109 get_updates->mutable_caller_info()->set_notifications_enabled( | 109 get_updates->mutable_caller_info()->set_notifications_enabled( |
| 110 session->context()->notifications_enabled()); | 110 session->context()->notifications_enabled()); |
| 111 | 111 |
| 112 SyncerProtoUtil::SetProtocolVersion(&client_to_server_message); | 112 SyncerProtoUtil::SetProtocolVersion(&client_to_server_message); |
| 113 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); | 113 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); |
| 114 SyncerProtoUtil::AddBagOfChips(dir, &client_to_server_message); |
| 114 | 115 |
| 115 DebugInfo* debug_info = client_to_server_message.mutable_debug_info(); | 116 DebugInfo* debug_info = client_to_server_message.mutable_debug_info(); |
| 116 | 117 |
| 117 AppendClientDebugInfoIfNeeded(session, debug_info); | 118 AppendClientDebugInfoIfNeeded(session, debug_info); |
| 118 | 119 |
| 119 SyncerError result = SyncerProtoUtil::PostClientToServerMessage( | 120 SyncerError result = SyncerProtoUtil::PostClientToServerMessage( |
| 120 client_to_server_message, | 121 client_to_server_message, |
| 121 &update_response, | 122 &update_response, |
| 122 session); | 123 session); |
| 123 | 124 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // could be null in some unit tests. | 159 // could be null in some unit tests. |
| 159 if (session->context()->debug_info_getter()) { | 160 if (session->context()->debug_info_getter()) { |
| 160 session->context()->debug_info_getter()->GetAndClearDebugInfo( | 161 session->context()->debug_info_getter()->GetAndClearDebugInfo( |
| 161 debug_info); | 162 debug_info); |
| 162 } | 163 } |
| 163 session->mutable_status_controller()->set_debug_info_sent(); | 164 session->mutable_status_controller()->set_debug_info_sent(); |
| 164 } | 165 } |
| 165 } | 166 } |
| 166 | 167 |
| 167 } // namespace syncer | 168 } // namespace syncer |
| OLD | NEW |