Index: chrome/renderer/content_settings_observer.cc |
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc |
index 55d961be2e406972ed55bb6bb5034729ef45a744..22c9ec21d0787d001deb459055c5b10a33c678c8 100644 |
--- a/chrome/renderer/content_settings_observer.cc |
+++ b/chrome/renderer/content_settings_observer.cc |
@@ -420,12 +420,12 @@ bool ContentSettingsObserver::allowStorage(bool local) { |
} |
bool ContentSettingsObserver::allowReadFromClipboard(bool default_value) { |
- bool allowed = false; |
+ bool allowed = default_value; |
#if defined(ENABLE_EXTENSIONS) |
extensions::ScriptContext* calling_context = |
extension_dispatcher_->script_context_set().GetCalling(); |
if (calling_context) { |
- allowed = calling_context->HasAPIPermission( |
+ allowed |= calling_context->HasAPIPermission( |
extensions::APIPermission::kClipboardRead); |
} |
#endif |
@@ -433,7 +433,7 @@ bool ContentSettingsObserver::allowReadFromClipboard(bool default_value) { |
} |
bool ContentSettingsObserver::allowWriteToClipboard(bool default_value) { |
- bool allowed = false; |
+ bool allowed = default_value; |
#if defined(ENABLE_EXTENSIONS) |
// All blessed extension pages could historically write to the clipboard, so |
// preserve that for compatibility. |
@@ -444,7 +444,7 @@ bool ContentSettingsObserver::allowWriteToClipboard(bool default_value) { |
extensions::Feature::BLESSED_EXTENSION_CONTEXT) { |
allowed = true; |
} else { |
- allowed = calling_context->HasAPIPermission( |
+ allowed |= calling_context->HasAPIPermission( |
extensions::APIPermission::kClipboardWrite); |
} |
} |