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

Side by Side Diff: third_party/WebKit/Source/web/WebMediaDevicesRequest.cpp

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation. Created 4 years, 8 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 { 42 {
43 } 43 }
44 44
45 void WebMediaDevicesRequest::reset() 45 void WebMediaDevicesRequest::reset()
46 { 46 {
47 m_private.reset(); 47 m_private.reset();
48 } 48 }
49 49
50 WebSecurityOrigin WebMediaDevicesRequest::getSecurityOrigin() const 50 WebSecurityOrigin WebMediaDevicesRequest::getSecurityOrigin() const
51 { 51 {
52 ASSERT(!isNull() && m_private->getExecutionContext()); 52 DCHECK(!isNull() && m_private->getExecutionContext());
tkent 2016/03/31 23:05:21 Please split this into two. DCHECK(!isNull());
53 return WebSecurityOrigin(m_private->getExecutionContext()->getSecurityOrigin ()); 53 return WebSecurityOrigin(m_private->getExecutionContext()->getSecurityOrigin ());
54 } 54 }
55 55
56 WebDocument WebMediaDevicesRequest::ownerDocument() const 56 WebDocument WebMediaDevicesRequest::ownerDocument() const
57 { 57 {
58 ASSERT(!isNull()); 58 DCHECK(!isNull());
59 return WebDocument(m_private->ownerDocument()); 59 return WebDocument(m_private->ownerDocument());
60 } 60 }
61 61
62 void WebMediaDevicesRequest::requestSucceeded(WebVector<WebMediaDeviceInfo> webD evices) 62 void WebMediaDevicesRequest::requestSucceeded(WebVector<WebMediaDeviceInfo> webD evices)
63 { 63 {
64 ASSERT(!isNull()); 64 DCHECK(!isNull());
65 65
66 MediaDeviceInfoVector devices(webDevices.size()); 66 MediaDeviceInfoVector devices(webDevices.size());
67 for (size_t i = 0; i < webDevices.size(); ++i) 67 for (size_t i = 0; i < webDevices.size(); ++i)
68 devices[i] = MediaDeviceInfo::create(webDevices[i]); 68 devices[i] = MediaDeviceInfo::create(webDevices[i]);
69 69
70 m_private->succeed(devices); 70 m_private->succeed(devices);
71 } 71 }
72 72
73 bool WebMediaDevicesRequest::equals(const WebMediaDevicesRequest& other) const 73 bool WebMediaDevicesRequest::equals(const WebMediaDevicesRequest& other) const
74 { 74 {
75 if (isNull() || other.isNull()) 75 if (isNull() || other.isNull())
76 return false; 76 return false;
77 return m_private.get() == other.m_private.get(); 77 return m_private.get() == other.m_private.get();
78 } 78 }
79 79
80 void WebMediaDevicesRequest::assign(const WebMediaDevicesRequest& other) 80 void WebMediaDevicesRequest::assign(const WebMediaDevicesRequest& other)
81 { 81 {
82 m_private = other.m_private; 82 m_private = other.m_private;
83 } 83 }
84 84
85 WebMediaDevicesRequest::operator MediaDevicesRequest*() const 85 WebMediaDevicesRequest::operator MediaDevicesRequest*() const
86 { 86 {
87 return m_private.get(); 87 return m_private.get();
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698