OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/permissions/permission_pending_request.h" | |
6 | |
7 #include "base/callback.h" | |
8 #include "content/public/browser/permission_manager.h" | |
9 #include "content/public/browser/permission_type.h" | |
10 | |
11 namespace content { | |
12 | |
13 PermissionPendingRequest::PermissionPendingRequest( | |
14 PermissionRequestCallback callback, | |
15 int request_count) : | |
16 callback_(callback), | |
17 request_count_(request_count) { | |
18 } | |
19 | |
20 PermissionPendingRequest::~PermissionPendingRequest() { | |
21 if (!callback_.is_null()) { | |
22 mojo::Array<PermissionStatus> statuses = | |
23 mojo::Array<PermissionStatus>::New(request_count_); | |
24 for (int i = 0; i < request_count_; ++i) | |
25 statuses[i] = PERMISSION_STATUS_ASK; | |
mlamouri (slow - plz ping)
2015/08/21 10:24:40
DENIED is usually what we do as default value.
Lalit Maganti
2015/08/21 12:56:00
I just followed what was previously in permission_
| |
26 callback_.Run(statuses.Pass()); | |
27 } | |
28 } | |
29 | |
30 } // namespace content | |
OLD | NEW |