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

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

Issue 2537223008: Add TitledUrlIndex for indexing arbitrary title/URL pairs (Closed)
Patch Set: const Created 4 years 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
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_node.h" 5 #include "components/bookmarks/browser/bookmark_node.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (meta_info_map.empty()) 96 if (meta_info_map.empty())
97 meta_info_map_.reset(); 97 meta_info_map_.reset();
98 else 98 else
99 meta_info_map_.reset(new MetaInfoMap(meta_info_map)); 99 meta_info_map_.reset(new MetaInfoMap(meta_info_map));
100 } 100 }
101 101
102 const BookmarkNode::MetaInfoMap* BookmarkNode::GetMetaInfoMap() const { 102 const BookmarkNode::MetaInfoMap* BookmarkNode::GetMetaInfoMap() const {
103 return meta_info_map_.get(); 103 return meta_info_map_.get();
104 } 104 }
105 105
106 const base::string16& BookmarkNode::GetTitledUrlNodeTitle() const {
107 return GetTitle();
108 }
109
110 const GURL& BookmarkNode::GetTitledUrlNodeUrl() const {
111 return url_;
112 }
113
106 void BookmarkNode::Initialize(int64_t id) { 114 void BookmarkNode::Initialize(int64_t id) {
107 id_ = id; 115 id_ = id;
108 type_ = url_.is_empty() ? FOLDER : URL; 116 type_ = url_.is_empty() ? FOLDER : URL;
109 date_added_ = base::Time::Now(); 117 date_added_ = base::Time::Now();
110 favicon_type_ = favicon_base::INVALID_ICON; 118 favicon_type_ = favicon_base::INVALID_ICON;
111 favicon_state_ = INVALID_FAVICON; 119 favicon_state_ = INVALID_FAVICON;
112 favicon_load_task_id_ = base::CancelableTaskTracker::kBadTaskId; 120 favicon_load_task_id_ = base::CancelableTaskTracker::kBadTaskId;
113 meta_info_map_.reset(); 121 meta_info_map_.reset();
114 sync_transaction_version_ = kInvalidSyncTransactionVersion; 122 sync_transaction_version_ = kInvalidSyncTransactionVersion;
115 } 123 }
(...skipping 11 matching lines...) Expand all
127 : BookmarkNode(id, GURL()), visible_(true) {} 135 : BookmarkNode(id, GURL()), visible_(true) {}
128 136
129 BookmarkPermanentNode::~BookmarkPermanentNode() { 137 BookmarkPermanentNode::~BookmarkPermanentNode() {
130 } 138 }
131 139
132 bool BookmarkPermanentNode::IsVisible() const { 140 bool BookmarkPermanentNode::IsVisible() const {
133 return visible_ || !empty(); 141 return visible_ || !empty();
134 } 142 }
135 143
136 } // namespace bookmarks 144 } // namespace bookmarks
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_node.h ('k') | components/bookmarks/browser/titled_url_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698