OLD | NEW |
---|---|
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/child/permissions/permission_dispatcher.h" | 5 #include "content/child/permissions/permission_dispatcher.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "content/child/worker_task_runner.h" | 8 #include "content/child/worker_task_runner.h" |
9 #include "content/public/common/service_registry.h" | 9 #include "content/public/common/service_registry.h" |
10 #include "third_party/WebKit/public/platform/WebURL.h" | 10 #include "third_party/WebKit/public/platform/WebURL.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 } | 49 } |
50 | 50 |
51 blink::WebPermissionStatus GetWebPermissionStatus(PermissionStatus status) { | 51 blink::WebPermissionStatus GetWebPermissionStatus(PermissionStatus status) { |
52 switch (status) { | 52 switch (status) { |
53 case PERMISSION_STATUS_GRANTED: | 53 case PERMISSION_STATUS_GRANTED: |
54 return blink::WebPermissionStatusGranted; | 54 return blink::WebPermissionStatusGranted; |
55 case PERMISSION_STATUS_DENIED: | 55 case PERMISSION_STATUS_DENIED: |
56 return blink::WebPermissionStatusDenied; | 56 return blink::WebPermissionStatusDenied; |
57 case PERMISSION_STATUS_ASK: | 57 case PERMISSION_STATUS_ASK: |
58 return blink::WebPermissionStatusPrompt; | 58 return blink::WebPermissionStatusPrompt; |
59 case PERMISSION_STATUS_NUM: | |
60 // PERMISSION_STATUS_NUM should never be passed into this function. | |
jww
2015/07/07 21:14:23
It appears you didn't add a NOTREACHED into the sw
keenanb
2015/07/08 00:37:21
sort of done. (this function is local to this file
| |
61 break; | |
59 } | 62 } |
60 | 63 |
61 NOTREACHED(); | 64 NOTREACHED(); |
62 return blink::WebPermissionStatusDenied; | 65 return blink::WebPermissionStatusDenied; |
63 } | 66 } |
64 | 67 |
65 const int kNoWorkerThread = 0; | 68 const int kNoWorkerThread = 0; |
66 | 69 |
67 } // anonymous namespace | 70 } // anonymous namespace |
68 | 71 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 origin, | 280 origin, |
278 current_status, | 281 current_status, |
279 base::Bind(&PermissionDispatcher::OnPermissionChanged, | 282 base::Bind(&PermissionDispatcher::OnPermissionChanged, |
280 base::Unretained(this), | 283 base::Unretained(this), |
281 type, | 284 type, |
282 origin, | 285 origin, |
283 base::Unretained(observer))); | 286 base::Unretained(observer))); |
284 } | 287 } |
285 | 288 |
286 } // namespace content | 289 } // namespace content |
OLD | NEW |