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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 VLOG(1) << "Getting updates for types " << enabled_types.to_string(); | 54 VLOG(1) << "Getting updates for types " << enabled_types.to_string(); |
55 DCHECK(enabled_types.any()); | 55 DCHECK(enabled_types.any()); |
56 | 56 |
57 // We want folders for our associated types, always. If we were to set | 57 // We want folders for our associated types, always. If we were to set |
58 // this to false, the server would send just the non-container items | 58 // this to false, the server would send just the non-container items |
59 // (e.g. Bookmark URLs but not their containing folders). | 59 // (e.g. Bookmark URLs but not their containing folders). |
60 get_updates->set_fetch_folders(true); | 60 get_updates->set_fetch_folders(true); |
61 | 61 |
62 // Set GetUpdatesMessage.GetUpdatesCallerInfo information. | 62 // Set GetUpdatesMessage.GetUpdatesCallerInfo information. |
63 get_updates->mutable_caller_info()->set_source( | 63 get_updates->mutable_caller_info()->set_source( |
64 session->TestAndSetSource().first); | 64 session->TestAndSetSource().updates_source); |
65 get_updates->mutable_caller_info()->set_notifications_enabled( | 65 get_updates->mutable_caller_info()->set_notifications_enabled( |
66 session->context()->notifications_enabled()); | 66 session->context()->notifications_enabled()); |
67 | 67 |
68 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); | 68 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); |
69 | 69 |
70 bool ok = SyncerProtoUtil::PostClientToServerMessage( | 70 bool ok = SyncerProtoUtil::PostClientToServerMessage( |
71 client_to_server_message, | 71 client_to_server_message, |
72 &update_response, | 72 &update_response, |
73 session); | 73 session); |
74 | 74 |
(...skipping 29 matching lines...) Expand all Loading... |
104 if (target_datatypes[i]) { | 104 if (target_datatypes[i]) { |
105 requested_type_count++; | 105 requested_type_count++; |
106 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i), | 106 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i), |
107 filter_protobuf); | 107 filter_protobuf); |
108 } | 108 } |
109 } | 109 } |
110 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter."; | 110 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter."; |
111 } | 111 } |
112 | 112 |
113 } // namespace browser_sync | 113 } // namespace browser_sync |
OLD | NEW |