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

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

Issue 6182004: [SYNC] Refactor SyncSourceInfo and add support in chrome invalidation client ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: payloads/nudge type merge Created 9 years, 11 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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
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 // TODO(zea): send SyncSourceInfo's payloads to server once we know it's all
64 // working properly.
63 get_updates->mutable_caller_info()->set_source( 65 get_updates->mutable_caller_info()->set_source(
64 session->TestAndSetSource().first); 66 session->TestAndSetSource().updates_source);
65 get_updates->mutable_caller_info()->set_notifications_enabled( 67 get_updates->mutable_caller_info()->set_notifications_enabled(
66 session->context()->notifications_enabled()); 68 session->context()->notifications_enabled());
67 69
68 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message); 70 SyncerProtoUtil::AddRequestBirthday(dir, &client_to_server_message);
69 71
70 bool ok = SyncerProtoUtil::PostClientToServerMessage( 72 bool ok = SyncerProtoUtil::PostClientToServerMessage(
71 client_to_server_message, 73 client_to_server_message,
72 &update_response, 74 &update_response,
73 session); 75 session);
74 76
(...skipping 29 matching lines...) Expand all
104 if (target_datatypes[i]) { 106 if (target_datatypes[i]) {
105 requested_type_count++; 107 requested_type_count++;
106 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i), 108 syncable::AddDefaultExtensionValue(syncable::ModelTypeFromInt(i),
107 filter_protobuf); 109 filter_protobuf);
108 } 110 }
109 } 111 }
110 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter."; 112 DCHECK_LT(0, requested_type_count) << "Doing GetUpdates with empty filter.";
111 } 113 }
112 114
113 } // namespace browser_sync 115 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/syncapi.cc » ('j') | chrome/browser/sync/engine/syncapi.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698