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

Side by Side Diff: components/content_settings/core/common/content_settings.cc

Issue 2123863004: ScreenCapture for Android phase1, part II (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix problem with adding content setting type 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "components/content_settings/core/common/content_settings.h" 5 #include "components/content_settings/core/common/content_settings.h"
6 6
7 #include "base/containers/hash_tables.h" 7 #include "base/containers/hash_tables.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #else 49 #else
50 CONTENT_SETTINGS_TYPE_DEFAULT, // PROTECTED_MEDIA_IDENTIFIER (mobile only). 50 CONTENT_SETTINGS_TYPE_DEFAULT, // PROTECTED_MEDIA_IDENTIFIER (mobile only).
51 #endif 51 #endif
52 CONTENT_SETTINGS_TYPE_APP_BANNER, 52 CONTENT_SETTINGS_TYPE_APP_BANNER,
53 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, 53 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT,
54 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, 54 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE,
55 CONTENT_SETTINGS_TYPE_KEYGEN, 55 CONTENT_SETTINGS_TYPE_KEYGEN,
56 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, 56 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD,
57 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, 57 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
58 CONTENT_SETTINGS_TYPE_AUTOPLAY, 58 CONTENT_SETTINGS_TYPE_AUTOPLAY,
59 #if defined(OS_ANDROID)
raymes 2016/07/13 02:44:09 nit: I think we can remove the ifdef here
braveyao 2016/07/13 19:51:57 Done.
60 CONTENT_SETTINGS_TYPE_MEDIASTREAM_SCREEN,
61 #endif
59 }; 62 };
60 63
61 int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting, 64 int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting,
62 size_t* num_values) { 65 size_t* num_values) {
63 // Translate the list above into a map for fast lookup. 66 // Translate the list above into a map for fast lookup.
64 typedef base::hash_map<int, int> Map; 67 typedef base::hash_map<int, int> Map;
65 CR_DEFINE_STATIC_LOCAL(Map, kMap, ()); 68 CR_DEFINE_STATIC_LOCAL(Map, kMap, ());
66 if (kMap.empty()) { 69 if (kMap.empty()) {
67 for (size_t i = 0; i < arraysize(kHistogramOrder); ++i) { 70 for (size_t i = 0; i < arraysize(kHistogramOrder); ++i) {
68 if (kHistogramOrder[i] != CONTENT_SETTINGS_TYPE_DEFAULT) 71 if (kHistogramOrder[i] != CONTENT_SETTINGS_TYPE_DEFAULT)
(...skipping 21 matching lines...) Expand all
90 ContentSettingPatternSource::ContentSettingPatternSource() 93 ContentSettingPatternSource::ContentSettingPatternSource()
91 : setting(CONTENT_SETTING_DEFAULT), incognito(false) { 94 : setting(CONTENT_SETTING_DEFAULT), incognito(false) {
92 } 95 }
93 96
94 ContentSettingPatternSource::ContentSettingPatternSource( 97 ContentSettingPatternSource::ContentSettingPatternSource(
95 const ContentSettingPatternSource& other) = default; 98 const ContentSettingPatternSource& other) = default;
96 99
97 RendererContentSettingRules::RendererContentSettingRules() {} 100 RendererContentSettingRules::RendererContentSettingRules() {}
98 101
99 RendererContentSettingRules::~RendererContentSettingRules() {} 102 RendererContentSettingRules::~RendererContentSettingRules() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698