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 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 return id; | 1669 return id; |
1670 } | 1670 } |
1671 | 1671 |
1672 JsArgList GetNodeInfoById(const JsArgList& args, | 1672 JsArgList GetNodeInfoById(const JsArgList& args, |
1673 UserShare* user_share, | 1673 UserShare* user_share, |
1674 DictionaryValue* (BaseNode::*info_getter)() const) { | 1674 DictionaryValue* (BaseNode::*info_getter)() const) { |
1675 CHECK(info_getter); | 1675 CHECK(info_getter); |
1676 ListValue return_args; | 1676 ListValue return_args; |
1677 ListValue* node_summaries = new ListValue(); | 1677 ListValue* node_summaries = new ListValue(); |
1678 return_args.Append(node_summaries); | 1678 return_args.Append(node_summaries); |
1679 ListValue* id_list = NULL; | 1679 const ListValue* id_list = NULL; |
1680 ReadTransaction trans(FROM_HERE, user_share); | 1680 ReadTransaction trans(FROM_HERE, user_share); |
1681 if (args.Get().GetList(0, &id_list)) { | 1681 if (args.Get().GetList(0, &id_list)) { |
1682 CHECK(id_list); | 1682 CHECK(id_list); |
1683 for (size_t i = 0; i < id_list->GetSize(); ++i) { | 1683 for (size_t i = 0; i < id_list->GetSize(); ++i) { |
1684 int64 id = GetId(*id_list, i); | 1684 int64 id = GetId(*id_list, i); |
1685 if (id == kInvalidId) { | 1685 if (id == kInvalidId) { |
1686 continue; | 1686 continue; |
1687 } | 1687 } |
1688 ReadNode node(&trans); | 1688 ReadNode node(&trans); |
1689 if (node.InitByIdLookup(id) != BaseNode::INIT_OK) { | 1689 if (node.InitByIdLookup(id) != BaseNode::INIT_OK) { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1879 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1879 int SyncManagerImpl::GetDefaultNudgeDelay() { |
1880 return kDefaultNudgeDelayMilliseconds; | 1880 return kDefaultNudgeDelayMilliseconds; |
1881 } | 1881 } |
1882 | 1882 |
1883 // static. | 1883 // static. |
1884 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1884 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
1885 return kPreferencesNudgeDelayMilliseconds; | 1885 return kPreferencesNudgeDelayMilliseconds; |
1886 } | 1886 } |
1887 | 1887 |
1888 } // namespace syncer | 1888 } // namespace syncer |
OLD | NEW |