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

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

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 GeolocationIdMap m_geolocationIdMap; 46 GeolocationIdMap m_geolocationIdMap;
47 IdGeolocationMap m_idGeolocationMap; 47 IdGeolocationMap m_idGeolocationMap;
48 }; 48 };
49 49
50 int WebGeolocationPermissionRequestManager::add(const WebGeolocationPermissionRe quest& permissionRequest) 50 int WebGeolocationPermissionRequestManager::add(const WebGeolocationPermissionRe quest& permissionRequest)
51 { 51 {
52 Geolocation* geolocation = permissionRequest.geolocation(); 52 Geolocation* geolocation = permissionRequest.geolocation();
53 WebGeolocationPermissionRequestManagerPrivate* manager = ensureManager(); 53 WebGeolocationPermissionRequestManagerPrivate* manager = ensureManager();
54 ASSERT(!manager->m_geolocationIdMap.contains(geolocation)); 54 DCHECK(!manager->m_geolocationIdMap.contains(geolocation));
55 static int lastId; 55 static int lastId;
56 int id = ++lastId; 56 int id = ++lastId;
57 manager->m_geolocationIdMap.add(geolocation, id); 57 manager->m_geolocationIdMap.add(geolocation, id);
58 manager->m_idGeolocationMap.add(id, geolocation); 58 manager->m_idGeolocationMap.add(id, geolocation);
59 return id; 59 return id;
60 } 60 }
61 61
62 bool WebGeolocationPermissionRequestManager::remove(const WebGeolocationPermissi onRequest& permissionRequest, int& id) 62 bool WebGeolocationPermissionRequestManager::remove(const WebGeolocationPermissi onRequest& permissionRequest, int& id)
63 { 63 {
64 Geolocation* geolocation = permissionRequest.geolocation(); 64 Geolocation* geolocation = permissionRequest.geolocation();
(...skipping 27 matching lines...) Expand all
92 92
93 return m_private.get(); 93 return m_private.get();
94 } 94 }
95 95
96 void WebGeolocationPermissionRequestManager::reset() 96 void WebGeolocationPermissionRequestManager::reset()
97 { 97 {
98 m_private.reset(); 98 m_private.reset();
99 } 99 }
100 100
101 } // namespace blink 101 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebGeolocationController.cpp ('k') | third_party/WebKit/Source/web/WebHeap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698