| OLD | NEW |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
| 2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
| 3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
| 4 templating mechanism. | 4 templating mechanism. |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
| 6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
| 7 authored overview content. | 7 authored overview content. |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
| 9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
| 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> |
| 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> |
| 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> | 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> |
| 15 </script> | 15 </script> |
| 16 <script type="text/javascript" src="js/api_page_generator.js"></script> | 16 <script type="text/javascript" src="js/api_page_generator.js"></script> |
| 17 <script type="text/javascript" src="js/bootstrap.js"></script> | 17 <script type="text/javascript" src="js/bootstrap.js"></script> |
| 18 <script type="text/javascript" src="js/sidebar.js"></script> | 18 <script type="text/javascript" src="js/sidebar.js"></script> |
| 19 <meta name="description" content="Documentation for the chrome.experimental.pr
ivacy module, which is part of the Google Chrome extension APIs."><title>chrome
.experimental.privacy - Google Chrome Extensions - Google Code</title></head> | 19 <meta name="description" content="Documentation for the chrome.privacy module,
which is part of the Google Chrome extension APIs."><title>Privacy - Google Ch
rome Extensions - Google Code</title></head> |
| 20 <body> <div id="gc-container" class="labs"> | 20 <body> <div id="gc-container" class="labs"> |
| 21 <div id="devModeWarning"> | 21 <div id="devModeWarning"> |
| 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. | 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. |
| 23 </div> | 23 </div> |
| 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> |
| 25 <!-- In particular, sub-templates that recurse, must be used by allowing | 25 <!-- In particular, sub-templates that recurse, must be used by allowing |
| 26 jstemplate to make a copy of the template in this section which | 26 jstemplate to make a copy of the template in this section which |
| 27 are not operated on by way of the jsskip="true" --> | 27 are not operated on by way of the jsskip="true" --> |
| 28 <div style="display:none"> | 28 <div style="display:none"> |
| 29 | 29 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 </ul> | 287 </ul> |
| 288 </li> | 288 </li> |
| 289 </ul> | 289 </ul> |
| 290 </div> | 290 </div> |
| 291 <script> | 291 <script> |
| 292 initToggles(); | 292 initToggles(); |
| 293 </script> | 293 </script> |
| 294 | 294 |
| 295 <div class="g-unit" id="gc-pagecontent"> | 295 <div class="g-unit" id="gc-pagecontent"> |
| 296 <div id="pageTitle"> | 296 <div id="pageTitle"> |
| 297 <h1 class="page_title">chrome.experimental.privacy</h1> | 297 <h1 class="page_title">Privacy</h1> |
| 298 </div> | 298 </div> |
| 299 <!-- TABLE OF CONTENTS --> | 299 <!-- TABLE OF CONTENTS --> |
| 300 <div id="toc"> | 300 <div id="toc"> |
| 301 <h2>Contents</h2> | 301 <h2>Contents</h2> |
| 302 <ol> | 302 <ol> |
| 303 <li style="display: none; "> | 303 <li> |
| 304 <a>h2Name</a> | 304 <a href="#manifest">Manifest</a> |
| 305 <ol> | 305 <ol> |
| 306 <li> | 306 <li style="display: none; "> |
| 307 <a>h3Name</a> |
| 308 </li> |
| 309 </ol> |
| 310 </li><li> |
| 311 <a href="#usage">Usage</a> |
| 312 <ol> |
| 313 <li style="display: none; "> |
| 314 <a>h3Name</a> |
| 315 </li> |
| 316 </ol> |
| 317 </li><li> |
| 318 <a href="#examples">Examples</a> |
| 319 <ol> |
| 320 <li style="display: none; "> |
| 307 <a>h3Name</a> | 321 <a>h3Name</a> |
| 308 </li> | 322 </li> |
| 309 </ol> | 323 </ol> |
| 310 </li> | 324 </li> |
| 311 <li> | 325 <li> |
| 312 <a href="#apiReference">API reference: chrome.experimental.priva
cy</a> | 326 <a href="#apiReference">API reference: chrome.privacy</a> |
| 313 <ol> | 327 <ol> |
| 314 <li> | 328 <li> |
| 315 <a href="#properties">Properties</a> | 329 <a href="#properties">Properties</a> |
| 316 <ol> | 330 <ol> |
| 317 <li> | 331 <li> |
| 318 <a href="#property-network">network</a> | 332 <a href="#property-network">network</a> |
| 319 </li><li> | 333 </li><li> |
| 320 <a href="#property-services">services</a> | 334 <a href="#property-services">services</a> |
| 321 </li><li> | 335 </li><li> |
| 322 <a href="#property-websites">websites</a> | 336 <a href="#property-websites">websites</a> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 351 </li> | 365 </li> |
| 352 </ol> | 366 </ol> |
| 353 </li> | 367 </li> |
| 354 </ol> | 368 </ol> |
| 355 </li> | 369 </li> |
| 356 </ol> | 370 </ol> |
| 357 </div> | 371 </div> |
| 358 <!-- /TABLE OF CONTENTS --> | 372 <!-- /TABLE OF CONTENTS --> |
| 359 | 373 |
| 360 <!-- Standard content lead-in for experimental API pages --> | 374 <!-- Standard content lead-in for experimental API pages --> |
| 361 <p id="classSummary"> | 375 <p id="classSummary" style="display: none; "> |
| 362 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. | 376 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. |
| 363 </p> | 377 </p> |
| 364 | 378 |
| 365 <!-- STATIC CONTENT PLACEHOLDER --> | 379 <!-- STATIC CONTENT PLACEHOLDER --> |
| 366 <div id="static"></div> | 380 <div id="static"><div id="pageData-name" class="pageData">Privacy</div> |
| 381 |
| 382 <!-- BEGIN AUTHORED CONTENT --> |
| 383 <p id="classSummary"> |
| 384 Use the <code>chrome.privacy</code> module to control usage of the features in |
| 385 Chrome that can affect a user's privacy. This module relies on the |
| 386 <a href="types.html#ChromeSetting">ChromeSetting prototype of the type API</a> |
| 387 for getting and setting Chrome's configuration. |
| 388 </p> |
| 389 |
| 390 <p class="note"> |
| 391 The <a href="http://www.google.com/intl/en/landing/chrome/google-chrome-privac
y-whitepaper.pdf">Chrome Privacy Whitepaper</a> |
| 392 gives background detail regarding the features which this API can control. |
| 393 </p> |
| 394 |
| 395 <h2 id="manifest">Manifest</h2> |
| 396 <p> |
| 397 You must declare the "privacy" permission in your extension's |
| 398 <a href="manifest.html"> manifest</a> to use the API. For example: |
| 399 </p> |
| 400 |
| 401 <pre>{ |
| 402 "name": "My extension", |
| 403 ... |
| 404 <b>"permissions": [ |
| 405 "privacy" |
| 406 ]</b>, |
| 407 ... |
| 408 }</pre> |
| 409 |
| 410 <h2 id="usage">Usage</h2> |
| 411 |
| 412 <p> |
| 413 Reading the current value of a setting is straightforward. You'll first need |
| 414 to find the property you're interested in, then you'll call <code>get()</code> |
| 415 on that object in order to retrieve it's current value and your extension's |
| 416 level of control. For example, to determine if Chrome's Autofill feature is |
| 417 enabled, you'd write: |
| 418 </p> |
| 419 |
| 420 <pre>chrome.privacy.services.autofillEnabled.get({}, function(details) { |
| 421 if (details.value) |
| 422 console.log('Autofill is on!'); |
| 423 else |
| 424 console.log('Autofill is off!'); |
| 425 });</pre> |
| 426 |
| 427 <p> |
| 428 Changing the value of a setting is a little bit more complex, simply because |
| 429 you first must verify that your extension can control the setting. If the |
| 430 setting has been locked down by enterprise policy, or already been set by |
| 431 another extension, then your extension will be denied write access. You'll |
| 432 use the <code>get()</code> method to determine your level of access, and then |
| 433 call <code>set()</code> if your extension can grab control over the setting: |
| 434 </p> |
| 435 |
| 436 <pre>chrome.privacy.services.autofillEnabled.get({}, function(details) { |
| 437 if (details.levelOfControl === 'controllable_by_this_extension') { |
| 438 chrome.privacy.services.autofillEnabled.set({ value: true }, function() { |
| 439 if (chrome.extension.lastError === undefined) |
| 440 console.log("Hooray, it worked!"); |
| 441 else |
| 442 console.log("Sadness!", chrome.extension.lastError); |
| 443 } |
| 444 } |
| 445 });</pre> |
| 446 |
| 447 <h2 id="examples">Examples</h2> |
| 448 <p> |
| 449 For example code, see the |
| 450 <a href="samples.html#privacy">Privacy API samples</a>. |
| 451 </p> |
| 452 <!-- END AUTHORED CONTENT --> |
| 453 </div> |
| 367 | 454 |
| 368 <!-- API PAGE --> | 455 <!-- API PAGE --> |
| 369 <div class="apiPage"> | 456 <div class="apiPage"> |
| 370 <a name="apiReference"></a> | 457 <a name="apiReference"></a> |
| 371 <h2>API reference: chrome.experimental.privacy</h2> | 458 <h2>API reference: chrome.privacy</h2> |
| 372 | 459 |
| 373 <!-- PROPERTIES --> | 460 <!-- PROPERTIES --> |
| 374 <div class="apiGroup"> | 461 <div class="apiGroup"> |
| 375 <a name="properties"></a> | 462 <a name="properties"></a> |
| 376 <h3 id="properties">Properties</h3> | 463 <h3 id="properties">Properties</h3> |
| 377 | 464 |
| 378 <div> | 465 <div> |
| 379 <a name="property-network"></a> | 466 <a name="property-network"></a> |
| 380 <h4>network</h4> | 467 <h4>network</h4> |
| 381 <div class="summary"> | 468 <div class="summary"> |
| 382 <!-- Note: intentionally longer 80 columns --> | 469 <!-- Note: intentionally longer 80 columns --> |
| 383 <span>chrome.experimental.privacy.</span><span>network</span> | 470 <span>chrome.privacy.</span><span>network</span> |
| 384 </div> | 471 </div> |
| 385 <div> | 472 <div> |
| 386 <dt> | 473 <dt> |
| 387 <var>network</var> | 474 <var>network</var> |
| 388 <em> | 475 <em> |
| 389 | 476 |
| 390 <!-- TYPE --> | 477 <!-- TYPE --> |
| 391 <div style="display:inline"> | 478 <div style="display:inline"> |
| 392 ( | 479 ( |
| 393 <span class="optional" style="display: none; ">optional</spa
n> | 480 <span class="optional" style="display: none; ">optional</spa
n> |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 <dd style="display: none; "> | 599 <dd style="display: none; "> |
| 513 <div></div> | 600 <div></div> |
| 514 </dd> | 601 </dd> |
| 515 | 602 |
| 516 </div> | 603 </div> |
| 517 </div><div> | 604 </div><div> |
| 518 <a name="property-services"></a> | 605 <a name="property-services"></a> |
| 519 <h4>services</h4> | 606 <h4>services</h4> |
| 520 <div class="summary"> | 607 <div class="summary"> |
| 521 <!-- Note: intentionally longer 80 columns --> | 608 <!-- Note: intentionally longer 80 columns --> |
| 522 <span>chrome.experimental.privacy.</span><span>services</span> | 609 <span>chrome.privacy.</span><span>services</span> |
| 523 </div> | 610 </div> |
| 524 <div> | 611 <div> |
| 525 <dt> | 612 <dt> |
| 526 <var>services</var> | 613 <var>services</var> |
| 527 <em> | 614 <em> |
| 528 | 615 |
| 529 <!-- TYPE --> | 616 <!-- TYPE --> |
| 530 <div style="display:inline"> | 617 <div style="display:inline"> |
| 531 ( | 618 ( |
| 532 <span class="optional" style="display: none; ">optional</spa
n> | 619 <span class="optional" style="display: none; ">optional</spa
n> |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 | 852 |
| 766 <!-- FUNCTION PARAMETERS --> | 853 <!-- FUNCTION PARAMETERS --> |
| 767 <dd style="display: none; "> | 854 <dd style="display: none; "> |
| 768 <div></div> | 855 <div></div> |
| 769 </dd> | 856 </dd> |
| 770 | 857 |
| 771 </div> | 858 </div> |
| 772 </div><div> | 859 </div><div> |
| 773 <div> | 860 <div> |
| 774 <dt> | 861 <dt> |
| 775 <var>metricsReportingEnabled</var> | |
| 776 <em> | |
| 777 | |
| 778 <!-- TYPE --> | |
| 779 <div style="display:inline"> | |
| 780 ( | |
| 781 <span class="optional" style="display: none; ">optional</spa
n> | |
| 782 <span class="enum" style="display: none; ">enumerated</span> | |
| 783 <span id="typeTemplate"> | |
| 784 <span> | |
| 785 <a href="types.html#type-ChromeSetting">ChromeSetting</a
> | |
| 786 </span> | |
| 787 <span style="display: none; "> | |
| 788 <span> | |
| 789 array of <span><span></span></span> | |
| 790 </span> | |
| 791 <span>paramType</span> | |
| 792 <span></span> | |
| 793 </span> | |
| 794 </span> | |
| 795 ) | |
| 796 </div> | |
| 797 | |
| 798 </em> | |
| 799 </dt> | |
| 800 <dd class="todo" style="display: none; "> | |
| 801 Undocumented. | |
| 802 </dd> | |
| 803 <dd>If enabled, Chrome automatically sends usage statistics and crash
reports to Google. This preference's value is a boolean, defaulting to <code>fal
se</code>.</dd> | |
| 804 <dd style="display: none; "> | |
| 805 This parameter was added in version | |
| 806 <b><span></span></b>. | |
| 807 You must omit this parameter in earlier versions, | |
| 808 and you may omit it in any version. If you require this | |
| 809 parameter, the manifest key | |
| 810 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 811 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 812 </dd> | |
| 813 | |
| 814 <!-- OBJECT PROPERTIES --> | |
| 815 <dd style="display: none; "> | |
| 816 <dl> | |
| 817 <div> | |
| 818 <div> | |
| 819 </div> | |
| 820 </div> | |
| 821 </dl> | |
| 822 </dd> | |
| 823 | |
| 824 <!-- OBJECT METHODS --> | |
| 825 <dd style="display: none; "> | |
| 826 <div></div> | |
| 827 </dd> | |
| 828 | |
| 829 <!-- OBJECT EVENT FIELDS --> | |
| 830 <dd style="display: none; "> | |
| 831 <div></div> | |
| 832 </dd> | |
| 833 | |
| 834 <!-- FUNCTION PARAMETERS --> | |
| 835 <dd style="display: none; "> | |
| 836 <div></div> | |
| 837 </dd> | |
| 838 | |
| 839 </div> | |
| 840 </div><div> | |
| 841 <div> | |
| 842 <dt> | |
| 843 <var>safeBrowsingEnabled</var> | 862 <var>safeBrowsingEnabled</var> |
| 844 <em> | 863 <em> |
| 845 | 864 |
| 846 <!-- TYPE --> | 865 <!-- TYPE --> |
| 847 <div style="display:inline"> | 866 <div style="display:inline"> |
| 848 ( | 867 ( |
| 849 <span class="optional" style="display: none; ">optional</spa
n> | 868 <span class="optional" style="display: none; ">optional</spa
n> |
| 850 <span class="enum" style="display: none; ">enumerated</span> | 869 <span class="enum" style="display: none; ">enumerated</span> |
| 851 <span id="typeTemplate"> | 870 <span id="typeTemplate"> |
| 852 <span> | 871 <span> |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 <dd style="display: none; "> | 1078 <dd style="display: none; "> |
| 1060 <div></div> | 1079 <div></div> |
| 1061 </dd> | 1080 </dd> |
| 1062 | 1081 |
| 1063 </div> | 1082 </div> |
| 1064 </div><div> | 1083 </div><div> |
| 1065 <a name="property-websites"></a> | 1084 <a name="property-websites"></a> |
| 1066 <h4>websites</h4> | 1085 <h4>websites</h4> |
| 1067 <div class="summary"> | 1086 <div class="summary"> |
| 1068 <!-- Note: intentionally longer 80 columns --> | 1087 <!-- Note: intentionally longer 80 columns --> |
| 1069 <span>chrome.experimental.privacy.</span><span>websites</span> | 1088 <span>chrome.privacy.</span><span>websites</span> |
| 1070 </div> | 1089 </div> |
| 1071 <div> | 1090 <div> |
| 1072 <dt> | 1091 <dt> |
| 1073 <var>websites</var> | 1092 <var>websites</var> |
| 1074 <em> | 1093 <em> |
| 1075 | 1094 |
| 1076 <!-- TYPE --> | 1095 <!-- TYPE --> |
| 1077 <div style="display:inline"> | 1096 <div style="display:inline"> |
| 1078 ( | 1097 ( |
| 1079 <span class="optional" style="display: none; ">optional</spa
n> | 1098 <span class="optional" style="display: none; ">optional</spa
n> |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 _uff=0; | 1542 _uff=0; |
| 1524 urchinTracker(); | 1543 urchinTracker(); |
| 1525 } | 1544 } |
| 1526 catch(e) {/* urchinTracker not available. */} | 1545 catch(e) {/* urchinTracker not available. */} |
| 1527 </script> | 1546 </script> |
| 1528 <!-- end analytics --> | 1547 <!-- end analytics --> |
| 1529 </div> | 1548 </div> |
| 1530 </div> <!-- /gc-footer --> | 1549 </div> <!-- /gc-footer --> |
| 1531 </div> <!-- /gc-container --> | 1550 </div> <!-- /gc-container --> |
| 1532 </body></html> | 1551 </body></html> |
| OLD | NEW |