OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/protected_media_identifier_permission_context.h" | 5 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 if (request == pending_requests_.end()) | 199 if (request == pending_requests_.end()) |
200 return; | 200 return; |
201 | 201 |
202 DCHECK(request->second.second == id); | 202 DCHECK(request->second.second == id); |
203 pending_requests_.erase(request); | 203 pending_requests_.erase(request); |
204 | 204 |
205 ContentSetting content_setting = CONTENT_SETTING_ASK; | 205 ContentSetting content_setting = CONTENT_SETTING_ASK; |
206 bool persist = false; // Whether the ContentSetting should be saved. | 206 bool persist = false; // Whether the ContentSetting should be saved. |
207 switch (response) { | 207 switch (response) { |
208 case PlatformVerificationDialog::CONSENT_RESPONSE_NONE: | 208 case PlatformVerificationDialog::CONSENT_RESPONSE_NONE: |
| 209 VLOG(1) << "Platform verification dismissed by user."; |
209 content_setting = CONTENT_SETTING_ASK; | 210 content_setting = CONTENT_SETTING_ASK; |
210 persist = false; | 211 persist = false; |
211 break; | 212 break; |
212 case PlatformVerificationDialog::CONSENT_RESPONSE_ALLOW: | 213 case PlatformVerificationDialog::CONSENT_RESPONSE_ALLOW: |
213 VLOG(1) << "Platform verification accepted by user."; | 214 VLOG(1) << "Platform verification accepted by user."; |
214 content::RecordAction( | 215 content::RecordAction( |
215 base::UserMetricsAction("PlatformVerificationAccepted")); | 216 base::UserMetricsAction("PlatformVerificationAccepted")); |
216 content_setting = CONTENT_SETTING_ALLOW; | 217 content_setting = CONTENT_SETTING_ALLOW; |
217 persist = true; | 218 persist = true; |
218 break; | 219 break; |
219 case PlatformVerificationDialog::CONSENT_RESPONSE_DENY: | 220 case PlatformVerificationDialog::CONSENT_RESPONSE_DENY: |
220 VLOG(1) << "Platform verification denied by user."; | 221 VLOG(1) << "Platform verification denied by user."; |
221 content::RecordAction( | 222 content::RecordAction( |
222 base::UserMetricsAction("PlatformVerificationRejected")); | 223 base::UserMetricsAction("PlatformVerificationRejected")); |
223 content_setting = CONTENT_SETTING_BLOCK; | 224 content_setting = CONTENT_SETTING_BLOCK; |
224 persist = true; | 225 persist = true; |
225 break; | 226 break; |
226 } | 227 } |
227 | 228 |
228 NotifyPermissionSet( | 229 NotifyPermissionSet( |
229 id, requesting_origin, embedding_origin, callback, | 230 id, requesting_origin, embedding_origin, callback, |
230 persist, content_setting); | 231 persist, content_setting); |
231 } | 232 } |
232 #endif | 233 #endif |
OLD | NEW |