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

Side by Side Diff: components/bookmarks/browser/bookmark_codec.cc

Issue 348563003: Move BookmarkCodec into bookmarks namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/bookmarks/browser/bookmark_codec.h" 5 #include "components/bookmarks/browser/bookmark_codec.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "components/bookmarks/browser/bookmark_model.h" 13 #include "components/bookmarks/browser/bookmark_model.h"
14 #include "grit/components_strings.h" 14 #include "grit/components_strings.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 using base::Time; 18 using base::Time;
19 19
20 namespace bookmarks {
21
20 const char* BookmarkCodec::kRootsKey = "roots"; 22 const char* BookmarkCodec::kRootsKey = "roots";
21 const char* BookmarkCodec::kRootFolderNameKey = "bookmark_bar"; 23 const char* BookmarkCodec::kRootFolderNameKey = "bookmark_bar";
22 const char* BookmarkCodec::kOtherBookmarkFolderNameKey = "other"; 24 const char* BookmarkCodec::kOtherBookmarkFolderNameKey = "other";
23 // The value is left as 'synced' for historical reasons. 25 // The value is left as 'synced' for historical reasons.
24 const char* BookmarkCodec::kMobileBookmarkFolderNameKey = "synced"; 26 const char* BookmarkCodec::kMobileBookmarkFolderNameKey = "synced";
25 const char* BookmarkCodec::kVersionKey = "version"; 27 const char* BookmarkCodec::kVersionKey = "version";
26 const char* BookmarkCodec::kChecksumKey = "checksum"; 28 const char* BookmarkCodec::kChecksumKey = "checksum";
27 const char* BookmarkCodec::kIdKey = "id"; 29 const char* BookmarkCodec::kIdKey = "id";
28 const char* BookmarkCodec::kTypeKey = "type"; 30 const char* BookmarkCodec::kTypeKey = "type";
29 const char* BookmarkCodec::kNameKey = "name"; 31 const char* BookmarkCodec::kNameKey = "name";
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 482
481 void BookmarkCodec::InitializeChecksum() { 483 void BookmarkCodec::InitializeChecksum() {
482 base::MD5Init(&md5_context_); 484 base::MD5Init(&md5_context_);
483 } 485 }
484 486
485 void BookmarkCodec::FinalizeChecksum() { 487 void BookmarkCodec::FinalizeChecksum() {
486 base::MD5Digest digest; 488 base::MD5Digest digest;
487 base::MD5Final(&digest, &md5_context_); 489 base::MD5Final(&digest, &md5_context_);
488 computed_checksum_ = base::MD5DigestToBase16(digest); 490 computed_checksum_ = base::MD5DigestToBase16(digest);
489 } 491 }
492
493 } // namespace bookmarks
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_codec.h ('k') | components/bookmarks/browser/bookmark_codec_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698