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

Side by Side Diff: extensions/browser/api/device_permissions_prompt.h

Issue 1034333002: Check USB device path access when prompting users to select a device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move MockPermissionBrokerClient into its own header. Created 5 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
« no previous file with comments | « device/usb/usb_device_impl.cc ('k') | extensions/browser/api/device_permissions_prompt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef EXTENSIONS_BROWSER_DEVICE_PERMISSIONS_PROMPT_H_ 5 #ifndef EXTENSIONS_BROWSER_DEVICE_PERMISSIONS_PROMPT_H_
6 #define EXTENSIONS_BROWSER_DEVICE_PERMISSIONS_PROMPT_H_ 6 #define EXTENSIONS_BROWSER_DEVICE_PERMISSIONS_PROMPT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 private: 100 private:
101 friend struct content::BrowserThread::DeleteOnThread< 101 friend struct content::BrowserThread::DeleteOnThread<
102 content::BrowserThread::FILE>; 102 content::BrowserThread::FILE>;
103 friend class base::DeleteHelper<Prompt>; 103 friend class base::DeleteHelper<Prompt>;
104 104
105 virtual ~Prompt(); 105 virtual ~Prompt();
106 106
107 // Querying for devices must be done asynchronously on the FILE thread. 107 // Querying for devices must be done asynchronously on the FILE thread.
108 void DoDeviceQuery(); 108 void DoDeviceQuery();
109 void AppendCheckedUsbDevice(std::vector<DeviceInfo>* device_info,
110 scoped_refptr<device::UsbDevice> device,
111 const base::Closure& callback,
112 bool allowed);
113 void AddCheckedUsbDevice(scoped_refptr<device::UsbDevice> device,
114 bool allowed);
115 void DeviceQueryComplete(std::vector<DeviceInfo>* device_info);
109 void SetDevices(const std::vector<DeviceInfo>& devices); 116 void SetDevices(const std::vector<DeviceInfo>& devices);
110 void AddDevice(const DeviceInfo& device); 117 void AddDevice(const DeviceInfo& device);
111 void RemoveDevice(scoped_refptr<device::UsbDevice> device); 118 void RemoveDevice(scoped_refptr<device::UsbDevice> device);
112 119
113 // device::UsbService::Observer implementation: 120 // device::UsbService::Observer implementation:
114 void OnDeviceAdded(scoped_refptr<device::UsbDevice> device) override; 121 void OnDeviceAdded(scoped_refptr<device::UsbDevice> device) override;
115 void OnDeviceRemoved(scoped_refptr<device::UsbDevice> device) override; 122 void OnDeviceRemoved(scoped_refptr<device::UsbDevice> device) override;
116 123
117 const extensions::Extension* extension_; 124 const extensions::Extension* extension_;
118 content::BrowserContext* browser_context_; 125 content::BrowserContext* browser_context_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // The delegate called after the UI has been dismissed. 164 // The delegate called after the UI has been dismissed.
158 Delegate* delegate_; 165 Delegate* delegate_;
159 166
160 // Parameters available to the UI implementation. 167 // Parameters available to the UI implementation.
161 scoped_refptr<Prompt> prompt_; 168 scoped_refptr<Prompt> prompt_;
162 }; 169 };
163 170
164 } // namespace extensions 171 } // namespace extensions
165 172
166 #endif // EXTENSIONS_BROWSER_API_DEVICE_PERMISSIONS_PROMPT_H_ 173 #endif // EXTENSIONS_BROWSER_API_DEVICE_PERMISSIONS_PROMPT_H_
OLDNEW
« no previous file with comments | « device/usb/usb_device_impl.cc ('k') | extensions/browser/api/device_permissions_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698