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

Side by Side Diff: components/physical_web/data_source/fake_physical_web_data_source.cc

Issue 2565023002: Use GURLs in Physical Web data source (Closed)
Patch Set: 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 2016 The Chromium Authors. All rights reserved. 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 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/physical_web/data_source/fake_physical_web_data_source.h" 5 #include "components/physical_web/data_source/fake_physical_web_data_source.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "components/physical_web/data_source/physical_web_listener.h" 9 #include "components/physical_web/data_source/physical_web_listener.h"
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void FakePhysicalWebDataSource::UnregisterListener( 84 void FakePhysicalWebDataSource::UnregisterListener(
85 PhysicalWebListener* physical_web_listener) { 85 PhysicalWebListener* physical_web_listener) {
86 observer_list_.RemoveObserver(physical_web_listener); 86 observer_list_.RemoveObserver(physical_web_listener);
87 } 87 }
88 88
89 void FakePhysicalWebDataSource::SetMetadata( 89 void FakePhysicalWebDataSource::SetMetadata(
90 std::unique_ptr<ListValue> metadata) { 90 std::unique_ptr<ListValue> metadata) {
91 metadata_ = std::move(metadata); 91 metadata_ = std::move(metadata);
92 } 92 }
93 93
94 void FakePhysicalWebDataSource::NotifyOnFound(const std::string& url) { 94 void FakePhysicalWebDataSource::NotifyOnFound(const GURL& url) {
95 for (PhysicalWebListener& observer : observer_list_) 95 for (PhysicalWebListener& observer : observer_list_)
96 observer.OnFound(url); 96 observer.OnFound(url);
97 } 97 }
98 98
99 void FakePhysicalWebDataSource::NotifyOnLost(const std::string& url) { 99 void FakePhysicalWebDataSource::NotifyOnLost(const GURL& url) {
100 for (PhysicalWebListener& observer : observer_list_) 100 for (PhysicalWebListener& observer : observer_list_)
101 observer.OnLost(url); 101 observer.OnLost(url);
102 } 102 }
103 103
104 void FakePhysicalWebDataSource::NotifyOnDistanceChanged( 104 void FakePhysicalWebDataSource::NotifyOnDistanceChanged(
105 const std::string& url, 105 const GURL& url,
106 double distance_estimate) { 106 double distance_estimate) {
107 for (PhysicalWebListener& observer : observer_list_) 107 for (PhysicalWebListener& observer : observer_list_)
108 observer.OnDistanceChanged(url, distance_estimate); 108 observer.OnDistanceChanged(url, distance_estimate);
109 } 109 }
110 110
111 } // namespace physical_web 111 } // namespace physical_web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698