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

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

Issue 2112673002: Removing references to Off the Record from MediaRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More refactoring on rebased code 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_factory.h" 5 #include "chrome/browser/media/router/media_router_factory.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/profiles/incognito_helpers.h" 8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
(...skipping 26 matching lines...) Expand all
37 return static_cast<MediaRouter*>( 37 return static_cast<MediaRouter*>(
38 service_factory.Get().GetServiceForBrowserContext(context, true)); 38 service_factory.Get().GetServiceForBrowserContext(context, true));
39 } 39 }
40 40
41 void MediaRouterFactory::BrowserContextShutdown( 41 void MediaRouterFactory::BrowserContextShutdown(
42 content::BrowserContext* context) { 42 content::BrowserContext* context) {
43 if (context->IsOffTheRecord()) { 43 if (context->IsOffTheRecord()) {
44 MediaRouter* router = 44 MediaRouter* router =
45 static_cast<MediaRouter*>(GetServiceForBrowserContext(context, false)); 45 static_cast<MediaRouter*>(GetServiceForBrowserContext(context, false));
46 if (router) 46 if (router)
47 router->OnOffTheRecordProfileShutdown(); 47 router->OnIncognitoProfileShutdown();
48 } 48 }
49 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context); 49 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context);
50 } 50 }
51 51
52 MediaRouterFactory::MediaRouterFactory() 52 MediaRouterFactory::MediaRouterFactory()
53 : BrowserContextKeyedServiceFactory( 53 : BrowserContextKeyedServiceFactory(
54 "MediaRouter", 54 "MediaRouter",
55 BrowserContextDependencyManager::GetInstance()) { 55 BrowserContextDependencyManager::GetInstance()) {
56 #if !defined(OS_ANDROID) 56 #if !defined(OS_ANDROID)
57 // On desktop platforms, MediaRouter depends on ProcessManager. 57 // On desktop platforms, MediaRouter depends on ProcessManager.
(...skipping 21 matching lines...) Expand all
79 media_router = new MediaRouterAndroid(context); 79 media_router = new MediaRouterAndroid(context);
80 #else 80 #else
81 media_router = 81 media_router =
82 new MediaRouterMojoImpl(extensions::ProcessManager::Get(context)); 82 new MediaRouterMojoImpl(extensions::ProcessManager::Get(context));
83 #endif 83 #endif
84 media_router->Initialize(); 84 media_router->Initialize();
85 return media_router; 85 return media_router;
86 } 86 }
87 87
88 } // namespace media_router 88 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_factory.h ('k') | chrome/browser/media/router/media_router_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698