| 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 <title>chrome.preferences - Google Chrome Extensions - Google Code</title></he
ad> | 19 <title>Preferences - Google Chrome 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 </ul> | 244 </ul> |
| 245 </li> | 245 </li> |
| 246 </ul> | 246 </ul> |
| 247 </div> | 247 </div> |
| 248 <script> | 248 <script> |
| 249 initToggles(); | 249 initToggles(); |
| 250 </script> | 250 </script> |
| 251 | 251 |
| 252 <div class="g-unit" id="gc-pagecontent"> | 252 <div class="g-unit" id="gc-pagecontent"> |
| 253 <div id="pageTitle"> | 253 <div id="pageTitle"> |
| 254 <h1 class="page_title">chrome.preferences</h1> | 254 <h1 class="page_title">Preferences</h1> |
| 255 </div> | 255 </div> |
| 256 <!-- TABLE OF CONTENTS --> | 256 <!-- TABLE OF CONTENTS --> |
| 257 <div id="toc"> | 257 <div id="toc"> |
| 258 <h2>Contents</h2> | 258 <h2>Contents</h2> |
| 259 <ol> | 259 <ol> |
| 260 <li style="display: none; "> | 260 <li> |
| 261 <a>h2Name</a> | 261 <a href="#description">Functions</a> |
| 262 <ol> | 262 <ol> |
| 263 <li> | 263 <li style="display: none; "> |
| 264 <a>h3Name</a> | 264 <a>h3Name</a> |
| 265 </li> | 265 </li> |
| 266 </ol> | 266 </ol> |
| 267 </li><li> |
| 268 <a href="#lifecycle">Life cycle of preferences</a> |
| 269 <ol> |
| 270 <li style="display: none; "> |
| 271 <a>h3Name</a> |
| 272 </li> |
| 273 </ol> |
| 274 </li><li> |
| 275 <a href="#precedence">Precedence</a> |
| 276 <ol> |
| 277 <li style="display: none; "> |
| 278 <a>h3Name</a> |
| 279 </li> |
| 280 </ol> |
| 267 </li> | 281 </li> |
| 268 <li> | 282 <li> |
| 269 <a href="#apiReference">API reference: chrome.preferences</a> | 283 <a href="#apiReference">API reference: chrome.preferences</a> |
| 270 <ol> | 284 <ol> |
| 271 <li style="display: none; "> | 285 <li style="display: none; "> |
| 272 <a href="#properties">Properties</a> | 286 <a href="#properties">Properties</a> |
| 273 <ol> | 287 <ol> |
| 274 <li> | 288 <li> |
| 275 <a href="#property-anchor">propertyName</a> | 289 <a href="#property-anchor">propertyName</a> |
| 276 </li> | 290 </li> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 305 </ol> | 319 </ol> |
| 306 </div> | 320 </div> |
| 307 <!-- /TABLE OF CONTENTS --> | 321 <!-- /TABLE OF CONTENTS --> |
| 308 | 322 |
| 309 <!-- Standard content lead-in for experimental API pages --> | 323 <!-- Standard content lead-in for experimental API pages --> |
| 310 <p id="classSummary" style="display: none; "> | 324 <p id="classSummary" style="display: none; "> |
| 311 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. | 325 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. |
| 312 </p> | 326 </p> |
| 313 | 327 |
| 314 <!-- STATIC CONTENT PLACEHOLDER --> | 328 <!-- STATIC CONTENT PLACEHOLDER --> |
| 315 <div id="static"></div> | 329 <div id="static"><div id="pageData-name" class="pageData">Preferences</d
iv> |
| 330 |
| 331 <!-- BEGIN AUTHORED CONTENT --> |
| 332 <p id="classSummary"> |
| 333 The <code>chrome.preferences</code> module contains a prototype for giving other |
| 334 modules access to manage Chrome's preferences. This prototype is used for |
| 335 example for <a href="proxy.html#property-settings"><code>chrome.proxy.settings</
code></a>. |
| 336 </p> |
| 337 |
| 338 <h2 id="description">Functions</h2> |
| 339 |
| 340 <p> |
| 341 The preferences API provides a commen set of functions |
| 342 (<code>getEffective()</code>, <code>set()</code>, and <code>clear()</code>) as |
| 343 well as an event publisher (<code>onChangeEffective</code>) for various |
| 344 preferences in Chrome. The <a href="proxy.html#overview-examples">proxy settings |
| 345 examples</a> demonstrate how these functions are intended to be used. |
| 346 </p> |
| 347 |
| 348 <h2 id="lifecycle">Life cycle of preferences</h2> |
| 349 |
| 350 <p> |
| 351 The life cycle of preferences depends on whether they are set for regular or |
| 352 incognito profiles. Currently, preferences can only be set for regular profiles. |
| 353 </p> |
| 354 |
| 355 <p> |
| 356 Preferences for <em>regular profiles</em> are persisted to disk. Once set, they |
| 357 remain in place until they are cleared by the governing extension, or the |
| 358 governing extension is disabled or uninstalled. |
| 359 </p> |
| 360 |
| 361 <h2 id="precedence">Precedence</h2> |
| 362 |
| 363 <p> |
| 364 Chrome manages preferences on different layers. The following list describes the |
| 365 layers that may influence the effective preferences, in increasing order of |
| 366 precedence. |
| 367 </p><ol> |
| 368 <li>System preferences provided by the operating system</li> |
| 369 <li>Command line parameters</li> |
| 370 <li>Preferences set by extensions</li> |
| 371 <li>Policies</li> |
| 372 </ol> |
| 373 <p></p> |
| 374 |
| 375 <p> |
| 376 As the list implies, policies might overrule any changes that you specify with |
| 377 your extension. |
| 378 </p> |
| 379 |
| 380 <!-- |
| 381 <p> |
| 382 As discussed above, Chrome allows using different preferences for regular |
| 383 windows and incognito windows. The following example illustrates the behavior. |
| 384 Assume that no policy overrides the preferences and that an extension can set |
| 385 preferences for regular windows <b>(R)</b> and preferences for incognito windows |
| 386 <b>(I)</b>. |
| 387 </p> |
| 388 |
| 389 <p> |
| 390 <ul> |
| 391 <li>If only <b>(R)</b> is set, these preferences are effective for both |
| 392 regular and incognito windows.</li> |
| 393 <li>If only <b>(I)</b> is set, these preferences are effective for only |
| 394 incognito windows. Regular windows use the preferences determined by the lower |
| 395 layers (command-line options and system settings).</li> |
| 396 <li>If both <b>(R)</b> and <b>(I)</b> are set, the respective preferences are |
| 397 used for regular and incognito windows.</li> |
| 398 </ul> |
| 399 </p> |
| 400 --> |
| 401 |
| 402 <p> |
| 403 If two extensions want to set the same preference to different values, the |
| 404 extension installed last takes precedence over the other extensions. |
| 405 <!-- If the |
| 406 extension installed last sets only <b>(I)</b>, the preference of regular windows |
| 407 can be defined by previously installed extensions. --> |
| 408 </p> |
| 409 |
| 410 <p> |
| 411 The <em>effective</em> preference value is the setting that results from |
| 412 considering the preference rules. It is used by Chrome. |
| 413 </p><p> |
| 414 |
| 415 <!-- END AUTHORED CONTENT --> |
| 416 </p></div> |
| 316 | 417 |
| 317 <!-- API PAGE --> | 418 <!-- API PAGE --> |
| 318 <div class="apiPage"> | 419 <div class="apiPage"> |
| 319 <a name="apiReference"></a> | 420 <a name="apiReference"></a> |
| 320 <h2>API reference: chrome.preferences</h2> | 421 <h2>API reference: chrome.preferences</h2> |
| 321 | 422 |
| 322 <!-- PROPERTIES --> | 423 <!-- PROPERTIES --> |
| 323 <div class="apiGroup" style="display: none; "> | 424 <div class="apiGroup" style="display: none; "> |
| 324 <a name="properties"></a> | 425 <a name="properties"></a> |
| 325 <h3 id="properties">Properties</h3> | 426 <h3 id="properties">Properties</h3> |
| (...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 _uff=0; | 2137 _uff=0; |
| 2037 urchinTracker(); | 2138 urchinTracker(); |
| 2038 } | 2139 } |
| 2039 catch(e) {/* urchinTracker not available. */} | 2140 catch(e) {/* urchinTracker not available. */} |
| 2040 </script> | 2141 </script> |
| 2041 <!-- end analytics --> | 2142 <!-- end analytics --> |
| 2042 </div> | 2143 </div> |
| 2043 </div> <!-- /gc-footer --> | 2144 </div> <!-- /gc-footer --> |
| 2044 </div> <!-- /gc-container --> | 2145 </div> <!-- /gc-container --> |
| 2045 </body></html> | 2146 </body></html> |
| OLD | NEW |