summaryrefslogtreecommitdiffstats
path: root/chrome/browser/usb
diff options
context:
space:
mode:
authorreillyg <reillyg@chromium.org>2016-01-06 11:21:48 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-06 19:22:33 +0000
commitfd341ed2afae7ac7f456738f14527f965251a7aa (patch)
treea1aa799b4f179adb633c5155a6e36e16b4c22119 /chrome/browser/usb
parent927618090a4655a952bf4174ace62f94e973c7fb (diff)
downloadchromium_src-fd341ed2afae7ac7f456738f14527f965251a7aa.zip
chromium_src-fd341ed2afae7ac7f456738f14527f965251a7aa.tar.gz
chromium_src-fd341ed2afae7ac7f456738f14527f965251a7aa.tar.bz2
Fix handling of ephemeral USB permissions in content settings.
This change first marks ephemeral USB permissions as coming from the "preference" source, which means user preferences and is close enough to the truth. The content settings handler is also change to update the model whenever revoking a permission instead of monitoring for content settings changes. This is because ephemeral permission changes don't touch real content settings. BUG=529950 Review URL: https://codereview.chromium.org/1517373002 Cr-Commit-Position: refs/heads/master@{#367875}
Diffstat (limited to 'chrome/browser/usb')
-rw-r--r--chrome/browser/usb/usb_chooser_context.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/usb/usb_chooser_context.cc b/chrome/browser/usb/usb_chooser_context.cc
index fc940c9..702c98a 100644
--- a/chrome/browser/usb/usb_chooser_context.cc
+++ b/chrome/browser/usb/usb_chooser_context.cc
@@ -100,9 +100,9 @@ UsbChooserContext::GetAllGrantedObjects() {
base::DictionaryValue object;
object.SetString(kDeviceNameKey, device->product_string());
object.SetString(kGuidKey, device->guid());
- objects.push_back(make_scoped_ptr(
- new ChooserContextBase::Object(requesting_origin, embedding_origin,
- &object, "", is_off_the_record_)));
+ objects.push_back(make_scoped_ptr(new ChooserContextBase::Object(
+ requesting_origin, embedding_origin, &object, "preference",
+ is_off_the_record_)));
}
}