| OLD | NEW |
| 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 "android_webview/browser/permission/permission_request_handler.h" | 5 #include "android_webview/browser/permission/permission_request_handler.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/permission/aw_permission_request.h" | 9 #include "android_webview/browser/permission/aw_permission_request.h" |
| 10 #include "android_webview/browser/permission/aw_permission_request_delegate.h" | 10 #include "android_webview/browser/permission/aw_permission_request_delegate.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 bool PermissionRequestHandler::Preauthorized(const GURL& origin, | 133 bool PermissionRequestHandler::Preauthorized(const GURL& origin, |
| 134 int64_t resources) { | 134 int64_t resources) { |
| 135 std::map<std::string, int64_t>::iterator i = | 135 std::map<std::string, int64_t>::iterator i = |
| 136 preauthorized_permission_.find(origin.GetOrigin().spec()); | 136 preauthorized_permission_.find(origin.GetOrigin().spec()); |
| 137 | 137 |
| 138 return i != preauthorized_permission_.end() && | 138 return i != preauthorized_permission_.end() && |
| 139 (resources & i->second) == resources; | 139 (resources & i->second) == resources; |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace android_webivew | 142 } // namespace android_webview |
| OLD | NEW |