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

Side by Side Diff: extensions/shell/browser/media_capture_util.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/media_capture_util.h" 5 #include "extensions/shell/browser/media_capture_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 : content::MEDIA_DEVICE_OK, 69 : content::MEDIA_DEVICE_OK,
70 std::move(ui)); 70 std::move(ui));
71 } 71 }
72 72
73 void VerifyMediaAccessPermission(content::MediaStreamType type, 73 void VerifyMediaAccessPermission(content::MediaStreamType type,
74 const Extension* extension) { 74 const Extension* extension) {
75 const PermissionsData* permissions_data = extension->permissions_data(); 75 const PermissionsData* permissions_data = extension->permissions_data();
76 if (type == content::MEDIA_DEVICE_AUDIO_CAPTURE) { 76 if (type == content::MEDIA_DEVICE_AUDIO_CAPTURE) {
77 // app_shell has no UI surface to show an error, and on an embedded device 77 // app_shell has no UI surface to show an error, and on an embedded device
78 // it's better to crash than to have a feature not work. 78 // it's better to crash than to have a feature not work.
79 CHECK(permissions_data->HasAPIPermission(APIPermission::kAudioCapture)) 79 // Audio capture request but no audioCapture permission in manifest.
80 << "Audio capture request but no audioCapture permission in manifest."; 80 CHECK(permissions_data->HasAPIPermission(APIPermission::kAudioCapture));
81 } else { 81 } else {
82 DCHECK(type == content::MEDIA_DEVICE_VIDEO_CAPTURE); 82 DCHECK(type == content::MEDIA_DEVICE_VIDEO_CAPTURE);
83 CHECK(permissions_data->HasAPIPermission(APIPermission::kVideoCapture)) 83 // Video capture request but no videoCapture permission in manifest.
84 << "Video capture request but no videoCapture permission in manifest."; 84 CHECK(permissions_data->HasAPIPermission(APIPermission::kVideoCapture));
85 } 85 }
86 } 86 }
87 87
88 } // namespace media_capture_util 88 } // namespace media_capture_util
89 } // namespace extensions 89 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698