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

Side by Side Diff: chrome/browser/media/router/media_router_base.cc

Issue 2112673002: Removing references to Off the Record from MediaRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/media/router/media_router_base.h" 5 #include "chrome/browser/media/router/media_router_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // MediaRoutesObserver 25 // MediaRoutesObserver
26 void OnRoutesUpdated( 26 void OnRoutesUpdated(
27 const std::vector<MediaRoute>& routes, 27 const std::vector<MediaRoute>& routes,
28 const std::vector<MediaRoute::Id>& joinable_route_ids) override { 28 const std::vector<MediaRoute::Id>& joinable_route_ids) override {
29 off_the_record_route_ids.clear(); 29 off_the_record_route_ids.clear();
30 // TODO(crbug.com/611486): Have the MRPM pass a list of joinable route ids 30 // TODO(crbug.com/611486): Have the MRPM pass a list of joinable route ids
31 // via |joinable_route_ids|, and check here if it is non-empty. 31 // via |joinable_route_ids|, and check here if it is non-empty.
32 has_route = !routes.empty(); 32 has_route = !routes.empty();
33 for (const auto& route : routes) { 33 for (const auto& route : routes) {
34 if (route.off_the_record()) 34 if (route.incognito())
35 off_the_record_route_ids.push_back(route.media_route_id()); 35 off_the_record_route_ids.push_back(route.media_route_id());
36 } 36 }
37 } 37 }
38 38
39 bool has_route; 39 bool has_route;
40 std::vector<MediaRoute::Id> off_the_record_route_ids; 40 std::vector<MediaRoute::Id> off_the_record_route_ids;
41 41
42 private: 42 private:
43 DISALLOW_COPY_AND_ASSIGN(InternalMediaRoutesObserver); 43 DISALLOW_COPY_AND_ASSIGN(InternalMediaRoutesObserver);
44 }; 44 };
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 presentation_connection_state_callbacks_.erase(route_id); 123 presentation_connection_state_callbacks_.erase(route_id);
124 } 124 }
125 125
126 void MediaRouterBase::Shutdown() { 126 void MediaRouterBase::Shutdown() {
127 // The observer calls virtual methods on MediaRouter; it must be destroyed 127 // The observer calls virtual methods on MediaRouter; it must be destroyed
128 // outside of the dtor 128 // outside of the dtor
129 internal_routes_observer_.reset(); 129 internal_routes_observer_.reset();
130 } 130 }
131 131
132 } // namespace media_router 132 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698