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

Side by Side Diff: chrome/browser/content_settings/content_settings_supervised_provider.cc

Issue 1015723003: Fix content_settings_supervised_provider after deprecation of MEDIASTREAM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | chrome/browser/content_settings/content_settings_supervised_provider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/content_settings/content_settings_supervised_provider.h " 5 #include "chrome/browser/content_settings/content_settings_supervised_provider.h "
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/supervised_user/supervised_user_constants.h" 10 #include "chrome/browser/supervised_user/supervised_user_constants.h"
11 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" 11 #include "chrome/browser/supervised_user/supervised_user_settings_service.h"
12 12
13 namespace { 13 namespace {
14 14
15 struct ContentSettingsFromSupervisedSettingsEntry { 15 struct ContentSettingsFromSupervisedSettingsEntry {
16 const char* setting_name; 16 const char* setting_name;
17 ContentSettingsType content_type; 17 ContentSettingsType content_type;
18 }; 18 };
19 19
20 const ContentSettingsFromSupervisedSettingsEntry 20 const ContentSettingsFromSupervisedSettingsEntry
21 kContentSettingsFromSupervisedSettingsMap[] = { 21 kContentSettingsFromSupervisedSettingsMap[] = {
22 { 22 {
23 supervised_users::kGeolocationDisabled, 23 supervised_users::kGeolocationDisabled,
24 CONTENT_SETTINGS_TYPE_GEOLOCATION, 24 CONTENT_SETTINGS_TYPE_GEOLOCATION,
25 }, { 25 }, {
26 supervised_users::kCameraMicDisabled, 26 supervised_users::kCameraMicDisabled,
27 CONTENT_SETTINGS_TYPE_MEDIASTREAM, 27 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
28 }, {
29 supervised_users::kCameraMicDisabled,
30 CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
28 } 31 }
29 }; 32 };
30 33
31 } // namespace 34 } // namespace
32 35
33 namespace content_settings { 36 namespace content_settings {
34 37
35 SupervisedProvider::SupervisedProvider( 38 SupervisedProvider::SupervisedProvider(
36 SupervisedUserSettingsService* supervised_user_settings_service) 39 SupervisedUserSettingsService* supervised_user_settings_service)
37 : weak_ptr_factory_(this) { 40 : weak_ptr_factory_(this) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 ContentSettingsType content_type) { 95 ContentSettingsType content_type) {
93 } 96 }
94 97
95 void SupervisedProvider::ShutdownOnUIThread() { 98 void SupervisedProvider::ShutdownOnUIThread() {
96 DCHECK(CalledOnValidThread()); 99 DCHECK(CalledOnValidThread());
97 RemoveAllObservers(); 100 RemoveAllObservers();
98 weak_ptr_factory_.InvalidateWeakPtrs(); 101 weak_ptr_factory_.InvalidateWeakPtrs();
99 } 102 }
100 103
101 } // namespace content_settings 104 } // namespace content_settings
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_supervised_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698