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

Side by Side Diff: components/omnibox/browser/physical_web_node.cc

Issue 2591053002: Show PhysicalWebProvider suggestions with omnibox input (Closed)
Patch Set: clear had_physical_web_suggestions_ 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/omnibox/browser/physical_web_node.h"
6
7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h"
9 #include "components/physical_web/data_source/physical_web_data_source.h"
10
11 PhysicalWebNode::PhysicalWebNode(const base::DictionaryValue& metadata_item) {
12 std::string title;
13 std::string url;
14 if (metadata_item.GetString(physical_web::kTitleKey, &title)) {
15 node_title_ = base::UTF8ToUTF16(title);
16 }
17 if (metadata_item.GetString(physical_web::kResolvedUrlKey, &url)) {
18 node_url_ = GURL(url);
19 }
20 }
21
22 PhysicalWebNode::~PhysicalWebNode() = default;
23
24 const base::string16& PhysicalWebNode::GetTitledUrlNodeTitle() const {
25 return node_title_;
26 }
27
28 const GURL& PhysicalWebNode::GetTitledUrlNodeUrl() const {
29 return node_url_;
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698