OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sync/internal_api/sync_manager_impl.h" | 5 #include "sync/internal_api/sync_manager_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 return id; | 1676 return id; |
1677 } | 1677 } |
1678 | 1678 |
1679 JsArgList GetNodeInfoById(const JsArgList& args, | 1679 JsArgList GetNodeInfoById(const JsArgList& args, |
1680 UserShare* user_share, | 1680 UserShare* user_share, |
1681 DictionaryValue* (BaseNode::*info_getter)() const) { | 1681 DictionaryValue* (BaseNode::*info_getter)() const) { |
1682 CHECK(info_getter); | 1682 CHECK(info_getter); |
1683 ListValue return_args; | 1683 ListValue return_args; |
1684 ListValue* node_summaries = new ListValue(); | 1684 ListValue* node_summaries = new ListValue(); |
1685 return_args.Append(node_summaries); | 1685 return_args.Append(node_summaries); |
1686 ListValue* id_list = NULL; | 1686 const ListValue* id_list = NULL; |
1687 ReadTransaction trans(FROM_HERE, user_share); | 1687 ReadTransaction trans(FROM_HERE, user_share); |
1688 if (args.Get().GetList(0, &id_list)) { | 1688 if (args.Get().GetList(0, &id_list)) { |
1689 CHECK(id_list); | 1689 CHECK(id_list); |
1690 for (size_t i = 0; i < id_list->GetSize(); ++i) { | 1690 for (size_t i = 0; i < id_list->GetSize(); ++i) { |
1691 int64 id = GetId(*id_list, i); | 1691 int64 id = GetId(*id_list, i); |
1692 if (id == kInvalidId) { | 1692 if (id == kInvalidId) { |
1693 continue; | 1693 continue; |
1694 } | 1694 } |
1695 ReadNode node(&trans); | 1695 ReadNode node(&trans); |
1696 if (node.InitByIdLookup(id) != BaseNode::INIT_OK) { | 1696 if (node.InitByIdLookup(id) != BaseNode::INIT_OK) { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1886 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1886 int SyncManagerImpl::GetDefaultNudgeDelay() { |
1887 return kDefaultNudgeDelayMilliseconds; | 1887 return kDefaultNudgeDelayMilliseconds; |
1888 } | 1888 } |
1889 | 1889 |
1890 // static. | 1890 // static. |
1891 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1891 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
1892 return kPreferencesNudgeDelayMilliseconds; | 1892 return kPreferencesNudgeDelayMilliseconds; |
1893 } | 1893 } |
1894 | 1894 |
1895 } // namespace syncer | 1895 } // namespace syncer |
OLD | NEW |