| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/download_updates_command.h" | 5 #include "chrome/browser/sync/engine/download_updates_command.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/sync/engine/syncer.h" | 9 #include "chrome/browser/sync/engine/syncer.h" |
| 10 #include "chrome/browser/sync/engine/syncer_proto_util.h" | 10 #include "chrome/browser/sync/engine/syncer_proto_util.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // We want folders for our associated types, always. If we were to set | 65 // We want folders for our associated types, always. If we were to set |
| 66 // this to false, the server would send just the non-container items | 66 // this to false, the server would send just the non-container items |
| 67 // (e.g. Bookmark URLs but not their containing folders). | 67 // (e.g. Bookmark URLs but not their containing folders). |
| 68 get_updates->set_fetch_folders(true); | 68 get_updates->set_fetch_folders(true); |
| 69 | 69 |
| 70 // Set GetUpdatesMessage.GetUpdatesCallerInfo information. | 70 // Set GetUpdatesMessage.GetUpdatesCallerInfo information. |
| 71 get_updates->mutable_caller_info()->set_source(session->TestAndSetSource()); | 71 get_updates->mutable_caller_info()->set_source(session->TestAndSetSource()); |
| 72 get_updates->mutable_caller_info()->set_notifications_enabled( | 72 get_updates->mutable_caller_info()->set_notifications_enabled( |
| 73 session->context()->notifications_enabled()); | 73 session->context()->notifications_enabled()); |
| 74 | 74 |
| 75 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); |
| 76 |
| 75 bool ok = SyncerProtoUtil::PostClientToServerMessage( | 77 bool ok = SyncerProtoUtil::PostClientToServerMessage( |
| 76 &client_to_server_message, | 78 client_to_server_message, |
| 77 &update_response, | 79 &update_response, |
| 78 session); | 80 session); |
| 79 | 81 |
| 80 DLOG(INFO) << SyncerProtoUtil::ClientToServerResponseDebugString( | 82 DLOG(INFO) << SyncerProtoUtil::ClientToServerResponseDebugString( |
| 81 update_response); | 83 update_response); |
| 82 | 84 |
| 83 StatusController* status = session->status_controller(); | 85 StatusController* status = session->status_controller(); |
| 84 status->set_updates_request_parameters(target); | 86 status->set_updates_request_parameters(target); |
| 85 if (!ok) { | 87 if (!ok) { |
| 86 status->increment_num_consecutive_errors(); | 88 status->increment_num_consecutive_errors(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 107 if (target_datatypes[i]) { | 109 if (target_datatypes[i]) { |
| 108 requested_type_count++; | 110 requested_type_count++; |
| 109 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i), | 111 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i), |
| 110 filter_protobuf); | 112 filter_protobuf); |
| 111 } | 113 } |
| 112 } | 114 } |
| 113 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter."; | 115 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter."; |
| 114 } | 116 } |
| 115 | 117 |
| 116 } // namespace browser_sync | 118 } // namespace browser_sync |
| OLD | NEW |