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

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

Issue 2774383003: [Media Router] Make MRUIService dispose its dependencies on MRMojoImpl in Shutdown() (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chrome/browser/media/router/media_router_ui_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/media/router/media_router_ui_service.h" 5 #include "chrome/browser/media/router/media_router_ui_service.h"
6 6
7 #include "chrome/browser/media/router/media_router_feature.h" 7 #include "chrome/browser/media/router/media_router_feature.h"
8 #include "chrome/browser/media/router/media_router_ui_service_factory.h" 8 #include "chrome/browser/media/router/media_router_ui_service_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 10
11 namespace media_router { 11 namespace media_router {
12 12
13 MediaRouterUIService::MediaRouterUIService(Profile* profile) 13 MediaRouterUIService::MediaRouterUIService(Profile* profile)
14 : action_controller_(profile) {} 14 : action_controller_(
15 base::MakeUnique<MediaRouterActionController>(profile)) {}
imcheng 2017/03/27 20:51:06 nit: new MediaRouteActionController(profile)
takumif 2017/03/27 21:49:08 Done.
15 16
16 MediaRouterUIService::~MediaRouterUIService() {} 17 MediaRouterUIService::~MediaRouterUIService() {}
17 18
19 void MediaRouterUIService::Shutdown() {
20 action_controller_.reset();
21 }
22
18 // static 23 // static
19 MediaRouterUIService* MediaRouterUIService::Get(Profile* profile) { 24 MediaRouterUIService* MediaRouterUIService::Get(Profile* profile) {
20 return MediaRouterUIServiceFactory::GetForBrowserContext(profile); 25 return MediaRouterUIServiceFactory::GetForBrowserContext(profile);
21 } 26 }
22 27
23 MediaRouterActionController* MediaRouterUIService::action_controller() { 28 MediaRouterActionController* MediaRouterUIService::action_controller() {
24 return &action_controller_; 29 return action_controller_.get();
25 } 30 }
26 31
27 } // namespace media_router 32 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_ui_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698