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

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

Issue 2395133003: Update comments on pressing Esc on PlatformVerificationDialog (Closed)
Patch Set: Created 4 years, 2 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 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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/attestation/platform_verification_dialog.cc ('k') | ui/views/window/dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698