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

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

Issue 10537099: add "always allow" option to the mediastream infobar and allow user to allow/not allow acces to devi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed sky's comment and replaced "Do not allow any site to" with "Do not allow sites to" Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_default_provider.h" 5 #include "chrome/browser/content_settings/content_settings_default_provider.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 26 matching lines...) Expand all
37 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT 37 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_JAVASCRIPT
38 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS 38 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_PLUGINS
39 CONTENT_SETTING_BLOCK, // CONTENT_SETTINGS_TYPE_POPUPS 39 CONTENT_SETTING_BLOCK, // CONTENT_SETTINGS_TYPE_POPUPS
40 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_GEOLOCATION 40 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_GEOLOCATION
41 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_NOTIFICATIONS 41 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_NOTIFICATIONS
42 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_INTENTS 42 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_INTENTS
43 CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE 43 CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE
44 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_FULLSCREEN 44 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_FULLSCREEN
45 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_MOUSELOCK 45 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_MOUSELOCK
46 CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_MIXEDSCRIPT 46 CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_MIXEDSCRIPT
47 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_MEDIASTREAM
47 }; 48 };
48 COMPILE_ASSERT(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES, 49 COMPILE_ASSERT(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES,
49 default_settings_incorrect_size); 50 default_settings_incorrect_size);
50 51
51 } // namespace 52 } // namespace
52 53
53 namespace content_settings { 54 namespace content_settings {
54 55
55 namespace { 56 namespace {
56 57
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 UMA_HISTOGRAM_ENUMERATION( 152 UMA_HISTOGRAM_ENUMERATION(
152 "ContentSettings.DefaultHandlersSetting", 153 "ContentSettings.DefaultHandlersSetting",
153 ValueToContentSetting( 154 ValueToContentSetting(
154 default_settings_[CONTENT_SETTINGS_TYPE_INTENTS].get()), 155 default_settings_[CONTENT_SETTINGS_TYPE_INTENTS].get()),
155 CONTENT_SETTING_NUM_SETTINGS); 156 CONTENT_SETTING_NUM_SETTINGS);
156 UMA_HISTOGRAM_ENUMERATION( 157 UMA_HISTOGRAM_ENUMERATION(
157 "ContentSettings.DefaultMouseCursorSetting", 158 "ContentSettings.DefaultMouseCursorSetting",
158 ValueToContentSetting( 159 ValueToContentSetting(
159 default_settings_[CONTENT_SETTINGS_TYPE_MOUSELOCK].get()), 160 default_settings_[CONTENT_SETTINGS_TYPE_MOUSELOCK].get()),
160 CONTENT_SETTING_NUM_SETTINGS); 161 CONTENT_SETTING_NUM_SETTINGS);
162 UMA_HISTOGRAM_ENUMERATION(
163 "ContentSettings.DefaultMediaStreamSetting",
164 ValueToContentSetting(
165 default_settings_[CONTENT_SETTINGS_TYPE_MEDIASTREAM].get()),
166 CONTENT_SETTING_NUM_SETTINGS);
161 167
162 pref_change_registrar_.Init(prefs_); 168 pref_change_registrar_.Init(prefs_);
163 pref_change_registrar_.Add(prefs::kDefaultContentSettings, this); 169 pref_change_registrar_.Add(prefs::kDefaultContentSettings, this);
164 pref_change_registrar_.Add(prefs::kGeolocationDefaultContentSetting, this); 170 pref_change_registrar_.Add(prefs::kGeolocationDefaultContentSetting, this);
165 } 171 }
166 172
167 DefaultProvider::~DefaultProvider() { 173 DefaultProvider::~DefaultProvider() {
168 } 174 }
169 175
170 bool DefaultProvider::SetWebsiteSetting( 176 bool DefaultProvider::SetWebsiteSetting(
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 SetWebsiteSetting( 384 SetWebsiteSetting(
379 ContentSettingsPattern::Wildcard(), 385 ContentSettingsPattern::Wildcard(),
380 ContentSettingsPattern::Wildcard(), 386 ContentSettingsPattern::Wildcard(),
381 CONTENT_SETTINGS_TYPE_GEOLOCATION, 387 CONTENT_SETTINGS_TYPE_GEOLOCATION,
382 std::string(), 388 std::string(),
383 value->DeepCopy()); 389 value->DeepCopy());
384 } 390 }
385 } 391 }
386 392
387 } // namespace content_settings 393 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698