OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/internal_api/sync_manager.h" | 5 #include "chrome/browser/sync/internal_api/sync_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 DictionaryValue* value = new DictionaryValue(); | 360 DictionaryValue* value = new DictionaryValue(); |
361 value->SetInteger("totalCount", total_count); | 361 value->SetInteger("totalCount", total_count); |
362 value->SetString("payload", payload); | 362 value->SetString("payload", payload); |
363 return value; | 363 return value; |
364 } | 364 } |
365 }; | 365 }; |
366 | 366 |
367 typedef std::map<syncable::ModelType, NotificationInfo> NotificationInfoMap; | 367 typedef std::map<syncable::ModelType, NotificationInfo> NotificationInfoMap; |
368 typedef JsArgList | 368 typedef JsArgList |
369 (SyncManager::SyncInternal::*UnboundJsMessageHandler)(const JsArgList&); | 369 (SyncManager::SyncInternal::*UnboundJsMessageHandler)(const JsArgList&); |
370 typedef base::Callback<JsArgList(JsArgList)> JsMessageHandler; | 370 typedef base::Callback<JsArgList(const JsArgList&)> JsMessageHandler; |
371 typedef std::map<std::string, JsMessageHandler> JsMessageHandlerMap; | 371 typedef std::map<std::string, JsMessageHandler> JsMessageHandlerMap; |
372 | 372 |
373 // Helper to call OnAuthError when no authentication credentials are | 373 // Helper to call OnAuthError when no authentication credentials are |
374 // available. | 374 // available. |
375 void RaiseAuthNeededEvent(); | 375 void RaiseAuthNeededEvent(); |
376 | 376 |
377 // Determine if the parents or predecessors differ between the old and new | 377 // Determine if the parents or predecessors differ between the old and new |
378 // versions of an entry stored in |a| and |b|. Note that a node's index may | 378 // versions of an entry stored in |a| and |b|. Note that a node's index may |
379 // change without its NEXT_ID changing if the node at NEXT_ID also moved (but | 379 // change without its NEXT_ID changing if the node at NEXT_ID also moved (but |
380 // the relative order is unchanged). To handle such cases, we rely on the | 380 // the relative order is unchanged). To handle such cases, we rely on the |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 lookup->GetDownloadProgress(i.Get(), &marker); | 2076 lookup->GetDownloadProgress(i.Get(), &marker); |
2077 | 2077 |
2078 if (marker.token().empty()) | 2078 if (marker.token().empty()) |
2079 result.Put(i.Get()); | 2079 result.Put(i.Get()); |
2080 | 2080 |
2081 } | 2081 } |
2082 return result; | 2082 return result; |
2083 } | 2083 } |
2084 | 2084 |
2085 } // namespace sync_api | 2085 } // namespace sync_api |
OLD | NEW |