OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/bookmarks/bookmark_codec.h" | 5 #include "chrome/browser/bookmarks/bookmark_codec.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/common/l10n_util.h" | 10 #include "chrome/common/l10n_util.h" |
11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
12 | 12 |
13 #include "generated_resources.h" | 13 #include "generated_resources.h" |
14 | 14 |
| 15 using base::Time; |
| 16 |
15 // Key names. | 17 // Key names. |
16 static const wchar_t* kRootsKey = L"roots"; | 18 static const wchar_t* kRootsKey = L"roots"; |
17 static const wchar_t* kRootFolderNameKey = L"bookmark_bar"; | 19 static const wchar_t* kRootFolderNameKey = L"bookmark_bar"; |
18 static const wchar_t* kOtherBookmarFolderNameKey = L"other"; | 20 static const wchar_t* kOtherBookmarFolderNameKey = L"other"; |
19 static const wchar_t* kVersionKey = L"version"; | 21 static const wchar_t* kVersionKey = L"version"; |
20 static const wchar_t* kTypeKey = L"type"; | 22 static const wchar_t* kTypeKey = L"type"; |
21 static const wchar_t* kNameKey = L"name"; | 23 static const wchar_t* kNameKey = L"name"; |
22 static const wchar_t* kDateAddedKey = L"date_added"; | 24 static const wchar_t* kDateAddedKey = L"date_added"; |
23 static const wchar_t* kURLKey = L"url"; | 25 static const wchar_t* kURLKey = L"url"; |
24 static const wchar_t* kDateModifiedKey = L"date_modified"; | 26 static const wchar_t* kDateModifiedKey = L"date_modified"; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 188 |
187 if (!DecodeChildren(model, *static_cast<ListValue*>(child_values), node)) | 189 if (!DecodeChildren(model, *static_cast<ListValue*>(child_values), node)) |
188 return false; | 190 return false; |
189 } | 191 } |
190 | 192 |
191 node->SetTitle(title); | 193 node->SetTitle(title); |
192 node->date_added_ = | 194 node->date_added_ = |
193 Time::FromInternalValue(StringToInt64(date_added_string)); | 195 Time::FromInternalValue(StringToInt64(date_added_string)); |
194 return true; | 196 return true; |
195 } | 197 } |
196 | |
OLD | NEW |