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

Side by Side Diff: content/shell/browser/layout_test/layout_test_permission_manager.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/shell/browser/layout_test/layout_test_permission_manager.h" 5 #include "content/shell/browser/layout_test/layout_test_permission_manager.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const GURL& requesting_origin, 122 const GURL& requesting_origin,
123 const GURL& embedding_origin) { 123 const GURL& embedding_origin) {
124 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || 124 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
125 BrowserThread::CurrentlyOn(BrowserThread::IO)); 125 BrowserThread::CurrentlyOn(BrowserThread::IO));
126 126
127 base::AutoLock lock(permissions_lock_); 127 base::AutoLock lock(permissions_lock_);
128 128
129 auto it = permissions_.find( 129 auto it = permissions_.find(
130 PermissionDescription(permission, requesting_origin, embedding_origin)); 130 PermissionDescription(permission, requesting_origin, embedding_origin));
131 if (it == permissions_.end()) 131 if (it == permissions_.end())
132 return PERMISSION_STATUS_DENIED; 132 return PermissionStatus::DENIED;
133 return it->second; 133 return it->second;
134 } 134 }
135 135
136 void LayoutTestPermissionManager::RegisterPermissionUsage( 136 void LayoutTestPermissionManager::RegisterPermissionUsage(
137 PermissionType permission, 137 PermissionType permission,
138 const GURL& requesting_origin, 138 const GURL& requesting_origin,
139 const GURL& embedding_origin) { 139 const GURL& embedding_origin) {
140 DCHECK_CURRENTLY_ON(BrowserThread::UI); 140 DCHECK_CURRENTLY_ON(BrowserThread::UI);
141 } 141 }
142 142
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // Add the callback to |callbacks| which will be run after the loop to 214 // Add the callback to |callbacks| which will be run after the loop to
215 // prevent re-entrance issues. 215 // prevent re-entrance issues.
216 callbacks.push_back(base::Bind(subscription->callback, status)); 216 callbacks.push_back(base::Bind(subscription->callback, status));
217 } 217 }
218 218
219 for (const auto& callback : callbacks) 219 for (const auto& callback : callbacks)
220 callback.Run(); 220 callback.Run();
221 } 221 }
222 222
223 } // namespace content 223 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698