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

Side by Side Diff: chrome/browser/media/media_stream_camera_permission_context_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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/media_stream_camera_permission_context_factory.h" 5 #include "chrome/browser/media/media_stream_camera_permission_context_factory.h"
6 6
7 #include "chrome/browser/media/media_stream_device_permission_context.h" 7 #include "chrome/browser/media/media_stream_device_permission_context.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 16 matching lines...) Expand all
27 27
28 content::BrowserContext* 28 content::BrowserContext*
29 MediaStreamCameraPermissionContextFactory::GetBrowserContextToUse( 29 MediaStreamCameraPermissionContextFactory::GetBrowserContextToUse(
30 content::BrowserContext* context) const { 30 content::BrowserContext* context) const {
31 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 31 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
32 } 32 }
33 33
34 // static 34 // static
35 MediaStreamCameraPermissionContextFactory* 35 MediaStreamCameraPermissionContextFactory*
36 MediaStreamCameraPermissionContextFactory::GetInstance() { 36 MediaStreamCameraPermissionContextFactory::GetInstance() {
37 return Singleton<MediaStreamCameraPermissionContextFactory>::get(); 37 return base::Singleton<MediaStreamCameraPermissionContextFactory>::get();
38 } 38 }
39 39
40 // static 40 // static
41 MediaStreamDevicePermissionContext* 41 MediaStreamDevicePermissionContext*
42 MediaStreamCameraPermissionContextFactory::GetForProfile(Profile* profile) { 42 MediaStreamCameraPermissionContextFactory::GetForProfile(Profile* profile) {
43 return static_cast<MediaStreamDevicePermissionContext*>( 43 return static_cast<MediaStreamDevicePermissionContext*>(
44 GetInstance()->GetServiceForBrowserContext(profile, true)); 44 GetInstance()->GetServiceForBrowserContext(profile, true));
45 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698