privacy

The privacy permission allows an extension to control privacy-related features in Chrome.

What it does

  • Grants access to the chrome.privacy API.
  • Allows an extension to read and modify various browser settings related to privacy.
  • These settings are exposed as properties on chrome.privacy.network and chrome.privacy.services.
  • Examples of controllable settings include:
    • Enabling/disabling the network prediction (prerendering).
    • Enabling/disabling Safe Browsing.
    • Enabling/disabling the translation service.
    • Enabling/disabling the spell-check service.

When to use it

This is for extensions that are specifically designed to manage and enhance user privacy.

Examples:

  • A "privacy hardening" extension that disables features that might send data to Google or other third parties (like network prediction or translation).
  • A corporate extension that enforces specific privacy settings across a fleet of browsers.

Manifest Declaration

This permission triggers a warning on installation.

{
  "name": "My Privacy Manager",
  "version": "1.0",
  "manifest_version": 3,
  "permissions": [
    "privacy"
  ]
}

Security & Privacy

Why is it risky?

This permission gives an extension control over important browser settings related to your privacy and security. For example, it can turn on or off features like:

  • Safe Browsing: Protects you from malicious websites.
  • Network Prediction: Speeds up browsing but may send data to Google.
  • Spell Check and Translation: Can send what you type to servers.

A legitimate privacy extension might use this to make your settings more secure. However, a malicious extension could disable your security features, like Safe Browsing, leaving you vulnerable to phishing sites and malware.

API Usage Example

This example checks if network prediction is enabled and, if so, disables it.

// background.js or options.js

async function disableNetworkPrediction() {
  try {
    // Get the current setting
    const currentSetting = await new Promise((resolve) => {
      chrome.privacy.network.networkPredictionEnabled.get({}, resolve);
    });

    if (currentSetting.value) {
      console.log('Network prediction is enabled. Disabling it now.');
      // Set the new value
      await new Promise((resolve, reject) => {
        chrome.privacy.network.networkPredictionEnabled.set({ value: false }, () => {
          chrome.runtime.lastError ? reject(chrome.runtime.lastError) : resolve();
        });
      });
      console.log('Network prediction has been disabled.');
    } else {
      console.log('Network prediction is already disabled.');
    }
  } catch (error) {
    console.error('Failed to change privacy setting:', error);
  }
}

disableNetworkPrediction();

Extensions with the privacy permission

Here are some popular browser extensions that use the "privacy" permission. To explore more, try our Advanced search.

Permission Metrics

Popularity

Security Risk


Usage by Platform