OLD | NEW |
---|---|
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 #import "ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.h" | 5 #import "ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #import "ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h" | 9 #import "ios/chrome/browser/physical_web/physical_web_initial_state_recorder.h" |
10 #import "ios/chrome/common/physical_web/physical_web_scanner.h" | 10 #import "ios/chrome/common/physical_web/physical_web_scanner.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 scanner_.reset(); | 45 scanner_.reset(); |
46 } | 46 } |
47 | 47 |
48 std::unique_ptr<base::ListValue> IOSChromePhysicalWebDataSource::GetMetadata() { | 48 std::unique_ptr<base::ListValue> IOSChromePhysicalWebDataSource::GetMetadata() { |
49 if (!scanner_) { | 49 if (!scanner_) { |
50 return base::MakeUnique<base::ListValue>(); | 50 return base::MakeUnique<base::ListValue>(); |
51 } | 51 } |
52 return [scanner_ metadata]; | 52 return [scanner_ metadata]; |
53 } | 53 } |
54 | 54 |
55 std::unique_ptr<MetadataList> | |
mattreynolds
2017/01/11 20:54:50
physical_web:: (here and in the MakeUnique call be
cco3
2017/01/11 22:51:02
Done.
| |
56 IOSChromePhysicalWebDataSource::GetMetadataList() { | |
57 if (!scanner_) { | |
58 return base::MakeUnique<MetadataList>(); | |
59 } | |
60 return [scanner_ metadataList]; | |
61 } | |
62 | |
55 bool IOSChromePhysicalWebDataSource::HasUnresolvedDiscoveries() { | 63 bool IOSChromePhysicalWebDataSource::HasUnresolvedDiscoveries() { |
56 return [scanner_ unresolvedBeaconsCount] > 0; | 64 return [scanner_ unresolvedBeaconsCount] > 0; |
57 } | 65 } |
OLD | NEW |