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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 get_updates->mutable_caller_info()->set_notifications_enabled( | 67 get_updates->mutable_caller_info()->set_notifications_enabled( |
68 session->context()->notifications_enabled()); | 68 session->context()->notifications_enabled()); |
69 | 69 |
70 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); | 70 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); |
71 | 71 |
72 bool ok = SyncerProtoUtil::PostClientToServerMessage( | 72 bool ok = SyncerProtoUtil::PostClientToServerMessage( |
73 client_to_server_message, | 73 client_to_server_message, |
74 &update_response, | 74 &update_response, |
75 session); | 75 session); |
76 | 76 |
77 VLOG(1) << SyncerProtoUtil::ClientToServerResponseDebugString( | 77 VLOG(2) << SyncerProtoUtil::ClientToServerResponseDebugString( |
78 update_response); | 78 update_response); |
79 | 79 |
80 StatusController* status = session->status_controller(); | 80 StatusController* status = session->status_controller(); |
81 status->set_updates_request_types(enabled_types); | 81 status->set_updates_request_types(enabled_types); |
82 if (!ok) { | 82 if (!ok) { |
83 status->increment_num_consecutive_errors(); | 83 status->increment_num_consecutive_errors(); |
84 status->mutable_updates_response()->Clear(); | 84 status->mutable_updates_response()->Clear(); |
85 LOG(ERROR) << "PostClientToServerMessage() failed during GetUpdates"; | 85 LOG(ERROR) << "PostClientToServerMessage() failed during GetUpdates"; |
86 return; | 86 return; |
87 } | 87 } |
(...skipping 18 matching lines...) Expand all Loading... |
106 if (target_datatypes[i]) { | 106 if (target_datatypes[i]) { |
107 requested_type_count++; | 107 requested_type_count++; |
108 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i), | 108 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i), |
109 filter_protobuf); | 109 filter_protobuf); |
110 } | 110 } |
111 } | 111 } |
112 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter."; | 112 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter."; |
113 } | 113 } |
114 | 114 |
115 } // namespace browser_sync | 115 } // namespace browser_sync |
OLD | NEW |