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

Side by Side Diff: chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.h

Issue 2916163002: [MediaRouter] Record DIAL device counts in DialMediaSinkServiceImpl (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_MEDIA_SINK_SERVICE_IMPL_ H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_MEDIA_SINK_SERVICE_IMPL_ H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_MEDIA_SINK_SERVICE_IMPL_ H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_MEDIA_SINK_SERVICE_IMPL_ H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Called when description service successfully fetches and parses device 56 // Called when description service successfully fetches and parses device
57 // description XML. Restart |finish_timer_| if it is not running. 57 // description XML. Restart |finish_timer_| if it is not running.
58 void OnDeviceDescriptionAvailable( 58 void OnDeviceDescriptionAvailable(
59 const DialDeviceData& device_data, 59 const DialDeviceData& device_data,
60 const ParsedDialDeviceDescription& description_data); 60 const ParsedDialDeviceDescription& description_data);
61 61
62 // Called when fails to fetch or parse device description XML. 62 // Called when fails to fetch or parse device description XML.
63 void OnDeviceDescriptionError(const DialDeviceData& device, 63 void OnDeviceDescriptionError(const DialDeviceData& device,
64 const std::string& error_message); 64 const std::string& error_message);
65 65
66 // MediaSinkServiceBase implementation.
67 void RecordDeviceCounts() override;
68
66 std::unique_ptr<DeviceDescriptionService> description_service_; 69 std::unique_ptr<DeviceDescriptionService> description_service_;
67 70
68 // Raw pointer to DialRegistry singleton. 71 // Raw pointer to DialRegistry singleton.
69 DialRegistry* dial_registry_ = nullptr; 72 DialRegistry* dial_registry_ = nullptr;
70 73
71 // DialRegistry for unit test. 74 // DialRegistry for unit test.
72 DialRegistry* test_dial_registry_ = nullptr; 75 DialRegistry* test_dial_registry_ = nullptr;
73 76
74 // Device data list from current round of discovery. 77 // Device data list from current round of discovery.
75 DialRegistry::DeviceList current_devices_; 78 DialRegistry::DeviceList current_devices_;
76 79
77 scoped_refptr<net::URLRequestContextGetter> request_context_; 80 scoped_refptr<net::URLRequestContextGetter> request_context_;
81
82 base::Time device_count_metrics_record_time_;
78 }; 83 };
79 84
80 } // namespace media_router 85 } // namespace media_router
81 86
82 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_MEDIA_SINK_SERVICE_IM PL_H_ 87 #endif // CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DIAL_DIAL_MEDIA_SINK_SERVICE_IM PL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698