summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-06-09 11:47:42 +0100
committerKristian Monsen <kristianm@google.com>2011-06-29 14:33:03 +0100
commitdc0f95d653279beabeb9817299e2902918ba123e (patch)
tree32eb121cd532053a5b9cb0c390331349af8d6baa /chrome/common
parentba160cd4054d13d0cb0b1b46e61c3bed67095811 (diff)
downloadexternal_chromium-dc0f95d653279beabeb9817299e2902918ba123e.zip
external_chromium-dc0f95d653279beabeb9817299e2902918ba123e.tar.gz
external_chromium-dc0f95d653279beabeb9817299e2902918ba123e.tar.bz2
Merge Chromium at r11.0.696.0: Initial merge by git
Change-Id: I273dde2843af0839dfc08b419bb443fbd449532d
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/auto_start_linux.cc88
-rw-r--r--chrome/common/auto_start_linux.h34
-rw-r--r--chrome/common/autofill_messages.cc1
-rw-r--r--chrome/common/autofill_messages.h2
-rw-r--r--chrome/common/automation_constants.h6
-rw-r--r--chrome/common/automation_messages.cc23
-rw-r--r--chrome/common/automation_messages.h5
-rw-r--r--chrome/common/automation_messages_internal.h14
-rw-r--r--chrome/common/child_process.cc112
-rw-r--r--chrome/common/child_process.h72
-rw-r--r--chrome/common/child_process_host.cc12
-rw-r--r--chrome/common/child_thread.cc207
-rw-r--r--chrome/common/child_thread.h131
-rw-r--r--chrome/common/chrome_constants.cc2
-rw-r--r--chrome/common/chrome_constants.h8
-rw-r--r--chrome/common/chrome_paths.cc38
-rw-r--r--chrome/common/chrome_paths_linux.cc32
-rw-r--r--chrome/common/chrome_switches.cc293
-rw-r--r--chrome/common/chrome_switches.h103
-rw-r--r--chrome/common/common_message_generator.h13
-rw-r--r--chrome/common/common_param_traits.cc248
-rw-r--r--chrome/common/common_param_traits.h52
-rw-r--r--chrome/common/common_param_traits_unittest.cc54
-rw-r--r--chrome/common/content_settings_types.h1
-rw-r--r--chrome/common/database_messages.cc8
-rw-r--r--chrome/common/database_messages.h5
-rw-r--r--chrome/common/database_util.cc2
-rw-r--r--chrome/common/dom_storage_messages.cc2
-rw-r--r--chrome/common/extensions/api/extension_api.json248
-rw-r--r--chrome/common/extensions/docs/background_pages.html8
-rw-r--r--chrome/common/extensions/docs/cookies.html493
-rw-r--r--chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.pngbin647 -> 600 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.pngbin2809 -> 2775 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.pngbin2809 -> 2775 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.pngbin3622 -> 1003 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/contextMenus/basic.zipbin3552 -> 3552 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/cookies.zipbin9295 -> 9239 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/cookies/cookie.pngbin719 -> 663 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.pngbin3466 -> 2192 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.pngbin713 -> 591 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.pngbin309 -> 272 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.pngbin1347 -> 879 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.pngbin8078 -> 7840 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.pngbin708 -> 703 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.pngbin657 -> 592 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.pngbin2621 -> 2533 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/messaging/timer/clock.pngbin383 -> 313 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/notifications.zipbin49989 -> 49928 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/notifications/128.pngbin22858 -> 22857 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/notifications/16.pngbin3592 -> 3534 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/notifications/48.pngbin7366 -> 7365 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/notifications/64.pngbin9899 -> 9898 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.pngbin8449 -> 8181 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.pngbin47675 -> 13252 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.pngbin8078 -> 7840 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.pngbin657 -> 592 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.pngbin2621 -> 2533 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.pngbin10219 -> 9924 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.pngbin809 -> 715 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.pngbin2366 -> 1891 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.pngbin2809 -> 2775 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.pngbin2809 -> 2799 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.pngbin1257 -> 1255 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.pngbin6583 -> 6072 bytes
-rw-r--r--chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.pngbin2359 -> 2136 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/app_launcher.zipbin24932 -> 22452 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.pngbin5563 -> 3817 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/app_launcher/icon.pngbin5397 -> 4663 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/benchmark.zipbin258732 -> 258732 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/buildbot.zipbin28591 -> 27622 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/buildbot/chromium.pngbin1736 -> 1699 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/buildbot/icon.pngbin17504 -> 16572 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/calendar.zipbin40571 -> 40571 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/chrome_search.zipbin5610 -> 5592 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/chrome_search/background.html9
-rw-r--r--chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json2
-rw-r--r--chrome/common/extensions/docs/examples/extensions/email_this_page.zipbin11477 -> 10188 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.pngbin572 -> 499 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.pngbin4696 -> 3480 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/fx.zipbin37899 -> 37897 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/fx/icon.pngbin21948 -> 21946 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gdocs.zipbin164296 -> 164294 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.pngbin958 -> 956 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail.zipbin57687 -> 55582 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.pngbin3484 -> 3482 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.pngbin3412 -> 3360 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/icon_128.pngbin7911 -> 5860 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/imageinfo.zipbin46603 -> 45362 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.pngbin2040 -> 1387 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.pngbin492 -> 416 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.pngbin591 -> 486 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.pngbin1259 -> 852 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/mappy.zipbin21191 -> 20656 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/mappy/icon.pngbin15702 -> 15198 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/mappy/marker.pngbin770 -> 739 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/maps_app/128.pngbin11999 -> 11998 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/maps_app/24.pngbin3883 -> 3881 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news.zipbin65941 -> 63981 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news/images/buzz.pngbin892 -> 845 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.pngbin1030 -> 989 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news/images/fb.pngbin428 -> 361 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news/images/news_action.pngbin1109 -> 1082 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news/images/news_icon.pngbin10782 -> 9056 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news/images/twitter.pngbin588 -> 536 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_a11y.zipbin25302 -> 23549 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.pngbin1109 -> 1082 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.pngbin10782 -> 9056 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_i18n.zipbin27729 -> 25976 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.pngbin1109 -> 1082 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.pngbin10782 -> 9056 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/oauth_contacts.zipbin71953 -> 68325 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.pngbin10224 -> 7220 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.pngbin1596 -> 1563 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.pngbin1595 -> 1568 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.pngbin1443 -> 1273 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.pngbin2643 -> 2249 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave.zipbin98799 -> 96696 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave/128.pngbin14567 -> 14565 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave/16.pngbin3043 -> 2926 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave/48.pngbin5909 -> 5907 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave/64.pngbin7402 -> 7401 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave/authorized.pngbin3043 -> 2926 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave/logo.pngbin5122 -> 3376 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/wave/unauthorized.pngbin3097 -> 2979 bytes
-rw-r--r--chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.pngbin3466 -> 2192 bytes
-rw-r--r--chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.pngbin1347 -> 879 bytes
-rw-r--r--chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.pngbin7960 -> 7346 bytes
-rw-r--r--chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.pngbin632 -> 454 bytes
-rw-r--r--chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.pngbin3293 -> 2942 bytes
-rw-r--r--chrome/common/extensions/docs/examples/tutorials/getstarted/icon.pngbin3789 -> 3675 bytes
-rw-r--r--chrome/common/extensions/docs/experimental.contentSettings.misc.html574
-rw-r--r--chrome/common/extensions/docs/experimental.extension.html1638
-rw-r--r--chrome/common/extensions/docs/experimental.html25
-rw-r--r--chrome/common/extensions/docs/experimental.proxy.html866
-rw-r--r--chrome/common/extensions/docs/experimental.webNavigation.html10
-rw-r--r--chrome/common/extensions/docs/faq.html312
-rw-r--r--chrome/common/extensions/docs/images/a11y/focus-outline-2.pngbin3444 -> 2778 bytes
-rw-r--r--chrome/common/extensions/docs/images/a11y/focus-outline.pngbin5247 -> 3963 bytes
-rw-r--r--chrome/common/extensions/docs/images/a11y/standard-html-controls.pngbin18670 -> 15646 bytes
-rw-r--r--chrome/common/extensions/docs/images/bookmarks.pngbin19270 -> 17771 bytes
-rw-r--r--chrome/common/extensions/docs/images/browser-action.pngbin22227 -> 20753 bytes
-rw-r--r--chrome/common/extensions/docs/images/google-mail-checker-capture.pngbin13714 -> 10919 bytes
-rw-r--r--chrome/common/extensions/docs/images/hello-world-small.pngbin51228 -> 50444 bytes
-rw-r--r--chrome/common/extensions/docs/images/hello-world.pngbin123083 -> 121632 bytes
-rw-r--r--chrome/common/extensions/docs/images/icon.pngbin41989 -> 39487 bytes
-rw-r--r--chrome/common/extensions/docs/images/index/flashapp.pngbin95859 -> 82340 bytes
-rw-r--r--chrome/common/extensions/docs/images/index/gmail-small.pngbin2594 -> 2383 bytes
-rw-r--r--chrome/common/extensions/docs/images/index/gmail.pngbin6091 -> 4548 bytes
-rw-r--r--chrome/common/extensions/docs/images/index/html5app.pngbin47166 -> 40439 bytes
-rw-r--r--chrome/common/extensions/docs/images/index/news.pngbin8039 -> 7300 bytes
-rw-r--r--chrome/common/extensions/docs/images/index/rss.pngbin3264 -> 2491 bytes
-rw-r--r--chrome/common/extensions/docs/images/infobar.pngbin88579 -> 88457 bytes
-rw-r--r--chrome/common/extensions/docs/images/intermediate/bookmarks.pngbin41959 -> 37606 bytes
-rw-r--r--chrome/common/extensions/docs/images/intermediate/hello-world.pngbin248292 -> 245725 bytes
-rw-r--r--chrome/common/extensions/docs/images/intermediate/news.pngbin37042 -> 30165 bytes
-rw-r--r--chrome/common/extensions/docs/images/intermediate/tabs.pngbin26159 -> 23877 bytes
-rw-r--r--chrome/common/extensions/docs/images/intermediate/windows.pngbin40185 -> 36993 bytes
-rw-r--r--chrome/common/extensions/docs/images/load_after.pngbin46183 -> 42405 bytes
-rw-r--r--chrome/common/extensions/docs/images/load_after_small.pngbin19738 -> 19365 bytes
-rw-r--r--chrome/common/extensions/docs/images/notification-linux.pngbin15439 -> 14624 bytes
-rw-r--r--chrome/common/extensions/docs/images/notification-mac.pngbin13590 -> 12704 bytes
-rw-r--r--chrome/common/extensions/docs/images/ntp-blank.pngbin7779 -> 6597 bytes
-rw-r--r--chrome/common/extensions/docs/images/ntp-default.pngbin21154 -> 19374 bytes
-rw-r--r--chrome/common/extensions/docs/images/omnibox.pngbin47242 -> 41971 bytes
-rw-r--r--chrome/common/extensions/docs/images/page-action.pngbin9504 -> 9093 bytes
-rw-r--r--chrome/common/extensions/docs/images/perms-hw1.pngbin20247 -> 17074 bytes
-rw-r--r--chrome/common/extensions/docs/images/perms-hw2-disabled.pngbin21881 -> 14196 bytes
-rw-r--r--chrome/common/extensions/docs/images/perms-hw2.pngbin22511 -> 18628 bytes
-rw-r--r--chrome/common/extensions/docs/images/sample-default-icon.pngbin5321 -> 3356 bytes
-rw-r--r--chrome/common/extensions/docs/images/subscribe-cap1.pngbin7332 -> 6545 bytes
-rw-r--r--chrome/common/extensions/docs/images/subscribe-cap2.pngbin17455 -> 14952 bytes
-rw-r--r--chrome/common/extensions/docs/images/tabs.pngbin11141 -> 10387 bytes
-rw-r--r--chrome/common/extensions/docs/images/toggle_sprite.pngbin417 -> 301 bytes
-rw-r--r--chrome/common/extensions/docs/images/tut_analytics/screenshot01.pngbin20155 -> 17697 bytes
-rw-r--r--chrome/common/extensions/docs/images/tut_analytics/screenshot02.pngbin16343 -> 14125 bytes
-rw-r--r--chrome/common/extensions/docs/images/tut_analytics/screenshot03.pngbin75593 -> 60725 bytes
-rw-r--r--chrome/common/extensions/docs/images/tut_analytics/screenshot04.pngbin105505 -> 94761 bytes
-rw-r--r--chrome/common/extensions/docs/images/windows.pngbin16204 -> 15099 bytes
-rw-r--r--chrome/common/extensions/docs/management.html70
-rw-r--r--chrome/common/extensions/docs/manifest.html33
-rw-r--r--chrome/common/extensions/docs/match_patterns.html9
-rw-r--r--chrome/common/extensions/docs/messaging.html2
-rw-r--r--chrome/common/extensions/docs/samples.html840
-rw-r--r--chrome/common/extensions/docs/samples.json546
-rw-r--r--chrome/common/extensions/docs/static/background_pages.html8
-rw-r--r--chrome/common/extensions/docs/static/experimental.html23
-rw-r--r--chrome/common/extensions/docs/static/experimental.proxy.html262
-rw-r--r--chrome/common/extensions/docs/static/faq.html314
-rw-r--r--chrome/common/extensions/docs/static/manifest.html33
-rw-r--r--chrome/common/extensions/docs/static/match_patterns.html9
-rw-r--r--chrome/common/extensions/docs/static/messaging.html2
-rw-r--r--chrome/common/extensions/docs/static/whats_new.html31
-rw-r--r--chrome/common/extensions/docs/whats_new.html31
-rw-r--r--chrome/common/extensions/extension.cc175
-rw-r--r--chrome/common/extensions/extension.h45
-rw-r--r--chrome/common/extensions/extension_constants.cc12
-rw-r--r--chrome/common/extensions/extension_constants.h64
-rw-r--r--chrome/common/extensions/extension_file_util.cc12
-rw-r--r--chrome/common/extensions/extension_file_util.h6
-rw-r--r--chrome/common/extensions/extension_file_util_unittest.cc10
-rw-r--r--chrome/common/extensions/extension_icon_set.cc2
-rw-r--r--chrome/common/extensions/extension_l10n_util.cc20
-rw-r--r--chrome/common/extensions/extension_localization_peer.cc8
-rw-r--r--chrome/common/extensions/extension_localization_peer.h3
-rw-r--r--chrome/common/extensions/extension_localization_peer_unittest.cc15
-rw-r--r--chrome/common/extensions/extension_manifests_unittest.cc141
-rw-r--r--chrome/common/extensions/extension_set_unittest.cc3
-rw-r--r--chrome/common/extensions/extension_unittest.cc94
-rw-r--r--chrome/common/extensions/extension_unpacker.cc26
-rw-r--r--chrome/common/extensions/update_manifest.cc4
-rw-r--r--chrome/common/extensions/url_pattern.cc76
-rw-r--r--chrome/common/extensions/url_pattern.h35
-rw-r--r--chrome/common/extensions/url_pattern_unittest.cc81
-rw-r--r--chrome/common/extensions/user_script.cc21
-rw-r--r--chrome/common/extensions/user_script.h6
-rw-r--r--chrome/common/extensions/user_script_unittest.cc12
-rw-r--r--chrome/common/file_system/file_system_dispatcher.cc277
-rw-r--r--chrome/common/file_system/file_system_dispatcher.h102
-rw-r--r--chrome/common/file_system/file_system_dispatcher_dummy.cc21
-rw-r--r--chrome/common/file_system/webfilesystem_callback_dispatcher.cc72
-rw-r--r--chrome/common/file_system/webfilesystem_callback_dispatcher.h37
-rw-r--r--chrome/common/file_system/webfilesystem_impl.cc116
-rw-r--r--chrome/common/file_system/webfilesystem_impl.h69
-rw-r--r--chrome/common/file_system/webfilewriter_impl.cc79
-rw-r--r--chrome/common/file_system/webfilewriter_impl.h34
-rw-r--r--chrome/common/file_utilities_messages.cc8
-rw-r--r--chrome/common/file_utilities_messages.h6
-rw-r--r--chrome/common/gpu_feature_flags.cc3
-rw-r--r--chrome/common/gpu_feature_flags.h6
-rw-r--r--chrome/common/gpu_feature_flags_unittest.cc5
-rw-r--r--chrome/common/gpu_info.cc27
-rw-r--r--chrome/common/gpu_info.h16
-rw-r--r--chrome/common/gpu_info_unittest.cc1
-rw-r--r--chrome/common/gpu_messages.cc8
-rw-r--r--chrome/common/gpu_messages_internal.h21
-rw-r--r--chrome/common/gpu_messages_unittest.cc6
-rw-r--r--chrome/common/gpu_plugin.cc36
-rw-r--r--chrome/common/gpu_plugin.h16
-rw-r--r--chrome/common/indexed_db_messages.h32
-rw-r--r--chrome/common/json_pref_store.cc4
-rw-r--r--chrome/common/json_pref_store.h2
-rw-r--r--chrome/common/logging_chrome.cc44
-rw-r--r--chrome/common/message_router.cc52
-rw-r--r--chrome/common/message_router.h63
-rw-r--r--chrome/common/metrics_helpers.cc12
-rw-r--r--chrome/common/mime_registry_messages.cc8
-rw-r--r--chrome/common/mime_registry_messages.h6
-rw-r--r--chrome/common/net/PRESUBMIT.py13
-rw-r--r--chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc33
-rw-r--r--chrome/common/net/gaia/gaia_auth_fetcher_unittest.h27
-rw-r--r--chrome/common/net/socket_stream.h15
-rw-r--r--chrome/common/net/test_url_fetcher_factory.cc13
-rw-r--r--chrome/common/net/test_url_fetcher_factory.h11
-rw-r--r--chrome/common/net/url_fetcher.cc32
-rw-r--r--chrome/common/net/url_fetcher.h7
-rw-r--r--chrome/common/notification_details.cc18
-rw-r--r--chrome/common/notification_details.h49
-rw-r--r--chrome/common/notification_observer.h17
-rw-r--r--chrome/common/notification_observer_mock.cc12
-rw-r--r--chrome/common/notification_observer_mock.h26
-rw-r--r--chrome/common/notification_registrar.cc115
-rw-r--r--chrome/common/notification_registrar.h58
-rw-r--r--chrome/common/notification_service.cc151
-rw-r--r--chrome/common/notification_service.h100
-rw-r--r--chrome/common/notification_service_unittest.cc164
-rw-r--r--chrome/common/notification_source.cc17
-rw-r--r--chrome/common/notification_source.h47
-rw-r--r--chrome/common/notification_type.h1328
-rw-r--r--chrome/common/page_transition_types.cc17
-rw-r--r--chrome/common/page_transition_types.h3
-rw-r--r--chrome/common/pepper_file_messages.cc32
-rw-r--r--chrome/common/pepper_file_messages.h27
-rw-r--r--chrome/common/pepper_messages.cc2
-rw-r--r--chrome/common/pepper_plugin_registry.cc73
-rw-r--r--chrome/common/pepper_plugin_registry.h19
-rw-r--r--chrome/common/persistent_pref_store.h7
-rw-r--r--chrome/common/plugin_messages.cc1
-rw-r--r--chrome/common/plugin_messages_internal.h23
-rw-r--r--chrome/common/pref_names.cc81
-rw-r--r--chrome/common/pref_names.h34
-rw-r--r--chrome/common/render_messages.cc279
-rw-r--r--chrome/common/render_messages.h112
-rw-r--r--chrome/common/render_messages_internal.h327
-rw-r--r--chrome/common/render_messages_params.cc242
-rw-r--r--chrome/common/render_messages_params.h144
-rw-r--r--chrome/common/resource_dispatcher.cc623
-rw-r--r--chrome/common/resource_dispatcher.h152
-rw-r--r--chrome/common/resource_dispatcher_dummy.cc35
-rw-r--r--chrome/common/resource_dispatcher_unittest.cc330
-rw-r--r--chrome/common/resource_response.cc19
-rw-r--r--chrome/common/resource_response.h55
-rw-r--r--chrome/common/safebrowsing_messages.h24
-rw-r--r--chrome/common/sandbox_init_wrapper_win.cc18
-rw-r--r--chrome/common/sandbox_mac.mm17
-rw-r--r--chrome/common/sandbox_mac_unittest_helper.h4
-rw-r--r--chrome/common/sandbox_mac_unittest_helper.mm8
-rw-r--r--chrome/common/sandbox_policy.cc38
-rw-r--r--chrome/common/security_filter_peer.cc213
-rw-r--r--chrome/common/security_filter_peer.h125
-rw-r--r--chrome/common/service_process_util.cc63
-rw-r--r--chrome/common/service_process_util.h24
-rw-r--r--chrome/common/service_process_util_linux.cc97
-rw-r--r--chrome/common/service_process_util_mac.mm304
-rw-r--r--chrome/common/service_process_util_posix.cc172
-rw-r--r--chrome/common/service_process_util_posix.h77
-rw-r--r--chrome/common/service_process_util_unittest.cc71
-rw-r--r--chrome/common/service_process_util_win.cc55
-rw-r--r--chrome/common/socket_stream_dispatcher.cc217
-rw-r--r--chrome/common/socket_stream_dispatcher.h48
-rw-r--r--chrome/common/socket_stream_dispatcher_dummy.cc18
-rw-r--r--chrome/common/speech_input_messages.cc83
-rw-r--r--chrome/common/speech_input_messages.h62
-rw-r--r--chrome/common/unix_domain_socket_posix.cc11
-rw-r--r--chrome/common/url_constants.cc22
-rw-r--r--chrome/common/url_constants.h15
-rw-r--r--chrome/common/utility_messages.cc12
-rw-r--r--chrome/common/utility_messages.h233
-rw-r--r--chrome/common/utility_messages_internal.h150
-rw-r--r--chrome/common/web_apps_unittest.cc2
-rw-r--r--chrome/common/webkit_param_traits.cc41
-rw-r--r--chrome/common/webkit_param_traits.h9
-rw-r--r--chrome/common/webmessageportchannel_impl.cc4
-rw-r--r--chrome/common/win_safe_util.cc8
-rw-r--r--chrome/common/worker_messages.cc117
-rw-r--r--chrome/common/worker_messages.h197
-rw-r--r--chrome/common/worker_messages_internal.h129
-rw-r--r--chrome/common/zip_unittest.cc2
335 files changed, 7914 insertions, 9692 deletions
diff --git a/chrome/common/auto_start_linux.cc b/chrome/common/auto_start_linux.cc
new file mode 100644
index 0000000..099cb5e
--- /dev/null
+++ b/chrome/common/auto_start_linux.cc
@@ -0,0 +1,88 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/auto_start_linux.h"
+
+#include "base/environment.h"
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/logging.h"
+#include "base/nix/xdg_util.h"
+#include "base/string_tokenizer.h"
+
+namespace {
+
+const FilePath::CharType kAutostart[] = "autostart";
+const FilePath::CharType kConfig[] = ".config";
+const char kXdgConfigHome[] = "XDG_CONFIG_HOME";
+
+FilePath GetAutostartDirectory(base::Environment* environment) {
+ FilePath result =
+ base::nix::GetXDGDirectory(environment, kXdgConfigHome, kConfig);
+ result = result.Append(kAutostart);
+ return result;
+}
+
+} // namespace
+
+bool AutoStart::AddApplication(const std::string& autostart_filename,
+ const std::string& application_name,
+ const std::string& command_line,
+ bool is_terminal_app) {
+ scoped_ptr<base::Environment> environment(base::Environment::Create());
+ FilePath autostart_directory = GetAutostartDirectory(environment.get());
+ if (!file_util::DirectoryExists(autostart_directory) &&
+ !file_util::CreateDirectory(autostart_directory)) {
+ return false;
+ }
+
+ FilePath autostart_file = autostart_directory.Append(autostart_filename);
+ std::string terminal = is_terminal_app ? "true" : "false";
+ std::string autostart_file_contents =
+ "[Desktop Entry]\n"
+ "Type=Application\n"
+ "Terminal=" + terminal + "\n"
+ "Exec=" + command_line + "\n"
+ "Name=" + application_name + "\n";
+ std::string::size_type content_length = autostart_file_contents.length();
+ if (file_util::WriteFile(autostart_file, autostart_file_contents.c_str(),
+ content_length) !=
+ static_cast<int>(content_length)) {
+ file_util::Delete(autostart_file, false);
+ return false;
+ }
+ return true;
+}
+
+bool AutoStart::Remove(const std::string& autostart_filename) {
+ scoped_ptr<base::Environment> environment(base::Environment::Create());
+ FilePath autostart_directory = GetAutostartDirectory(environment.get());
+ FilePath autostart_file = autostart_directory.Append(autostart_filename);
+ return file_util::Delete(autostart_file, false);
+}
+
+bool AutoStart::GetAutostartFileContents(
+ const std::string& autostart_filename, std::string* contents) {
+ scoped_ptr<base::Environment> environment(base::Environment::Create());
+ FilePath autostart_directory = GetAutostartDirectory(environment.get());
+ FilePath autostart_file = autostart_directory.Append(autostart_filename);
+ return file_util::ReadFileToString(autostart_file, contents);
+}
+
+bool AutoStart::GetAutostartFileValue(const std::string& autostart_filename,
+ const std::string& value_name,
+ std::string* value) {
+ std::string contents;
+ if (!GetAutostartFileContents(autostart_filename, &contents))
+ return false;
+ StringTokenizer tokenizer(contents, "\n");
+ std::string token = value_name + "=";
+ while (tokenizer.GetNext()) {
+ if (tokenizer.token().substr(0, token.length()) == token) {
+ *value = tokenizer.token().substr(token.length());
+ return true;
+ }
+ }
+ return false;
+}
diff --git a/chrome/common/auto_start_linux.h b/chrome/common/auto_start_linux.h
new file mode 100644
index 0000000..d6b1009
--- /dev/null
+++ b/chrome/common/auto_start_linux.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_AUTO_START_LINUX_H_
+#define CHROME_COMMON_AUTO_START_LINUX_H_
+#pragma once
+
+#include <string>
+
+#include "base/basictypes.h"
+
+class AutoStart {
+ public:
+ // Registers an application to autostart on user login. |is_terminal_app|
+ // specifies whether the app will run in a terminal window.
+ static bool AddApplication(const std::string& autostart_filename,
+ const std::string& application_name,
+ const std::string& command_line,
+ bool is_terminal_app);
+ // Removes an autostart file.
+ static bool Remove(const std::string& autostart_filename);
+ // Gets the entire contents of an autostart file.
+ static bool GetAutostartFileContents(const std::string& autostart_filename,
+ std::string* contents);
+ // Gets a specific value from an autostart file.
+ static bool GetAutostartFileValue(const std::string& autostart_filename,
+ const std::string& value_name,
+ std::string* value);
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(AutoStart);
+};
+
+#endif // CHROME_COMMON_AUTO_START_LINUX_H_
diff --git a/chrome/common/autofill_messages.cc b/chrome/common/autofill_messages.cc
index 80b43f3..1243f1f 100644
--- a/chrome/common/autofill_messages.cc
+++ b/chrome/common/autofill_messages.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/common/common_param_traits.h"
+#include "content/common/common_param_traits.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/password_form.h"
diff --git a/chrome/common/autofill_messages.h b/chrome/common/autofill_messages.h
index 4e2f9bc..dd1776f 100644
--- a/chrome/common/autofill_messages.h
+++ b/chrome/common/autofill_messages.h
@@ -75,7 +75,7 @@ IPC_MESSAGE_ROUTED1(AutoFillMsg_FillPasswordForm,
// AutoFill messages sent from the renderer to the browser.
// Notification that forms have been seen that are candidates for
-// filling/submitting by the AutoFillManager.
+// filling/submitting by the AutofillManager.
IPC_MESSAGE_ROUTED1(AutoFillHostMsg_FormsSeen,
std::vector<webkit_glue::FormData> /* forms */)
diff --git a/chrome/common/automation_constants.h b/chrome/common/automation_constants.h
index c4aa683..cddd589 100644
--- a/chrome/common/automation_constants.h
+++ b/chrome/common/automation_constants.h
@@ -44,6 +44,12 @@ enum KeyModifierMasks {
kMetaKeyMask = 1 << 3,
};
+enum MouseButton {
+ kLeftButton = 0,
+ kMiddleButton,
+ kRightButton,
+};
+
} // namespace automation
// Used by AutomationProxy, declared here so that other headers don't need
diff --git a/chrome/common/automation_messages.cc b/chrome/common/automation_messages.cc
index 8dcac0e..efa93a9 100644
--- a/chrome/common/automation_messages.cc
+++ b/chrome/common/automation_messages.cc
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "content/common/common_param_traits.h"
+
#define IPC_MESSAGE_IMPL
#include "chrome/common/automation_messages.h"
-
AutomationURLRequest::AutomationURLRequest()
: resource_type(0),
load_flags(0) {
@@ -35,18 +36,18 @@ AutomationURLResponse::AutomationURLResponse()
redirect_status(0) {
}
-AutomationURLResponse::AutomationURLResponse(const std::string& in_mime_type,
- const std::string& in_headers,
- int64 in_content_length,
- const base::Time& in_last_modified,
- const std::string& in_redirect_url,
- int in_redirect_status)
+AutomationURLResponse::AutomationURLResponse(
+ const std::string& in_mime_type, const std::string& in_headers,
+ int64 in_content_length, const base::Time& in_last_modified,
+ const std::string& in_redirect_url, int in_redirect_status,
+ const net::HostPortPair& host_socket_address)
: mime_type(in_mime_type),
headers(in_headers),
content_length(in_content_length),
last_modified(in_last_modified),
redirect_url(in_redirect_url),
- redirect_status(in_redirect_status) {
+ redirect_status(in_redirect_status),
+ socket_address(host_socket_address) {
}
@@ -445,6 +446,7 @@ void ParamTraits<AutomationURLResponse>::Write(Message* m,
WriteParam(m, p.last_modified);
WriteParam(m, p.redirect_url);
WriteParam(m, p.redirect_status);
+ WriteParam(m, p.socket_address);
}
// static
@@ -456,7 +458,8 @@ bool ParamTraits<AutomationURLResponse>::Read(const Message* m,
ReadParam(m, iter, &p->content_length) &&
ReadParam(m, iter, &p->last_modified) &&
ReadParam(m, iter, &p->redirect_url) &&
- ReadParam(m, iter, &p->redirect_status);
+ ReadParam(m, iter, &p->redirect_status) &&
+ ReadParam(m, iter, &p->socket_address);
}
// static
@@ -474,6 +477,8 @@ void ParamTraits<AutomationURLResponse>::Log(const param_type& p,
LogParam(p.redirect_url, l);
l->append(", ");
LogParam(p.redirect_status, l);
+ l->append(", ");
+ LogParam(p.socket_address, l);
l->append(")");
}
diff --git a/chrome/common/automation_messages.h b/chrome/common/automation_messages.h
index 8bc8153..14ede2a 100644
--- a/chrome/common/automation_messages.h
+++ b/chrome/common/automation_messages.h
@@ -14,6 +14,7 @@
#include "chrome/common/page_type.h"
#include "chrome/common/security_style.h"
#include "chrome/common/common_param_traits.h"
+#include "net/base/host_port_pair.h"
#include "net/base/upload_data.h"
#include "ui/gfx/rect.h"
@@ -41,7 +42,8 @@ struct AutomationURLResponse {
int64 content_length,
const base::Time& last_modified,
const std::string& redirect_url,
- int redirect_status);
+ int redirect_status,
+ const net::HostPortPair& host_socket_address);
~AutomationURLResponse();
std::string mime_type;
@@ -50,6 +52,7 @@ struct AutomationURLResponse {
base::Time last_modified;
std::string redirect_url;
int redirect_status;
+ net::HostPortPair socket_address;
};
struct ExternalTabSettings {
diff --git a/chrome/common/automation_messages_internal.h b/chrome/common/automation_messages_internal.h
index d6008e0..decc420 100644
--- a/chrome/common/automation_messages_internal.h
+++ b/chrome/common/automation_messages_internal.h
@@ -1441,12 +1441,18 @@ IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_CaptureEntirePageAsPNG,
// Notify the JavaScript engine in the render to change its parameters
// while performing stress testing.
-IPC_MESSAGE_ROUTED3(AutomationMsg_JavaScriptStressTestControl,
- int /* tab handle */,
- int /* command */,
- int /* type or run */)
+IPC_MESSAGE_CONTROL3(AutomationMsg_JavaScriptStressTestControl,
+ int /* tab handle */,
+ int /* command */,
+ int /* type or run */)
// This message posts a task to the PROCESS_LAUNCHER thread. Once processed
// the response is sent back. This is useful when you want to make sure all
// changes to the number of processes have completed.
IPC_SYNC_MESSAGE_CONTROL0_0(AutomationMsg_WaitForProcessLauncherThreadToGoIdle)
+
+// Gets a handle of the browser that owns the given tab.
+IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_GetParentBrowserOfTab,
+ int /* tab handle */,
+ int /* browser handle */,
+ bool /* success */)
diff --git a/chrome/common/child_process.cc b/chrome/common/child_process.cc
deleted file mode 100644
index e32bb1b..0000000
--- a/chrome/common/child_process.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/child_process.h"
-
-#if defined(OS_POSIX)
-#include <signal.h> // For SigUSR1Handler below.
-#endif
-
-#include "base/message_loop.h"
-#include "base/process_util.h"
-#include "base/string_number_conversions.h"
-#include "base/threading/thread.h"
-#include "base/utf_string_conversions.h"
-#include "chrome/common/child_thread.h"
-#include "grit/chromium_strings.h"
-
-#if defined(OS_POSIX)
-static void SigUSR1Handler(int signal) { }
-#endif
-
-ChildProcess* ChildProcess::child_process_;
-
-ChildProcess::ChildProcess()
- : ref_count_(0),
- shutdown_event_(true, false),
- io_thread_("Chrome_ChildIOThread") {
- DCHECK(!child_process_);
- child_process_ = this;
-
- io_thread_.StartWithOptions(base::Thread::Options(MessageLoop::TYPE_IO, 0));
-}
-
-ChildProcess::~ChildProcess() {
- DCHECK(child_process_ == this);
-
- // Signal this event before destroying the child process. That way all
- // background threads can cleanup.
- // For example, in the renderer the RenderThread instances will be able to
- // notice shutdown before the render process begins waiting for them to exit.
- shutdown_event_.Signal();
-
- // Kill the main thread object before nulling child_process_, since
- // destruction code might depend on it.
- main_thread_.reset();
-
- child_process_ = NULL;
-}
-
-ChildThread* ChildProcess::main_thread() {
- return main_thread_.get();
-}
-
-void ChildProcess::set_main_thread(ChildThread* thread) {
- main_thread_.reset(thread);
-}
-
-void ChildProcess::AddRefProcess() {
- DCHECK(!main_thread_.get() || // null in unittests.
- MessageLoop::current() == main_thread_->message_loop());
- ref_count_++;
-}
-
-void ChildProcess::ReleaseProcess() {
- DCHECK(!main_thread_.get() || // null in unittests.
- MessageLoop::current() == main_thread_->message_loop());
- DCHECK(ref_count_);
- DCHECK(child_process_);
- if (--ref_count_)
- return;
-
- if (main_thread_.get()) // null in unittests.
- main_thread_->OnProcessFinalRelease();
-}
-
-base::WaitableEvent* ChildProcess::GetShutDownEvent() {
- DCHECK(child_process_);
- return &child_process_->shutdown_event_;
-}
-
-void ChildProcess::WaitForDebugger(const std::wstring& label) {
-#if defined(OS_WIN)
-#if defined(GOOGLE_CHROME_BUILD)
- std::wstring title = L"Google Chrome";
-#else // CHROMIUM_BUILD
- std::wstring title = L"Chromium";
-#endif // CHROMIUM_BUILD
- title += L" ";
- title += label; // makes attaching to process easier
- std::wstring message = label;
- message += L" starting with pid: ";
- message += UTF8ToWide(base::IntToString(base::GetCurrentProcId()));
- ::MessageBox(NULL, message.c_str(), title.c_str(),
- MB_OK | MB_SETFOREGROUND);
-#elif defined(OS_POSIX)
- // TODO(playmobil): In the long term, overriding this flag doesn't seem
- // right, either use our own flag or open a dialog we can use.
- // This is just to ease debugging in the interim.
- LOG(ERROR) << label
- << " ("
- << getpid()
- << ") paused waiting for debugger to attach @ pid";
- // Install a signal handler so that pause can be woken.
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = SigUSR1Handler;
- sigaction(SIGUSR1, &sa, NULL);
-
- pause();
-#endif // defined(OS_POSIX)
-}
diff --git a/chrome/common/child_process.h b/chrome/common/child_process.h
deleted file mode 100644
index c656317..0000000
--- a/chrome/common/child_process.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_CHILD_PROCESS_H__
-#define CHROME_COMMON_CHILD_PROCESS_H__
-#pragma once
-
-#include "base/basictypes.h"
-#include "base/scoped_ptr.h"
-#include "base/threading/thread.h"
-#include "base/synchronization/waitable_event.h"
-
-class ChildThread;
-
-// Base class for child processes of the browser process (i.e. renderer and
-// plugin host). This is a singleton object for each child process.
-class ChildProcess {
- public:
- // Child processes should have an object that derives from this class.
- ChildProcess();
- virtual ~ChildProcess();
-
- // Getter for the child process' main thread.
- ChildThread* main_thread();
- void set_main_thread(ChildThread* thread);
-
- MessageLoop* io_message_loop() { return io_thread_.message_loop(); }
-
- // A global event object that is signalled when the main thread's message
- // loop exits. This gives background threads a way to observe the main
- // thread shutting down. This can be useful when a background thread is
- // waiting for some information from the browser process. If the browser
- // process goes away prematurely, the background thread can at least notice
- // the child processes's main thread exiting to determine that it should give
- // up waiting.
- // For example, see the renderer code used to implement
- // webkit_glue::GetCookies.
- base::WaitableEvent* GetShutDownEvent();
-
- // These are used for ref-counting the child process. The process shuts
- // itself down when the ref count reaches 0.
- // For example, in the renderer process, generally each tab managed by this
- // process will hold a reference to the process, and release when closed.
- void AddRefProcess();
- void ReleaseProcess();
-
- // Getter for the one ChildProcess object for this process.
- static ChildProcess* current() { return child_process_; }
-
- static void WaitForDebugger(const std::wstring& label);
- private:
- int ref_count_;
-
- // An event that will be signalled when we shutdown.
- base::WaitableEvent shutdown_event_;
-
- // The thread that handles IO events.
- base::Thread io_thread_;
-
- // NOTE: make sure that main_thread_ is listed after shutdown_event_, since
- // it depends on it (indirectly through IPC::SyncChannel). Same for
- // io_thread_.
- scoped_ptr<ChildThread> main_thread_;
-
- // The singleton instance for this process.
- static ChildProcess* child_process_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildProcess);
-};
-
-#endif // CHROME_COMMON_CHILD_PROCESS_H__
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc
index 1b6459a..a74d0e1 100644
--- a/chrome/common/child_process_host.cc
+++ b/chrome/common/child_process_host.cc
@@ -12,7 +12,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/plugin_messages.h"
+#include "content/common/child_process_messages.h"
#include "ipc/ipc_logging.h"
#if defined(OS_LINUX)
@@ -129,10 +129,10 @@ bool ChildProcessHost::CreateChannel() {
// Make sure these messages get sent first.
#if defined(IPC_MESSAGE_LOG_ENABLED)
bool enabled = IPC::Logging::GetInstance()->Enabled();
- Send(new PluginProcessMsg_SetIPCLoggingEnabled(enabled));
+ Send(new ChildProcessMsg_SetIPCLoggingEnabled(enabled));
#endif
- Send(new PluginProcessMsg_AskBeforeShutdown());
+ Send(new ChildProcessMsg_AskBeforeShutdown());
opening_channel_ = true;
@@ -196,9 +196,9 @@ bool ChildProcessHost::ListenerHook::OnMessageReceived(
}
}
- if (!handled && msg.type() == PluginProcessHostMsg_ShutdownRequest::ID) {
+ if (!handled && msg.type() == ChildProcessHostMsg_ShutdownRequest::ID) {
if (host_->CanShutdown())
- host_->Send(new PluginProcessMsg_Shutdown());
+ host_->Send(new ChildProcessMsg_Shutdown());
handled = true;
}
@@ -234,5 +234,5 @@ void ChildProcessHost::ListenerHook::OnChannelError() {
}
void ChildProcessHost::ForceShutdown() {
- Send(new PluginProcessMsg_Shutdown());
+ Send(new ChildProcessMsg_Shutdown());
}
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc
deleted file mode 100644
index dd74aee..0000000
--- a/chrome/common/child_thread.cc
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/child_thread.h"
-
-#include "base/message_loop.h"
-#include "base/string_util.h"
-#include "base/command_line.h"
-#include "chrome/common/child_process.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/file_system/file_system_dispatcher.h"
-#include "chrome/common/notification_service.h"
-#include "chrome/common/plugin_messages.h"
-#include "chrome/common/resource_dispatcher.h"
-#include "chrome/common/socket_stream_dispatcher.h"
-#include "ipc/ipc_logging.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_sync_channel.h"
-#include "ipc/ipc_sync_message_filter.h"
-#include "ipc/ipc_switches.h"
-#include "webkit/glue/webkit_glue.h"
-
-ChildThread::ChildThread() {
- channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kProcessChannelID);
- Init();
-}
-
-ChildThread::ChildThread(const std::string& channel_name)
- : channel_name_(channel_name) {
- Init();
-}
-
-void ChildThread::Init() {
- check_with_browser_before_shutdown_ = false;
- on_channel_error_called_ = false;
- message_loop_ = MessageLoop::current();
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) {
- webkit_glue::SetUserAgent(
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kUserAgent));
- }
-
- channel_.reset(new IPC::SyncChannel(channel_name_,
- IPC::Channel::MODE_CLIENT, this,
- ChildProcess::current()->io_message_loop(), true,
- ChildProcess::current()->GetShutDownEvent()));
-#ifdef IPC_MESSAGE_LOG_ENABLED
- IPC::Logging::GetInstance()->SetIPCSender(this);
-#endif
-
- resource_dispatcher_.reset(new ResourceDispatcher(this));
- socket_stream_dispatcher_.reset(new SocketStreamDispatcher());
- file_system_dispatcher_.reset(new FileSystemDispatcher());
-
- sync_message_filter_ =
- new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent());
- channel_->AddFilter(sync_message_filter_.get());
-
- // When running in unit tests, there is already a NotificationService object.
- // Since only one can exist at a time per thread, check first.
- if (!NotificationService::current())
- notification_service_.reset(new NotificationService);
-}
-
-ChildThread::~ChildThread() {
-#ifdef IPC_MESSAGE_LOG_ENABLED
- IPC::Logging::GetInstance()->SetIPCSender(NULL);
-#endif
-
- channel_->RemoveFilter(sync_message_filter_.get());
-
- // Close this channel before resetting the message loop attached to it so
- // the message loop can call ChannelProxy::Context::OnChannelClosed(), which
- // releases the reference count to this channel.
- channel_->Close();
-
- // The ChannelProxy object caches a pointer to the IPC thread, so need to
- // reset it as it's not guaranteed to outlive this object.
- // NOTE: this also has the side-effect of not closing the main IPC channel to
- // the browser process. This is needed because this is the signal that the
- // browser uses to know that this process has died, so we need it to be alive
- // until this process is shut down, and the OS closes the handle
- // automatically. We used to watch the object handle on Windows to do this,
- // but it wasn't possible to do so on POSIX.
- channel_->ClearIPCMessageLoop();
-}
-
-void ChildThread::OnChannelError() {
- set_on_channel_error_called(true);
- MessageLoop::current()->Quit();
-}
-
-bool ChildThread::Send(IPC::Message* msg) {
- if (!channel_.get()) {
- delete msg;
- return false;
- }
-
- return channel_->Send(msg);
-}
-
-void ChildThread::AddRoute(int32 routing_id, IPC::Channel::Listener* listener) {
- DCHECK(MessageLoop::current() == message_loop());
-
- router_.AddRoute(routing_id, listener);
-}
-
-void ChildThread::RemoveRoute(int32 routing_id) {
- DCHECK(MessageLoop::current() == message_loop());
-
- router_.RemoveRoute(routing_id);
-}
-
-IPC::Channel::Listener* ChildThread::ResolveRoute(int32 routing_id) {
- DCHECK(MessageLoop::current() == message_loop());
-
- return router_.ResolveRoute(routing_id);
-}
-
-webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id) {
- return resource_dispatcher()->
- CreateBridge(request_info, host_renderer_id, host_render_view_id);
-}
-
-ResourceDispatcher* ChildThread::resource_dispatcher() {
- return resource_dispatcher_.get();
-}
-
-IPC::SyncMessageFilter* ChildThread::sync_message_filter() {
- return sync_message_filter_;
-}
-
-MessageLoop* ChildThread::message_loop() {
- return message_loop_;
-}
-
-bool ChildThread::OnMessageReceived(const IPC::Message& msg) {
- // Resource responses are sent to the resource dispatcher.
- if (resource_dispatcher_->OnMessageReceived(msg))
- return true;
- if (socket_stream_dispatcher_->OnMessageReceived(msg))
- return true;
- if (file_system_dispatcher_->OnMessageReceived(msg))
- return true;
-
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(ChildThread, msg)
- IPC_MESSAGE_HANDLER(PluginProcessMsg_AskBeforeShutdown, OnAskBeforeShutdown)
- IPC_MESSAGE_HANDLER(PluginProcessMsg_Shutdown, OnShutdown)
-#if defined(IPC_MESSAGE_LOG_ENABLED)
- IPC_MESSAGE_HANDLER(PluginProcessMsg_SetIPCLoggingEnabled,
- OnSetIPCLoggingEnabled)
-#endif
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
-
- if (handled)
- return true;
-
- if (msg.routing_id() == MSG_ROUTING_CONTROL)
- return OnControlMessageReceived(msg);
-
- return router_.OnMessageReceived(msg);
-}
-
-bool ChildThread::OnControlMessageReceived(const IPC::Message& msg) {
- return false;
-}
-
-void ChildThread::OnAskBeforeShutdown() {
- check_with_browser_before_shutdown_ = true;
-}
-
-void ChildThread::OnShutdown() {
- MessageLoop::current()->Quit();
-}
-
-#if defined(IPC_MESSAGE_LOG_ENABLED)
-void ChildThread::OnSetIPCLoggingEnabled(bool enable) {
- if (enable)
- IPC::Logging::GetInstance()->Enable();
- else
- IPC::Logging::GetInstance()->Disable();
-}
-#endif // IPC_MESSAGE_LOG_ENABLED
-
-ChildThread* ChildThread::current() {
- return ChildProcess::current()->main_thread();
-}
-
-void ChildThread::OnProcessFinalRelease() {
- if (on_channel_error_called_ || !check_with_browser_before_shutdown_) {
- MessageLoop::current()->Quit();
- return;
- }
-
- // The child process shutdown sequence is a request response based mechanism,
- // where we send out an initial feeler request to the child process host
- // instance in the browser to verify if it's ok to shutdown the child process.
- // The browser then sends back a response if it's ok to shutdown.
- Send(new PluginProcessHostMsg_ShutdownRequest);
-}
diff --git a/chrome/common/child_thread.h b/chrome/common/child_thread.h
deleted file mode 100644
index 4537f1b..0000000
--- a/chrome/common/child_thread.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_CHILD_THREAD_H_
-#define CHROME_COMMON_CHILD_THREAD_H_
-#pragma once
-
-#include "base/basictypes.h"
-#include "base/scoped_ptr.h"
-#include "chrome/common/message_router.h"
-#include "ipc/ipc_message.h"
-#include "webkit/glue/resource_loader_bridge.h"
-
-class FileSystemDispatcher;
-class MessageLoop;
-class NotificationService;
-class ResourceDispatcher;
-class SocketStreamDispatcher;
-
-namespace IPC {
-class SyncChannel;
-class SyncMessageFilter;
-}
-
-// The main thread of a child process derives from this class.
-class ChildThread : public IPC::Channel::Listener,
- public IPC::Message::Sender {
- public:
- // Creates the thread.
- ChildThread();
- // Used for single-process mode.
- explicit ChildThread(const std::string& channel_name);
- virtual ~ChildThread();
-
- // IPC::Message::Sender implementation:
- virtual bool Send(IPC::Message* msg);
-
- // See documentation on MessageRouter for AddRoute and RemoveRoute
- void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
- void RemoveRoute(int32 routing_id);
-
- IPC::Channel::Listener* ResolveRoute(int32 routing_id);
-
- // Creates a ResourceLoaderBridge.
- // Tests can override this method if they want a custom loading behavior.
- virtual webkit_glue::ResourceLoaderBridge* CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id);
-
- ResourceDispatcher* resource_dispatcher();
-
- SocketStreamDispatcher* socket_stream_dispatcher() {
- return socket_stream_dispatcher_.get();
- }
-
- FileSystemDispatcher* file_system_dispatcher() const {
- return file_system_dispatcher_.get();
- }
-
- // Safe to call on any thread, as long as it's guaranteed that the thread's
- // lifetime is less than the main thread.
- IPC::SyncMessageFilter* sync_message_filter();
-
- MessageLoop* message_loop();
-
- // Returns the one child thread.
- static ChildThread* current();
-
- protected:
- friend class ChildProcess;
-
- // Called when the process refcount is 0.
- void OnProcessFinalRelease();
-
- virtual bool OnControlMessageReceived(const IPC::Message& msg);
- virtual void OnAskBeforeShutdown();
- virtual void OnShutdown();
-
-#ifdef IPC_MESSAGE_LOG_ENABLED
- virtual void OnSetIPCLoggingEnabled(bool enable);
-#endif
-
- IPC::SyncChannel* channel() { return channel_.get(); }
-
- void set_on_channel_error_called(bool on_channel_error_called) {
- on_channel_error_called_ = on_channel_error_called;
- }
-
- private:
- void Init();
-
- // IPC::Channel::Listener implementation:
- virtual bool OnMessageReceived(const IPC::Message& msg);
- virtual void OnChannelError();
-
- std::string channel_name_;
- scoped_ptr<IPC::SyncChannel> channel_;
-
- // Allows threads other than the main thread to send sync messages.
- scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
-
- // Implements message routing functionality to the consumers of ChildThread.
- MessageRouter router_;
-
- // Handles resource loads for this process.
- scoped_ptr<ResourceDispatcher> resource_dispatcher_;
-
- // Handles SocketStream for this process.
- scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_;
-
- // If true, checks with the browser process before shutdown. This avoids race
- // conditions if the process refcount is 0 but there's an IPC message inflight
- // that would addref it.
- bool check_with_browser_before_shutdown_;
-
- // The OnChannelError() callback was invoked - the channel is dead, don't
- // attempt to communicate.
- bool on_channel_error_called_;
-
- MessageLoop* message_loop_;
-
- scoped_ptr<NotificationService> notification_service_;
-
- scoped_ptr<FileSystemDispatcher> file_system_dispatcher_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildThread);
-};
-
-#endif // CHROME_COMMON_CHILD_THREAD_H_
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index 0cb0fca..43c36a4 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -118,8 +118,6 @@ const int kStatsMaxThreads = 32;
const int kStatsMaxCounters = 3000;
const size_t kMaxTitleChars = 4 * 1024;
-const size_t kMaxURLChars = 2 * 1024 * 1024;
-const size_t kMaxURLDisplayChars = 32 * 1024;
// We don't enable record mode in the released product because users could
// potentially be tricked into running a product in record mode without
diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h
index 56be2f8..c94ac25 100644
--- a/chrome/common/chrome_constants.h
+++ b/chrome/common/chrome_constants.h
@@ -78,14 +78,6 @@ extern const int kStatsMaxCounters;
// The maximum number of characters of the document's title that we're willing
// to accept in the browser process.
extern const size_t kMaxTitleChars;
-// The maximum number of characters in the URL that we're willing to accept
-// in the browser process. It is set low enough to avoid damage to the browser
-// but high enough that a web site can abuse location.hash for a little storage.
-// We have different values for "max accepted" and "max displayed" because
-// a data: URI may be legitimately massive, but the full URI would kill all
-// known operating systems if you dropped it into a UI control.
-extern const size_t kMaxURLChars;
-extern const size_t kMaxURLDisplayChars;
extern const bool kRecordModeEnabled;
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 584bd9e..afa0b7a 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -30,6 +30,27 @@ const FilePath::CharType kInternalFlashPluginFileName[] =
FILE_PATH_LITERAL("libgcflashplayer.so");
#endif
+// File name of the internal PDF plugin on different platforms.
+const FilePath::CharType kInternalPDFPluginFileName[] =
+#if defined(OS_WIN)
+ FILE_PATH_LITERAL("pdf.dll");
+#elif defined(OS_MACOSX)
+ FILE_PATH_LITERAL("PDF.plugin");
+#else // Linux and Chrome OS
+ FILE_PATH_LITERAL("libpdf.so");
+#endif
+
+// File name of the internal NaCl plugin on different platforms.
+const FilePath::CharType kInternalNaClPluginFileName[] =
+#if defined(OS_WIN)
+ FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll");
+#elif defined(OS_MACOSX)
+ // TODO(noelallen) Please verify this extention name is correct.
+ FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin");
+#else // Linux and Chrome OS
+ FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so");
+#endif
+
} // namespace
namespace chrome {
@@ -230,25 +251,12 @@ bool PathProvider(int key, FilePath* result) {
case chrome::FILE_PDF_PLUGIN:
if (!GetInternalPluginsDirectory(&cur))
return false;
-#if defined(OS_WIN)
- cur = cur.Append(FILE_PATH_LITERAL("pdf.dll"));
-#elif defined(OS_MACOSX)
- cur = cur.Append(FILE_PATH_LITERAL("PDF.plugin"));
-#else // Linux and Chrome OS
- cur = cur.Append(FILE_PATH_LITERAL("libpdf.so"));
-#endif
+ cur = cur.Append(kInternalPDFPluginFileName);
break;
case chrome::FILE_NACL_PLUGIN:
if (!GetInternalPluginsDirectory(&cur))
return false;
-#if defined(OS_WIN)
- cur = cur.Append(FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll"));
-#elif defined(OS_MACOSX)
- // TODO(noelallen) Please verify this extention name is correct.
- cur = cur.Append(FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin"));
-#else // Linux and Chrome OS
- cur = cur.Append(FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so"));
-#endif
+ cur = cur.Append(kInternalNaClPluginFileName);
break;
case chrome::FILE_RESOURCES_PACK:
#if defined(OS_MACOSX)
diff --git a/chrome/common/chrome_paths_linux.cc b/chrome/common/chrome_paths_linux.cc
index a7fdb07..ff525db 100644
--- a/chrome/common/chrome_paths_linux.cc
+++ b/chrome/common/chrome_paths_linux.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,6 +10,14 @@
#include "base/scoped_ptr.h"
#include "base/nix/xdg_util.h"
+namespace {
+
+const char kDotConfigDir[] = ".config";
+const char kDownloadsDir[] = "Downloads";
+const char kXdgConfigHomeEnvVar[] = "XDG_CONFIG_HOME";
+
+} // namespace
+
namespace chrome {
// See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
@@ -19,8 +27,9 @@ namespace chrome {
// (This also helps us sidestep issues with other apps grabbing ~/.chromium .)
bool GetDefaultUserDataDirectory(FilePath* result) {
scoped_ptr<base::Environment> env(base::Environment::Create());
- FilePath config_dir(
- base::nix::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config"));
+ FilePath config_dir(base::nix::GetXDGDirectory(env.get(),
+ kXdgConfigHomeEnvVar,
+ kDotConfigDir));
#if defined(GOOGLE_CHROME_BUILD)
*result = config_dir.Append("google-chrome");
#else
@@ -46,8 +55,9 @@ void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) {
FilePath cache_dir;
if (!PathService::Get(base::DIR_CACHE, &cache_dir))
return;
- FilePath config_dir(
- base::nix::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config"));
+ FilePath config_dir(base::nix::GetXDGDirectory(env.get(),
+ kXdgConfigHomeEnvVar,
+ kDotConfigDir));
if (!config_dir.AppendRelativePath(profile_dir, &cache_dir))
return;
@@ -57,8 +67,9 @@ void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) {
bool GetChromeFrameUserDataDirectory(FilePath* result) {
scoped_ptr<base::Environment> env(base::Environment::Create());
- FilePath config_dir(
- base::nix::GetXDGDirectory(env.get(), "XDG_CONFIG_HOME", ".config"));
+ FilePath config_dir(base::nix::GetXDGDirectory(env.get(),
+ kXdgConfigHomeEnvVar,
+ kDotConfigDir));
#if defined(GOOGLE_CHROME_BUILD)
*result = config_dir.Append("google-chrome-frame");
#else
@@ -77,18 +88,19 @@ bool GetUserDocumentsDirectory(FilePath* result) {
// ~ or their desktop directory, in which case we default to ~/Downloads.
bool GetUserDownloadsDirectory(FilePath* result) {
scoped_ptr<base::Environment> env(base::Environment::Create());
- *result = base::nix::GetXDGUserDirectory(env.get(), "DOWNLOAD", "Downloads");
+ *result = base::nix::GetXDGUserDirectory(env.get(), "DOWNLOAD",
+ kDownloadsDir);
FilePath home = file_util::GetHomeDir();
if (*result == home) {
- *result = home.Append("Downloads");
+ *result = home.Append(kDownloadsDir);
return true;
}
FilePath desktop;
GetUserDesktop(&desktop);
if (*result == desktop) {
- *result = home.Append("Downloads");
+ *result = home.Append(kDownloadsDir);
}
return true;
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index c4d19bf..aefed69 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -5,7 +5,6 @@
#include "chrome/common/chrome_switches.h"
#include "base/base_switches.h"
-#include "base/command_line.h"
namespace switches {
@@ -18,10 +17,6 @@ namespace switches {
// is launched on the command line (e.g. by Selenium). Only needed on Mac.
const char kActivateOnLaunch[] = "activate-on-launch";
-// By default, file:// URIs cannot read other file:// URIs. This is an
-// override for developers who need the old behavior for testing.
-const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";
-
// On ChromeOS, file:// access is disabled except for certain whitelisted
// directories. This switch re-enables file:// for testing.
const char kAllowFileAccess[] = "allow-file-access";
@@ -35,9 +30,6 @@ const char kAllowOutdatedPlugins[] = "allow-outdated-plugins";
// connections.
const char kAllowSSLMITMProxies[] = "allow-ssl-mitm-proxies";
-// Allows debugging of sandboxed processes (see zygote_main_linux.cc).
-const char kAllowSandboxDebugging[] = "allow-sandbox-debugging";
-
// Allows injecting extensions and user scripts on the extensions
// gallery site. Normally prevented for security reasons, but can be
// useful for automation testing of the gallery.
@@ -150,6 +142,10 @@ const char kDebugPrint[] = "debug-print";
// device management backend.
const char kDeviceManagementUrl[] = "device-management-url";
+// Specifies the directory in which to store the shared device policy cache
+// file. If not specified, device policy will be disabled.
+const char kDevicePolicyCacheDir[] = "device-policy-cache-dir";
+
// Triggers a pletora of diagnostic modes.
const char kDiagnostics[] = "diagnostics";
@@ -163,6 +159,9 @@ const char kDisable3DAPIs[] = "disable-3d-apis";
const char kDisableAcceleratedCompositing[] =
"disable-accelerated-compositing";
+// Disables the hardware acceleration of 3D CSS and animation.
+const char kDisableAcceleratedLayers[] = "disable-accelerated-layers";
+
// Disables GPU accelerated video display.
const char kDisableAcceleratedVideo[] = "disable-accelerated-video";
@@ -195,9 +194,8 @@ const char kDisableBackgroundMode[] = "disable-background-mode";
// in the measurements.
const char kDisableBackgroundNetworking[] = "disable-background-networking";
-// Disable limits on the number of backing stores. Can prevent blinking for
-// users with many windows/tabs and lots of memory.
-const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
+// Disable the Confirm to Quit experiment (Mac only).
+const char kDisableConfirmToQuit[] = "disable-confirm-to-quit";
// Disables blocked content warning animation. Currently shows animation for
// blocked pop-ups only.
@@ -240,9 +238,6 @@ const char kDisableExtensions[] = "disable-extensions";
const char kDisableExtensionsFileAccessCheck[] =
"disable-extensions-file-access-check";
-// Disable FileSystem API.
-const char kDisableFileSystem[] = "disable-file-system";
-
// Disables the sandbox for the built-in flash player.
const char kDisableFlashSandbox[] = "disable-flash-sandbox";
@@ -255,10 +250,6 @@ const char kDisableGLMultisampling[] = "disable-gl-multisampling";
// Disable the GLSL translator.
const char kDisableGLSLTranslator[] = "disable-glsl-translator";
-// Disable the thread that crashes the GPU process if it stops responding to
-// messages.
-const char kDisableGpuWatchdog[] = "disable-gpu-watchdog";
-
// Suppresses hang monitor dialogs in renderer processes. This may allow slow
// unload handlers on a page to prevent the tab from closing, but the Task
// Manager can be used to terminate the offending process in this case.
@@ -298,20 +289,10 @@ const char kDisableJava[] = "disable-java";
// Disable LocalStorage.
const char kDisableLocalStorage[] = "disable-local-storage";
-// Force logging to be disabled. Logging is enabled by default in debug
-// builds.
-const char kDisableLogging[] = "disable-logging";
-
// Whether we should prevent the new tab page from showing the first run
// notification.
const char kDisableNewTabFirstRun[] = "disable-new-tab-first-run";
-// Prevent plugins from running.
-const char kDisablePlugins[] = "disable-plugins";
-
-// Disable pop-up blocking.
-const char kDisablePopupBlocking[] = "disable-popup-blocking";
-
// Normally when the user attempts to navigate to a page that was the result of
// a post we prompt to make sure they want to. This switch may be used to
// disable that check. This switch is used during automated testing.
@@ -362,8 +343,13 @@ const char kDisableSyncBookmarks[] = "disable-sync-bookmarks";
// Disable syncing of extensions.
const char kDisableSyncExtensions[] = "disable-sync-extensions";
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
+// Enable syncing browser passwords.
+const char kEnableSyncPasswords[] = "enable-sync-passwords";
+#else
// Disable syncing browser passwords.
const char kDisableSyncPasswords[] = "disable-sync-passwords";
+#endif
// Disable syncing of preferences.
const char kDisableSyncPreferences[] = "disable-sync-preferences";
@@ -392,9 +378,6 @@ const char kDisableWebResources[] = "disable-web-resources";
// Don't enforce the same-origin policy. (Used by people testing their sites.)
const char kDisableWebSecurity[] = "disable-web-security";
-// Disable Web Sockets support.
-const char kDisableWebSockets[] = "disable-web-sockets";
-
// Disable WebKit's XSSAuditor. The XSSAuditor mitigates reflective XSS.
const char kDisableXSSAuditor[] = "disable-xss-auditor";
@@ -430,9 +413,6 @@ extern const char kLogNetLog[] = "log-net-log";
// Enable gpu-accelerated 2d canvas.
const char kEnableAccelerated2dCanvas[] = "enable-accelerated-2d-canvas";
-// Enables the hardware acceleration of 3D CSS and animation.
-const char kEnableAcceleratedLayers[] = "enable-accelerated-layers";
-
// Enables the hardware acceleration of plugins.
const char kEnableAcceleratedPlugins[] = "enable-accelerated-plugins";
@@ -447,9 +427,6 @@ const char kEnableAeroPeekTabs[] = "enable-aero-peek-tabs";
// for more background.
const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port";
-// Enables the benchmarking extensions.
-const char kEnableBenchmarking[] = "enable-benchmarking";
-
// In the browser process this switch is used to enable or disable the
// client-side phishing detection. In the renderer this switch is only enabled
// if this switch is enabled in the browser and the user has opted in to UMA
@@ -457,6 +434,13 @@ const char kEnableBenchmarking[] = "enable-benchmarking";
const char kEnableClientSidePhishingDetection[] =
"enable-client-side-phishing-detection";
+// At this point, even if client-side phishing detection is enabled we will not,
+// by default, display an interstitial if we detected a phishing site. Once
+// we are confident that the false-positive rate is as low as expected we can
+// remove this flag.
+const char kEnableClientSidePhishingInterstitial[] =
+ "enable-client-side-phishing-interstitial";
+
// This flag enables UI for clearing server data. Temporarily in place
// until there's a server endpoint deployed.
const char kEnableClearServerData[] = "enable-clear-server-data";
@@ -471,8 +455,8 @@ const char kEnableCloudPrintProxy[] = "enable-cloud-print-proxy";
// Enables the Cloud Print dialog hosting code.
const char kEnableCloudPrint[] = "enable-cloud-print";
-// Enable the Confirm to Quit experiment.
-const char kEnableConfirmToQuit[] = "enable-confirm-to-quit";
+// Enables compositing to texture instead of display.
+const char kEnableCompositeToTexture[] = "enable-composite-to-texture";
// Enables establishing a backup TCP connection if a specified timeout is
// exceeded.
@@ -505,8 +489,11 @@ const char kEnableFastback[] = "enable-fastback";
// testing, for example page cycler and layout tests. See bug 1157243.
const char kEnableFileCookies[] = "enable-file-cookies";
-// Enable FileSystem API URLs.
-const char kEnableFileSystemURLScheme[] = "enable-filesystem-url-scheme";
+// Enable the use of the HistoryQuickProvider for autocomplete results.
+const char kEnableHistoryQuickProvider[] = "enable-history-quick-provider";
+
+// Enable the JavaScript Full Screen API.
+const char kEnableFullScreen[] = "enable-fullscreen";
// Enable the in-browser thumbnailing, which is more efficient than the
// in-renderer thumbnailing, as we can use more information to determine
@@ -519,24 +506,12 @@ const char kEnableInBrowserThumbnailing[] = "enable-in-browser-thumbnailing";
// This flag overrides "disable-ipv6" which appears elswhere in this file.
const char kEnableIPv6[] = "enable-ipv6";
-// Enable the GPU plugin and Pepper 3D rendering.
-const char kEnableGPUPlugin[] = "enable-gpu-plugin";
-
// Enable experimental JavaScript I18N API.
const char kEnableJavaScriptI18NAPI[] = "enable-javascript-i18n-api";
-// Force logging to be enabled. Logging is disabled by default in release
-// builds.
-const char kEnableLogging[] = "enable-logging";
-
// Allows reporting memory info (JS heap size) to page.
const char kEnableMemoryInfo[] = "enable-memory-info";
-// On Windows, converts the page to the currently-installed monitor profile.
-// This does NOT enable color management for images. The source is still
-// assumed to be sRGB.
-const char kEnableMonitorProfile[] = "enable-monitor-profile";
-
// Runs the Native Client inside the renderer process and enables GPU plugin
// (internally adds lEnableGpuPlugin to the command line).
const char kEnableNaCl[] = "enable-nacl";
@@ -544,9 +519,6 @@ const char kEnableNaCl[] = "enable-nacl";
// Enables debugging via RSP over a socket.
const char kEnableNaClDebug[] = "enable-nacl-debug";
-// Enable Native Web Worker support.
-const char kEnableNativeWebWorkers[] = "enable-native-web-workers";
-
// This applies only when the process type is "service". Enables the
// Chromoting Host Process within the service process.
const char kEnableRemoting[] = "enable-remoting";
@@ -555,12 +527,12 @@ const char kEnableRemoting[] = "enable-remoting";
const char kEnableResourceContentSettings[] =
"enable-resource-content-settings";
+// Enable Pepper and JavaScript P2P API.
+const char kEnableP2PApi[] = "enable-p2papi";
+
// Enable speculative TCP/IP preconnection.
const char kEnablePreconnect[] = "enable-preconnect";
-// Enable caching of pre-parsed JS script data. See http://crbug.com/32407.
-const char kEnablePreparsedJsCaching[] = "enable-preparsed-js-caching";
-
// Enable print preview (work in progress).
const char kEnablePrintPreview[] = "enable-print-preview";
@@ -571,12 +543,6 @@ const char kEnableSearchProviderApiV2[] = "enable-search-provider-api-v2";
// Enables 0-RTT HTTPS handshakes.
const char kEnableSnapStart[] = "enable-snap-start";
-// Enables speech input.
-const char kEnableSpeechInput[] = "enable-speech-input";
-
-// Enables StatsTable, logging statistics to a global named shared memory table.
-const char kEnableStatsTable[] = "enable-stats-table";
-
// Enable syncing browser data to a Google Account.
const char kEnableSync[] = "enable-sync";
@@ -617,13 +583,6 @@ const char kEnableWatchdog[] = "enable-watchdog";
// Enable web audio API.
const char kEnableWebAudio[] = "enable-webaudio";
-// Enables experimental features for the geolocation API.
-// Current features:
-// - CoreLocation support for Mac OS X 10.6
-// - Gateway location for Linux and Windows
-// - Location platform support for Windows 7
-const char kExperimentalLocationFeatures[] = "experimental-location-features";
-
// Enables experimental features for Spellchecker. Right now, the first
// experimental feature is auto spell correct, which corrects words which are
// misppelled by typing the word with two consecutive letters swapped. The
@@ -658,6 +617,9 @@ const char kFeedbackServer[] = "feedback-server";
// gracefully.
const char kFileDescriptorLimit[] = "file-descriptor-limit";
+// If true opening a url from the omnibox attepts to focus an existing tab.
+const char kFocusExistingTabOnOpen[] = "focus-existing-tab-on-open";
+
// Display the First Run experience when the browser is started, regardless of
// whether or not it's actually the first run.
const char kFirstRun[] = "first-run";
@@ -683,16 +645,6 @@ const char kForceFieldTestNameAndValue[] = "force-fieldtest";
// overrides this if present.
const char kForceRendererAccessibility[] = "force-renderer-accessibility";
-// Extra command line options for launching the GPU process (normally used
-// for debugging). Use like renderer-cmd-prefix.
-const char kGpuLauncher[] = "gpu-launcher";
-
-// Makes this process a GPU sub-process.
-const char kGpuProcess[] = "gpu-process";
-
-// Causes the GPU process to display a dialog on launch.
-const char kGpuStartupDialog[] = "gpu-startup-dialog";
-
// Specifies a custom name for the GSSAPI library to load.
const char kGSSAPILibraryName[] = "gssapi-library-name";
@@ -774,19 +726,6 @@ const char kLoadExtension[] = "load-extension";
// Uninstall an extension with the specified extension id.
const char kUninstallExtension[] = "uninstall-extension";
-// Load an NPAPI plugin from the specified path.
-const char kLoadPlugin[] = "load-plugin";
-
-// Load NPAPI plugins from the specified directory.
-const char kExtraPluginDir[] = "extra-plugin-dir";
-
-// Make plugin processes log their sent and received messages to VLOG(1).
-const char kLogPluginMessages[] = "log-plugin-messages";
-
-// Sets the minimum log level. Valid values are from 0 to 3:
-// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
-const char kLoggingLevel[] = "log-level";
-
// Make Chrome default browser
const char kMakeDefaultBrowser[] = "make-default-browser";
@@ -812,6 +751,9 @@ const char kMetricsRecordingOnly[] = "metrics-recording-only";
// The minimum version of Flash that implements the NPP_ClearSiteData API.
const char kMinClearSiteDataFlashVersion[] = "min-clearsitedata-flash-version";
+// Enables multiprofile Chrome.
+const char kMultiProfiles[] = "multi-profiles";
+
// Sets the default IP address (interface) for the stub (normally 127.0.0.1).
const char kNaClDebugIP[] = "nacl-debug-ip";
@@ -846,9 +788,6 @@ const char kNoExperiments[] = "no-experiments";
// you're for some reason tempted to pass them both.
const char kNoFirstRun[] = "no-first-run";
-// Don't Sandbox the GPU process, does not affect other sandboxed processes.
-const char kNoGpuSandbox[] = "no-gpu-sandbox";
-
// Support a separate switch that enables the v8 playback extension.
// The extension causes javascript calls to Date.now() and Math.random()
// to return consistent values, such that subsequent loads of the same
@@ -863,12 +802,14 @@ const char kNoPings[] = "no-pings";
// other proxy server flags that are passed.
const char kNoProxyServer[] = "no-proxy-server";
-// Don't send HTTP-Referer headers.
-const char kNoReferrers[] = "no-referrers";
-
// Disables the sandbox for all process types that are normally sandboxed.
const char kNoSandbox[] = "no-sandbox";
+// Disables the service process from adding itself as an autorun process. This
+// does not delete existing autorun registrations, it just prevents the service
+// from registering a new one.
+const char kNoServiceAutorun[] = "no-service-autorun";
+
// Does not automatically open a browser window on startup (used when launching
// Chrome for the purpose of hosting background apps).
const char kNoStartupWindow[] = "no-startup-window";
@@ -904,32 +845,6 @@ const char kPlaybackMode[] = "playback-mode";
// specifically) will store its state.
const char kPluginDataDir[] = "plugin-data-dir";
-// Specifies a command that should be used to launch the plugin process. Useful
-// for running the plugin process through purify or quantify. Ex:
-// --plugin-launcher="path\to\purify /Run=yes"
-const char kPluginLauncher[] = "plugin-launcher";
-
-// Tells the plugin process the path of the plugin to load
-const char kPluginPath[] = "plugin-path";
-
-// Causes the process to run as a plugin subprocess.
-const char kPluginProcess[] = "plugin";
-
-// Causes the plugin process to display a dialog on launch.
-const char kPluginStartupDialog[] = "plugin-startup-dialog";
-
-// Runs PPAPI (Pepper) plugins out-of-process.
-const char kPpapiOutOfProcess[] = "ppapi-out-of-process";
-
-// Like kPluginLauncher for PPAPI plugins.
-const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher";
-
-// Argument to the process type that indicates a PPAPI plugin process type.
-const char kPpapiPluginProcess[] = "ppapi";
-
-// Causes the PPAPI sub process to display a dialog on launch.
-const char kPpapiStartupDialog[] = "ppapi-startup-dialog";
-
// Controls speculative prerendering of pages, and content prefetching. Both
// are dispatched from <link rel=prefetch href=...> elements.
const char kPrerender[] = "prerender";
@@ -946,22 +861,6 @@ const char kPrerenderSwitchValuePrefetchOnly[] = "prefetch_only";
// Prints the pages on the screen.
const char kPrint[] = "print";
-// Runs a single process for each site (i.e., group of pages from the same
-// registered domain) the user visits. We default to using a renderer process
-// for each site instance (i.e., group of pages from the same registered
-// domain with script connections to each other).
-const char kProcessPerSite[] = "process-per-site";
-
-// Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
-// renderer process. We default to using a renderer process for each
-// site instance (i.e., group of pages from the same registered domain with
-// script connections to each other).
-const char kProcessPerTab[] = "process-per-tab";
-
-// The value of this switch determines whether the process is started as a
-// renderer or plugin host. If it's empty, it's the browser.
-const char kProcessType[] = "type";
-
// Output the product version information and quit. Used as an internal api to
// detect the installed version of Chrome on Linux.
const char kProductVersion[] = "product-version";
@@ -1019,9 +918,6 @@ const char kPurgeMemoryButton[] = "purge-memory-button";
// See also kPlaybackMode.
const char kRecordMode[] = "record-mode";
-// Register pepper plugins that should be loaded into the renderer.
-const char kRegisterPepperPlugins[] = "register-pepper-plugins";
-
// Reload pages that have been killed when they are next focused by the user.
const char kReloadKilledTabs[] = "reload-killed-tabs";
@@ -1039,28 +935,12 @@ const char kRendererAssertTest[] = "renderer-assert-test";
const char kRendererCheckFalseTest[] = "renderer-check-false-test";
#endif
-// On POSIX only: the contents of this flag are prepended to the renderer
-// command line. Useful values might be "valgrind" or "xterm -e gdb --args".
-const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
-
-// Causes the renderer process to crash on launch.
-const char kRendererCrashTest[] = "renderer-crash-test";
-
-// Causes the process to run as renderer instead of as browser.
-const char kRendererProcess[] = "renderer";
-
-// Causes the renderer process to display a dialog on launch.
-const char kRendererStartupDialog[] = "renderer-startup-dialog";
-
// Indicates the last session should be restored on startup. This overrides
// the preferences value and is primarily intended for testing. The value of
// this switch is the number of tabs to wait until loaded before
// 'load completed' is sent to the ui_test.
const char kRestoreLastSession[] = "restore-last-session";
-// Runs the plugin processes inside the sandbox.
-const char kSafePlugins[] = "safe-plugins";
-
// URL prefix used by safebrowsing to fetch hash, download data and
// report malware.
const char kSbInfoURLPrefix[] = "safebrowsing-info-url-prefix";
@@ -1077,6 +957,13 @@ const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update";
// to make sure the content are not malicious.
const char kSbEnableDownloadProtection[] = "safebrowsing-download-protection";
+// This flag is used together with kSbEnableDownloadProtection. When that flag
+// is present but this flag is absent, we won't show the warning ui. The purpose
+// of this flag is to make sure we roll out download url detection smoothly.
+// We will remove this flag once we verify that the download url detection works
+// as expectecd according to UMA reports.
+const char kSbEnableDownloadWarningUI[] = "safebrowsing-download-warning-ui";
+
// Enable support for SDCH filtering (dictionary based expansion of content).
// Optional argument is *the* only domain name that will have SDCH suppport.
// Default is "-enable-sdch" to advertise SDCH on all domains.
@@ -1101,6 +988,13 @@ const char kShowIcons[] = "show-icons";
// layer compositing.
const char kShowCompositedLayerBorders[] = "show-composited-layer-borders";
+// Draws a textual dump of the compositor layer tree to help debug and study
+// layer compositing.
+const char kShowCompositedLayerTree[] = "show-composited-layer-tree";
+
+// Draws a FPS indicator
+const char kShowFPSCounter[] = "show-fps-counter";
+
// Visibly render a border around paint rects in the web page to help debug
// and study painting behavior.
const char kShowPaintRects[] = "show-paint-rects";
@@ -1117,9 +1011,6 @@ const char kSilentDumpOnDCHECK[] = "silent-dump-on-dcheck";
// is cleaned up and playback testing completed.
const char kSimpleDataSource[] = "simple-data-source";
-// Runs the renderer and plugins in the same process as the browser
-const char kSingleProcess[] = "single-process";
-
// Start the browser maximized, regardless of any previous settings.
const char kStartMaximized[] = "start-maximized";
@@ -1149,12 +1040,12 @@ const char kSyncServiceURL[] = "sync-url";
// Try to connect to XMPP using SSLTCP first (for testing).
const char kSyncTrySsltcpFirstForXmpp[] = "sync-try-ssltcp-first-for-xmpp";
+// Use new experimental SyncerThread implementation and friends.
+const char kNewSyncerThread[] = "new-syncer-thread";
+
// Pass the name of the current running automated test to Chrome.
const char kTestName[] = "test-name";
-// Runs the security test for the renderer sandbox.
-const char kTestSandbox[] = "test-sandbox";
-
// Runs the security test for the NaCl loader sandbox.
const char kTestNaClSandbox[] = "test-nacl-sandbox";
@@ -1189,23 +1080,6 @@ const char kMaxSpdySessionsPerDomain[] = "max-spdy-sessions-per-domain";
// Set the maximum concurrent streams over a SPDY session.
const char kMaxSpdyConcurrentStreams[] = "max-spdy-concurrent-streams";
-// Grant unlimited quota to store files to this process.
-// Used for testing Pepper's FileRef/FileIO/FileSystem implementations.
-// DO NOT USE FOR OTHER PURPOSES.
-// TODO(dumi): remove the switch when we have a real quota implementation.
-const char kUnlimitedQuotaForFiles[] = "unlimited-quota-for-files";
-
-// This is for testing IndexedDB and will give any website you visit unlimited
-// quota in IndexedDB. This should only be used for development and not general
-// browsing. It is ignored in single process mode.
-const char kUnlimitedQuotaForIndexedDB[] = "unlimited-quota-for-indexeddb";
-
-// Use the low fragmentation heap for the CRT.
-const char kUseLowFragHeapCrt[] = "use-lf-heap";
-
-// A string used to override the default user agent with a custom one.
-const char kUserAgent[] = "user-agent";
-
// Specifies the user data directory, which is where the browser will look
// for all of its state.
const char kUserDataDir[] = "user-data-dir";
@@ -1228,31 +1102,10 @@ const char kUtilityProcessAllowedDir[] = "utility-allowed-dir";
// Print version information and quit.
const char kVersion[] = "version";
-// Will add kWaitForDebugger to every child processes. If a value is passed, it
-// will be used as a filter to determine if the child process should have the
-// kWaitForDebugger flag passed on or not.
-const char kWaitForDebuggerChildren[] = "wait-for-debugger-children";
-
-// Causes the worker process allocation to use as many processes as cores.
-const char kWebWorkerProcessPerCore[] = "web-worker-process-per-core";
-
-// Causes workers to run together in one process, depending on their domains.
-// Note this is duplicated in webworkerclient_impl.cc
-const char kWebWorkerShareProcesses[] = "web-worker-share-processes";
-
// Use WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is
// to use Chromium's network stack to fetch, and V8 to evaluate.
const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver";
-// Causes the process to run as a worker subprocess.
-const char kWorkerProcess[] = "worker";
-
-// The prefix used when starting the zygote process. (i.e. 'gdb --args')
-const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
-
-// Causes the process to run as a renderer zygote.
-const char kZygoteProcess[] = "zygote";
-
#if defined(OS_CHROMEOS)
// Enable the redirection of viewable document requests to the Google
// Document Viewer.
@@ -1348,22 +1201,13 @@ const char kEnableCrashReporter[] = "enable-crash-reporter";
// This switch is used during automated testing.
const char kNoProcessSingletonDialog[] = "no-process-singleton-dialog";
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
// Specifies which password store to use (detect, default, gnome, kwallet).
const char kPasswordStore[] = "password-store";
#endif
#endif
-#if defined(OS_MACOSX)
-// Temporary flag to disable hole punching for accelerated surfaces. This is
-// here to aid debugging eventual problems, it can be removed once hole punching
-// has been out there for a few dev channel releases without problems.
-const char kDisableHolePunching[] = "disable-hole-punching";
-
-// Cause the OS X sandbox write to syslog every time an access to a resource
-// is denied by the sandbox.
-const char kEnableSandboxLogging[] = "enable-sandbox-logging";
-#else
+#if !defined(OS_MACOSX)
// Enable Kiosk mode.
const char kKioskMode[] = "kiosk";
#endif
@@ -1399,21 +1243,6 @@ const char kTouchDevices[] = "touch-devices";
#endif
-// SeccompSandboxEnabled() controls whether we are using Seccomp.
-// It is currently off by default on all platforms.
-// TODO(evan): unify all of these once we turn the seccomp sandbox always
-// on. Also remove the #include of command_line.h above.
-
-// Disable the seccomp sandbox (Linux only)
-const char kDisableSeccompSandbox[] = "disable-seccomp-sandbox";
-// Enable the seccomp sandbox (Linux only)
-const char kEnableSeccompSandbox[] = "enable-seccomp-sandbox";
-
-bool SeccompSandboxEnabled() {
- return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableSeccompSandbox);
-}
-
// -----------------------------------------------------------------------------
// DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
//
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 988c2f2..5a2c4e3 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -9,23 +9,24 @@
#pragma once
#include "build/build_config.h"
+
#include "base/base_switches.h"
+#include "content/common/content_switches.h"
namespace switches {
// -----------------------------------------------------------------------------
-// Can't find the switch you are looking for? Try looking in
-// base/base_switches.cc instead.
+// Can't find the switch you are looking for? Try looking in app/app_switches.cc
+// or base/base_switches.cc or content/common/content_switches.cc or
+// media/base/media_switches.cc instead.
// -----------------------------------------------------------------------------
// All switches in alphabetical order. The switches should be documented
// alongside the definition of their values in the .cc file.
extern const char kActivateOnLaunch[];
-extern const char kAllowFileAccessFromFiles[];
extern const char kAllowFileAccess[];
extern const char kAllowOutdatedPlugins[];
extern const char kAllowSSLMITMProxies[];
-extern const char kAllowSandboxDebugging[];
extern const char kAllowScriptingGallery[];
extern const char kAlwaysAuthorizePlugins[];
extern const char kAlwaysEnableDevTools[];
@@ -54,9 +55,11 @@ extern const char kConflictingModulesCheck[];
extern const char kCountry[];
extern const char kDebugPrint[];
extern const char kDeviceManagementUrl[];
+extern const char kDevicePolicyCacheDir[];
extern const char kDiagnostics[];
extern const char kDisable3DAPIs[];
extern const char kDisableAcceleratedCompositing[];
+extern const char kDisableAcceleratedLayers[];
extern const char kDisableAcceleratedVideo[];
extern const char kDisableAltWinstation[];
extern const char kDisableApplicationCache[];
@@ -64,8 +67,8 @@ extern const char kDisableAudio[];
extern const char kDisableAuthNegotiateCnameLookup[];
extern const char kDisableBackgroundMode[];
extern const char kDisableBackgroundNetworking[];
-extern const char kDisableBackingStoreLimit[];
extern const char kDisableBlockContentAnimation[];
+extern const char kDisableConfirmToQuit[];
extern const char kDisableConnectBackupJobs[];
extern const char kDisableCustomJumpList[];
extern const char kDisableDatabases[];
@@ -76,12 +79,10 @@ extern const char kDisableEnforcedThrottling[];
extern const char kDisableExperimentalWebGL[];
extern const char kDisableExtensionsFileAccessCheck[];
extern const char kDisableExtensions[];
-extern const char kDisableFileSystem[];
extern const char kDisableFlashSandbox[];
extern const char kDisableGLMultisampling[];
extern const char kDisableGLSLTranslator[];
extern const char kDisableGeolocation[];
-extern const char kDisableGpuWatchdog[];
extern const char kDisableHangMonitor[];
extern const char kDisableHistoryQuickProvider[];
extern const char kDisableHistoryURLProvider[];
@@ -92,10 +93,7 @@ extern const char kDisableIPv6[];
extern const char kDisableJavaScript[];
extern const char kDisableJava[];
extern const char kDisableLocalStorage[];
-extern const char kDisableLogging[];
extern const char kDisableNewTabFirstRun[];
-extern const char kDisablePlugins[];
-extern const char kDisablePopupBlocking[];
extern const char kDisablePreconnect[];
extern const char kDisablePromptOnRepost[];
extern const char kDisableRemoteFonts[];
@@ -112,7 +110,6 @@ extern const char kDisableSyncAutofill[];
extern const char kDisableSyncAutofillProfile[];
extern const char kDisableSyncBookmarks[];
extern const char kDisableSyncExtensions[];
-extern const char kDisableSyncPasswords[];
extern const char kDisableSyncPreferences[];
extern const char kDisableSyncThemes[];
extern const char kDisableTabbedOptions[];
@@ -120,7 +117,6 @@ extern const char kDisableTabCloseableStateWatcher[];
extern const char kDisableTranslate[];
extern const char kDisableWebResources[];
extern const char kDisableWebSecurity[];
-extern const char kDisableWebSockets[];
extern const char kDisableXSSAuditor[];
extern const char kDiskCacheDir[];
extern const char kDiskCacheSize[];
@@ -130,18 +126,17 @@ extern const char kDnsServer[];
extern const char kDomAutomationController[];
extern const char kDumpHistogramsOnExit[];
extern const char kEnableAccelerated2dCanvas[];
-extern const char kEnableAcceleratedLayers[];
extern const char kEnableAcceleratedPlugins[];
extern const char kEnableAccessibility[];
extern const char kEnableAeroPeekTabs[];
extern const char kEnableAuthNegotiatePort[];
-extern const char kEnableBenchmarking[];
extern const char kEnableClientSidePhishingDetection[];
+extern const char kEnableClientSidePhishingInterstitial[];
extern const char kEnableClearServerData[];
extern const char kEnableClickToPlay[];
extern const char kEnableCloudPrintProxy[];
extern const char kEnableCloudPrint[];
-extern const char kEnableConfirmToQuit[];
+extern const char kEnableCompositeToTexture[];
extern const char kEnableConnectBackupJobs[];
extern const char kEnableCrxlessWebApps[];
extern const char kEnableDeviceMotion[];
@@ -151,26 +146,21 @@ extern const char kEnableExperimentalExtensionApis[];
extern const char kEnableExtensionTimelineApi[];
extern const char kEnableFastback[];
extern const char kEnableFileCookies[];
-extern const char kEnableFileSystemURLScheme[];
-extern const char kEnableGPUPlugin[];
+extern const char kEnableFullScreen[];
+extern const char kEnableHistoryQuickProvider[];
extern const char kEnableInBrowserThumbnailing[];
extern const char kEnableIPv6[];
extern const char kEnableJavaScriptI18NAPI[];
-extern const char kEnableLogging[];
extern const char kEnableMemoryInfo[];
-extern const char kEnableMonitorProfile[];
extern const char kEnableNaCl[];
extern const char kEnableNaClDebug[];
-extern const char kEnableNativeWebWorkers[];
+extern const char kEnableP2PApi[];
extern const char kEnablePreconnect[];
-extern const char kEnablePreparsedJsCaching[];
extern const char kEnablePrintPreview[];
extern const char kEnableRemoting[];
extern const char kEnableResourceContentSettings[];
extern const char kEnableSearchProviderApiV2[];
extern const char kEnableSnapStart[];
-extern const char kEnableSpeechInput[];
-extern const char kEnableStatsTable[];
extern const char kEnableSync[];
extern const char kEnableSyncAutofill[];
extern const char kEnableSyncPreferences[];
@@ -184,10 +174,7 @@ extern const char kEnableVideoFullscreen[];
extern const char kEnableVideoLogging[];
extern const char kEnableWatchdog[];
extern const char kEnableWebAudio[];
-// Experimental features.
-extern const char kExperimentalLocationFeatures[];
extern const char kExperimentalSpellcheckerFeatures[];
-// End experimental features.
extern const char kExplicitlyAllowedPorts[];
extern const char kExtensionProcess[];
extern const char kExtensionsUpdateFrequency[];
@@ -195,14 +182,12 @@ extern const char kFlagSwitchesBegin[];
extern const char kFlagSwitchesEnd[];
extern const char kFeedbackServer[];
extern const char kFileDescriptorLimit[];
+extern const char kFocusExistingTabOnOpen[];
extern const char kFirstRun[];
extern const char kForceAppsPromoVisible[];
extern const char kForceFieldTestNameAndValue[];
extern const char kForceRendererAccessibility[];
extern const char kForceStubLibcros[];
-extern const char kGpuLauncher[];
-extern const char kGpuProcess[];
-extern const char kGpuStartupDialog[];
extern const char kGSSAPILibraryName[];
extern const char kHelp[];
extern const char kHelpShort[];
@@ -223,17 +208,14 @@ extern const char kJavaScriptFlags[];
extern const char kKeepAliveForTest[];
extern const char kLoadExtension[];
extern const char kUninstallExtension[];
-extern const char kLoadPlugin[];
-extern const char kExtraPluginDir[];
extern const char kLogNetLog[];
-extern const char kLogPluginMessages[];
-extern const char kLoggingLevel[];
extern const char kMakeDefaultBrowser[];
extern const char kMediaCacheSize[];
extern const char kMemoryProfiling[];
extern const char kMessageLoopHistogrammer[];
extern const char kMetricsRecordingOnly[];
extern const char kMinClearSiteDataFlashVersion[];
+extern const char kMultiProfiles[];
extern const char kNaClDebugIP[];
extern const char kNaClDebugPorts[];
extern const char kNaClBrokerProcess[];
@@ -243,12 +225,11 @@ extern const char kNoDefaultBrowserCheck[];
extern const char kNoEvents[];
extern const char kNoExperiments[];
extern const char kNoFirstRun[];
-extern const char kNoGpuSandbox[];
extern const char kNoJsRandomness[];
extern const char kNoProxyServer[];
-extern const char kNoReferrers[];
extern const char kNoPings[];
extern const char kNoSandbox[];
+extern const char kNoServiceAutorun[];
extern const char kNoStartupWindow[];
extern const char kNotifyCloudPrintTokenExpired[];
extern const char kNumPacThreads[];
@@ -259,23 +240,12 @@ extern const char kPackExtensionKey[];
extern const char kParentProfile[];
extern const char kPlaybackMode[];
extern const char kPluginDataDir[];
-extern const char kPluginLauncher[];
-extern const char kPluginPath[];
-extern const char kPluginProcess[];
-extern const char kPluginStartupDialog[];
-extern const char kPpapiOutOfProcess[];
-extern const char kPpapiPluginLauncher[];
-extern const char kPpapiPluginProcess[];
-extern const char kPpapiStartupDialog[];
extern const char kPrerender[];
extern const char kPrerenderSwitchValueAuto[];
extern const char kPrerenderSwitchValueDisabled[];
extern const char kPrerenderSwitchValueEnabled[];
extern const char kPrerenderSwitchValuePrefetchOnly[];
extern const char kPrint[];
-extern const char kProcessPerSite[];
-extern const char kProcessPerTab[];
-extern const char kProcessType[];
extern const char kProductVersion[];
extern const char kProfileImportProcess[];
extern const char kProfilingAtStart[];
@@ -287,31 +257,27 @@ extern const char kProxyPacUrl[];
extern const char kProxyServer[];
extern const char kPurgeMemoryButton[];
extern const char kRecordMode[];
-extern const char kRegisterPepperPlugins[];
extern const char kReloadKilledTabs[];
extern const char kRemoteDebuggingPort[];
extern const char kRemoteShellPort[];
extern const char kRendererAssertTest[];
-extern const char kRendererCmdPrefix[];
-extern const char kRendererCrashTest[];
-extern const char kRendererProcess[];
-extern const char kRendererStartupDialog[];
extern const char kRestoreLastSession[];
-extern const char kSafePlugins[];
extern const char kSbInfoURLPrefix[];
extern const char kSbMacKeyURLPrefix[];
extern const char kSbDisableAutoUpdate[];
extern const char kSbEnableDownloadProtection[];
+extern const char kSbEnableDownloadWarningUI[];
extern const char kSdchFilter[];
extern const char kSearchInOmniboxHint[];
extern const char kServiceProcess[];
extern const char kServiceAccountLsid[];
extern const char kShowCompositedLayerBorders[];
+extern const char kShowCompositedLayerTree[];
+extern const char kShowFPSCounter[];
extern const char kShowIcons[];
extern const char kShowPaintRects[];
extern const char kSilentDumpOnDCHECK[];
extern const char kSimpleDataSource[];
-extern const char kSingleProcess[];
extern const char kStartMaximized[];
extern const char kSyncAllowInsecureXmppConnection[];
extern const char kSyncInvalidateXmppLogin[];
@@ -320,9 +286,9 @@ extern const char kSyncNotificationMethod[];
extern const char kSyncNotificationHost[];
extern const char kSyncServiceURL[];
extern const char kSyncTrySsltcpFirstForXmpp[];
+extern const char kNewSyncerThread[];
extern const char kTestNaClSandbox[];
extern const char kTestName[];
-extern const char kTestSandbox[];
extern const char kTestType[];
extern const char kTestingChannelID[];
extern const char kTrustedPlugins[];
@@ -332,23 +298,13 @@ extern const char kUseSpdy[];
extern const char kIgnoreCertificateErrors[];
extern const char kMaxSpdySessionsPerDomain[];
extern const char kMaxSpdyConcurrentStreams[];
-extern const char kUnlimitedQuotaForFiles[];
-extern const char kUnlimitedQuotaForIndexedDB[];
-extern const char kUseLowFragHeapCrt[];
-extern const char kUserAgent[];
extern const char kUserDataDir[];
extern const char kUserScriptsDir[];
extern const char kUtilityCmdPrefix[];
extern const char kUtilityProcess[];
extern const char kUtilityProcessAllowedDir[];
extern const char kVersion[];
-extern const char kWaitForDebuggerChildren[];
-extern const char kWebWorkerProcessPerCore[];
-extern const char kWebWorkerShareProcesses[];
extern const char kWinHttpProxyResolver[];
-extern const char kWorkerProcess[];
-extern const char kZygoteCmdPrefix[];
-extern const char kZygoteProcess[];
#if defined(OS_CHROMEOS)
extern const char kEnableGView[];
@@ -386,15 +342,20 @@ extern const char kUseSystemSSL[];
#if defined(OS_POSIX)
extern const char kEnableCrashReporter[];
extern const char kNoProcessSingletonDialog[];
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
extern const char kPasswordStore[];
#endif
#endif
-#if defined(OS_MACOSX)
-extern const char kDisableHolePunching[];
-extern const char kEnableSandboxLogging[];
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
+// Linux, mostly, but also BSDs and such. Password syncing and GNOME Keyring
+// don't play together at the moment so we require explicit opt-in for it.
+extern const char kEnableSyncPasswords[];
#else
+extern const char kDisableSyncPasswords[];
+#endif
+
+#if !defined(OS_MACOSX)
extern const char kKioskMode[];
#endif
@@ -417,12 +378,6 @@ extern const char kRendererCheckFalseTest[];
extern const char kTouchDevices[];
#endif
-extern const char kDisableSeccompSandbox[];
-extern const char kEnableSeccompSandbox[];
-
-// Return true if the switches indicate the seccomp sandbox is enabled.
-bool SeccompSandboxEnabled();
-
// DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
// alphabetical order, or in one of the ifdefs (also in order in each section).
diff --git a/chrome/common/common_message_generator.h b/chrome/common/common_message_generator.h
index 3a31c77..a59e82e 100644
--- a/chrome/common/common_message_generator.h
+++ b/chrome/common/common_message_generator.h
@@ -4,26 +4,27 @@
// Multiply-included file, hence no include guard.
+#include "chrome/common/database_messages.h"
+#include "chrome/common/file_utilities_messages.h"
#include "chrome/common/indexed_db_messages.h"
+#include "chrome/common/mime_registry_messages.h"
+#include "chrome/common/safebrowsing_messages.h"
+#include "chrome/common/speech_input_messages.h"
+#include "chrome/common/utility_messages.h"
+#include "chrome/common/worker_messages.h"
#if 0 // This feature is not yet enabled for these files.
#include "chrome/common/autofill_messages.h"
#include "chrome/common/automation_messages.h"
-#include "chrome/common/database_messages.h"
#include "chrome/common/devtools_messages.h"
#include "chrome/common/dom_storage_messages.h"
-#include "chrome/common/file_utilities_messages.h"
#include "chrome/common/gpu_messages.h"
-#include "chrome/common/mime_registry_messages.h"
#include "chrome/common/nacl_messages.h"
#include "chrome/common/pepper_file_messages.h"
#include "chrome/common/pepper_messages.h"
#include "chrome/common/plugin_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/service_messages.h"
-#include "chrome/common/speech_input_messages.h"
-#include "chrome/common/utility_messages.h"
-#include "chrome/common/worker_messages.h"
#endif
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index 64fa35c..38792bb 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -10,8 +10,8 @@
#include "chrome/common/geoposition.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/web_apps.h"
+#include "content/common/common_param_traits.h"
#include "googleurl/src/gurl.h"
-#include "net/base/upload_data.h"
#include "printing/backend/print_backend.h"
#include "printing/native_metafile.h"
#include "printing/page_range.h"
@@ -103,25 +103,6 @@ void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) {
#endif // EXCLUDE_SKIA_DEPENDENCIES
-void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
- m->WriteString(p.possibly_invalid_spec());
- // TODO(brettw) bug 684583: Add encoding for query params.
-}
-
-bool ParamTraits<GURL>::Read(const Message* m, void** iter, GURL* p) {
- std::string s;
- if (!m->ReadString(iter, &s) || s.length() > chrome::kMaxURLChars) {
- *p = GURL();
- return false;
- }
- *p = GURL(s);
- return true;
-}
-
-void ParamTraits<GURL>::Log(const GURL& p, std::string* l) {
- l->append(p.spec());
-}
-
void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) {
m->WriteInt(p.x());
m->WriteInt(p.y());
@@ -290,190 +271,6 @@ void ParamTraits<WebApplicationInfo>::Log(const WebApplicationInfo& p,
l->append("<WebApplicationInfo>");
}
-void ParamTraits<net::URLRequestStatus>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, static_cast<int>(p.status()));
- WriteParam(m, p.os_error());
-}
-
-bool ParamTraits<net::URLRequestStatus>::Read(const Message* m, void** iter,
- param_type* r) {
- int status, os_error;
- if (!ReadParam(m, iter, &status) ||
- !ReadParam(m, iter, &os_error))
- return false;
- r->set_status(static_cast<net::URLRequestStatus::Status>(status));
- r->set_os_error(os_error);
- return true;
-}
-
-void ParamTraits<net::URLRequestStatus>::Log(const param_type& p,
- std::string* l) {
- std::string status;
- switch (p.status()) {
- case net::URLRequestStatus::SUCCESS:
- status = "SUCCESS";
- break;
- case net::URLRequestStatus::IO_PENDING:
- status = "IO_PENDING ";
- break;
- case net::URLRequestStatus::HANDLED_EXTERNALLY:
- status = "HANDLED_EXTERNALLY";
- break;
- case net::URLRequestStatus::CANCELED:
- status = "CANCELED";
- break;
- case net::URLRequestStatus::FAILED:
- status = "FAILED";
- break;
- default:
- status = "UNKNOWN";
- break;
- }
- if (p.status() == net::URLRequestStatus::FAILED)
- l->append("(");
-
- LogParam(status, l);
-
- if (p.status() == net::URLRequestStatus::FAILED) {
- l->append(", ");
- LogParam(p.os_error(), l);
- l->append(")");
- }
-}
-
-// Only the net::UploadData ParamTraits<> definition needs this definition, so
-// keep this in the implementation file so we can forward declare UploadData in
-// the header.
-template <>
-struct ParamTraits<net::UploadData::Element> {
- typedef net::UploadData::Element param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, static_cast<int>(p.type()));
- switch (p.type()) {
- case net::UploadData::TYPE_BYTES: {
- m->WriteData(&p.bytes()[0], static_cast<int>(p.bytes().size()));
- break;
- }
- case net::UploadData::TYPE_CHUNK: {
- m->WriteData(&p.bytes()[0], static_cast<int>(p.bytes().size()));
- // If this element is part of a chunk upload then send over information
- // indicating if this is the last chunk.
- WriteParam(m, p.is_last_chunk());
- break;
- }
- case net::UploadData::TYPE_FILE: {
- WriteParam(m, p.file_path());
- WriteParam(m, p.file_range_offset());
- WriteParam(m, p.file_range_length());
- WriteParam(m, p.expected_file_modification_time());
- break;
- }
- default: {
- WriteParam(m, p.blob_url());
- break;
- }
- }
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- int type;
- if (!ReadParam(m, iter, &type))
- return false;
- switch (type) {
- case net::UploadData::TYPE_BYTES: {
- const char* data;
- int len;
- if (!m->ReadData(iter, &data, &len))
- return false;
- r->SetToBytes(data, len);
- break;
- }
- case net::UploadData::TYPE_CHUNK: {
- const char* data;
- int len;
- if (!m->ReadData(iter, &data, &len))
- return false;
- r->SetToBytes(data, len);
- // If this element is part of a chunk upload then we need to explicitly
- // set the type of the element and whether it is the last chunk.
- bool is_last_chunk = false;
- if (!ReadParam(m, iter, &is_last_chunk))
- return false;
- r->set_type(net::UploadData::TYPE_CHUNK);
- r->set_is_last_chunk(is_last_chunk);
- break;
- }
- case net::UploadData::TYPE_FILE: {
- FilePath file_path;
- uint64 offset, length;
- base::Time expected_modification_time;
- if (!ReadParam(m, iter, &file_path))
- return false;
- if (!ReadParam(m, iter, &offset))
- return false;
- if (!ReadParam(m, iter, &length))
- return false;
- if (!ReadParam(m, iter, &expected_modification_time))
- return false;
- r->SetToFilePathRange(file_path, offset, length,
- expected_modification_time);
- break;
- }
- default: {
- DCHECK(type == net::UploadData::TYPE_BLOB);
- GURL blob_url;
- if (!ReadParam(m, iter, &blob_url))
- return false;
- r->SetToBlobUrl(blob_url);
- break;
- }
- }
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- l->append("<net::UploadData::Element>");
- }
-};
-
-void ParamTraits<scoped_refptr<net::UploadData> >::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.get() != NULL);
- if (p) {
- WriteParam(m, *p->elements());
- WriteParam(m, p->identifier());
- WriteParam(m, p->is_chunked());
- }
-}
-
-bool ParamTraits<scoped_refptr<net::UploadData> >::Read(const Message* m,
- void** iter,
- param_type* r) {
- bool has_object;
- if (!ReadParam(m, iter, &has_object))
- return false;
- if (!has_object)
- return true;
- std::vector<net::UploadData::Element> elements;
- if (!ReadParam(m, iter, &elements))
- return false;
- int64 identifier;
- if (!ReadParam(m, iter, &identifier))
- return false;
- bool is_chunked = false;
- if (!ReadParam(m, iter, &is_chunked))
- return false;
- *r = new net::UploadData;
- (*r)->swap_elements(&elements);
- (*r)->set_identifier(identifier);
- (*r)->set_is_chunked(is_chunked);
- return true;
-}
-
-void ParamTraits<scoped_refptr<net::UploadData> >::Log(const param_type& p,
- std::string* l) {
- l->append("<net::UploadData>");
-}
-
void ParamTraits<ThumbnailScore>::Write(Message* m, const param_type& p) {
IPC::ParamTraits<double>::Write(m, p.boring_score);
IPC::ParamTraits<bool>::Write(m, p.good_clipping);
@@ -647,49 +444,6 @@ void ParamTraits<printing::NativeMetafile>::Log(
l->append("<printing::NativeMetafile>");
}
-void ParamTraits<base::PlatformFileInfo>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.size);
- WriteParam(m, p.is_directory);
- WriteParam(m, p.last_modified.ToDoubleT());
- WriteParam(m, p.last_accessed.ToDoubleT());
- WriteParam(m, p.creation_time.ToDoubleT());
-}
-
-bool ParamTraits<base::PlatformFileInfo>::Read(
- const Message* m, void** iter, param_type* p) {
- double last_modified;
- double last_accessed;
- double creation_time;
- bool result =
- ReadParam(m, iter, &p->size) &&
- ReadParam(m, iter, &p->is_directory) &&
- ReadParam(m, iter, &last_modified) &&
- ReadParam(m, iter, &last_accessed) &&
- ReadParam(m, iter, &creation_time);
- if (result) {
- p->last_modified = base::Time::FromDoubleT(last_modified);
- p->last_accessed = base::Time::FromDoubleT(last_accessed);
- p->creation_time = base::Time::FromDoubleT(creation_time);
- }
- return result;
-}
-
-void ParamTraits<base::PlatformFileInfo>::Log(
- const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.size, l);
- l->append(",");
- LogParam(p.is_directory, l);
- l->append(",");
- LogParam(p.last_modified.ToDoubleT(), l);
- l->append(",");
- LogParam(p.last_accessed.ToDoubleT(), l);
- l->append(",");
- LogParam(p.creation_time.ToDoubleT(), l);
- l->append(")");
-}
-
void ParamTraits<printing::PrinterCapsAndDefaults>::Write(
Message* m, const param_type& p) {
WriteParam(m, p.printer_capabilities);
diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h
index f1e8cb0..28b48bc 100644
--- a/chrome/common/common_param_traits.h
+++ b/chrome/common/common_param_traits.h
@@ -14,12 +14,10 @@
#include "app/surface/transport_dib.h"
#include "base/file_util.h"
-#include "base/platform_file.h"
#include "base/ref_counted.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/page_zoom.h"
#include "ipc/ipc_message_utils.h"
-#include "net/url_request/url_request_status.h"
#include "printing/native_metafile.h"
// !!! WARNING: DO NOT ADD NEW WEBKIT DEPENDENCIES !!!
//
@@ -27,7 +25,7 @@
// 'third_party/WebKit/'. Chrome Frame and NACL build parts of base/ and
// chrome/common/ for a mini-library that doesn't depend on webkit.
//
-// TODO(erg): The following two headers are historical and only work because
+// TODO(erg): The following headers are historical and only work because
// their definitions are inlined, which also needs to be fixed.
#include "ui/gfx/native_widget_types.h"
#include "webkit/glue/webcursor.h"
@@ -35,7 +33,6 @@
// Forward declarations.
struct Geoposition;
-class GURL;
class SkBitmap;
class DictionaryValue;
class ListValue;
@@ -49,11 +46,6 @@ class Rect;
class Size;
} // namespace gfx
-namespace net {
-class UploadData;
-class URLRequestStatus;
-}
-
namespace printing {
struct PageRange;
struct PrinterCapsAndDefaults;
@@ -77,16 +69,6 @@ struct ParamTraits<SkBitmap> {
static void Log(const param_type& p, std::string* l);
};
-
-template <>
-struct ParamTraits<GURL> {
- typedef GURL param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-
template <>
struct ParamTraits<gfx::Point> {
typedef gfx::Point param_type;
@@ -263,24 +245,6 @@ struct ParamTraits<TransportDIB::Id> {
};
#endif
-// Traits for URLRequestStatus
-template <>
-struct ParamTraits<net::URLRequestStatus> {
- typedef net::URLRequestStatus param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-// Traits for net::UploadData.
-template <>
-struct ParamTraits<scoped_refptr<net::UploadData> > {
- typedef scoped_refptr<net::UploadData> param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
template<>
struct ParamTraits<ThumbnailScore> {
typedef ThumbnailScore param_type;
@@ -322,20 +286,6 @@ struct ParamTraits<printing::NativeMetafile> {
};
template <>
-struct ParamTraits<base::PlatformFileInfo> {
- typedef base::PlatformFileInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-// Traits for base::PlatformFileError
-template <>
-struct SimilarTypeTraits<base::PlatformFileError> {
- typedef int Type;
-};
-
-template <>
struct ParamTraits<printing::PrinterCapsAndDefaults> {
typedef printing::PrinterCapsAndDefaults param_type;
static void Write(Message* m, const param_type& p);
diff --git a/chrome/common/common_param_traits_unittest.cc b/chrome/common/common_param_traits_unittest.cc
index a11ddd1..186e68e 100644
--- a/chrome/common/common_param_traits_unittest.cc
+++ b/chrome/common/common_param_traits_unittest.cc
@@ -9,16 +9,22 @@
#include "base/values.h"
#include "chrome/common/common_param_traits.h"
#include "chrome/common/geoposition.h"
+#include "content/common/common_param_traits.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_utils.h"
+#include "net/base/host_port_pair.h"
#include "printing/backend/print_backend.h"
-#include "printing/native_metafile.h"
#include "printing/page_range.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/rect.h"
+#if defined(OS_WIN)
+#include "printing/native_metafile_factory.h"
+#include "printing/native_metafile.h"
+#endif
+
// Tests that serialize/deserialize correctly understand each other
TEST(IPCMessageTest, Serialize) {
const char* serialize_cases[] = {
@@ -226,42 +232,45 @@ TEST(IPCMessageTest, PageRange) {
EXPECT_TRUE(input == output);
}
-// Tests printing::NativeMetafile serialization.
+// Tests printing::Emf serialization.
// TODO(sanjeevr): Make this test meaningful for non-Windows platforms. We
// need to initialize the metafile using alternate means on the other OSes.
#if defined(OS_WIN)
TEST(IPCMessageTest, Metafile) {
- printing::NativeMetafile metafile;
+ scoped_ptr<printing::NativeMetafile> metafile(
+ printing::NativeMetafileFactory::CreateMetafile());
RECT test_rect = {0, 0, 100, 100};
- // Create a metsfile using the screen DC as a reference.
- metafile.CreateDc(NULL, NULL);
- metafile.CloseDc();
+ // Create a metafile using the screen DC as a reference.
+ metafile->CreateDc(NULL, NULL);
+ metafile->CloseDc();
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
- IPC::ParamTraits<printing::NativeMetafile>::Write(&msg, metafile);
+ IPC::ParamTraits<printing::NativeMetafile>::Write(&msg, *metafile);
- printing::NativeMetafile output;
+ scoped_ptr<printing::NativeMetafile> output(
+ printing::NativeMetafileFactory::CreateMetafile());
void* iter = NULL;
EXPECT_TRUE(IPC::ParamTraits<printing::NativeMetafile>::Read(
- &msg, &iter, &output));
+ &msg, &iter, output.get()));
- EXPECT_EQ(metafile.GetDataSize(), output.GetDataSize());
- EXPECT_EQ(metafile.GetBounds(), output.GetBounds());
- EXPECT_EQ(::GetDeviceCaps(metafile.hdc(), LOGPIXELSX),
- ::GetDeviceCaps(output.hdc(), LOGPIXELSX));
+ EXPECT_EQ(metafile->GetDataSize(), output->GetDataSize());
+ EXPECT_EQ(metafile->GetBounds(), output->GetBounds());
+ EXPECT_EQ(::GetDeviceCaps(metafile->hdc(), LOGPIXELSX),
+ ::GetDeviceCaps(output->hdc(), LOGPIXELSX));
// Also test the corrupt case.
IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL);
// Write some bogus metafile data.
- const size_t bogus_data_size = metafile.GetDataSize() * 2;
+ const size_t bogus_data_size = metafile->GetDataSize() * 2;
scoped_array<char> bogus_data(new char[bogus_data_size]);
memset(bogus_data.get(), 'B', bogus_data_size);
bad_msg.WriteData(bogus_data.get(), bogus_data_size);
// Make sure we don't read out the metafile!
- printing::NativeMetafile bad_output;
+ scoped_ptr<printing::NativeMetafile> bad_output(
+ printing::NativeMetafileFactory::CreateMetafile());
iter = NULL;
EXPECT_FALSE(IPC::ParamTraits<printing::NativeMetafile>::Read(
- &bad_msg, &iter, &bad_output));
+ &bad_msg, &iter, bad_output.get()));
}
#endif // defined(OS_WIN)
@@ -286,3 +295,16 @@ TEST(IPCMessageTest, PrinterCapsAndDefaults) {
EXPECT_TRUE(input.defaults_mime_type == output.defaults_mime_type);
}
+// Tests net::HostPortPair serialization
+TEST(IPCMessageTest, HostPortPair) {
+ net::HostPortPair input("host.com", 12345);
+
+ IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
+ IPC::ParamTraits<net::HostPortPair>::Write(&msg, input);
+
+ net::HostPortPair output;
+ void* iter = NULL;
+ EXPECT_TRUE(IPC::ParamTraits<net::HostPortPair>::Read(&msg, &iter, &output));
+ EXPECT_EQ(input.host(), output.host());
+ EXPECT_EQ(input.port(), output.port());
+}
diff --git a/chrome/common/content_settings_types.h b/chrome/common/content_settings_types.h
index 938adbf..a19b798 100644
--- a/chrome/common/content_settings_types.h
+++ b/chrome/common/content_settings_types.h
@@ -19,6 +19,7 @@ enum ContentSettingsType {
CONTENT_SETTINGS_TYPE_POPUPS,
CONTENT_SETTINGS_TYPE_GEOLOCATION,
CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ CONTENT_SETTINGS_TYPE_PRERENDER,
CONTENT_SETTINGS_NUM_TYPES
};
diff --git a/chrome/common/database_messages.cc b/chrome/common/database_messages.cc
deleted file mode 100644
index 0b1b5d9..0000000
--- a/chrome/common/database_messages.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/common_param_traits.h"
-
-#define IPC_MESSAGE_IMPL
-#include "chrome/common/database_messages.h"
diff --git a/chrome/common/database_messages.h b/chrome/common/database_messages.h
index bb910b0..7cf64a1 100644
--- a/chrome/common/database_messages.h
+++ b/chrome/common/database_messages.h
@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_DATABASE_MESSAGES_H_
-#define CHROME_COMMON_DATABASE_MESSAGES_H_
-#pragma once
+// Multiply-included message file, no include guard.
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
@@ -76,4 +74,3 @@ IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Closed,
string16 /* origin identifier */,
string16 /* database name */)
-#endif // CHROME_COMMON_DATABASE_MESSAGES_H_
diff --git a/chrome/common/database_util.cc b/chrome/common/database_util.cc
index 9e4a99d..2a985d3 100644
--- a/chrome/common/database_util.cc
+++ b/chrome/common/database_util.cc
@@ -4,8 +4,8 @@
#include "chrome/common/database_util.h"
-#include "chrome/common/child_thread.h"
#include "chrome/common/database_messages.h"
+#include "content/common/child_thread.h"
#include "ipc/ipc_sync_message_filter.h"
#include "third_party/sqlite/sqlite3.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
diff --git a/chrome/common/dom_storage_messages.cc b/chrome/common/dom_storage_messages.cc
index 9aee345..3ee1f8d 100644
--- a/chrome/common/dom_storage_messages.cc
+++ b/chrome/common/dom_storage_messages.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/common_param_traits.h"
+#include "content/common/common_param_traits.h"
#define IPC_MESSAGE_IMPL
#include "chrome/common/dom_storage_messages.h"
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index 55c2946..d23f1ae 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -3186,6 +3186,16 @@
"expirationDate": {"type": "number", "optional": true, "description": "The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie."},
"storeId": {"type": "string", "optional": true, "description": "The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store."}
}
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "parameters": [
+ {
+ "name": "cookie", "$ref": "Cookie", "optional": true, "description": "Contains details about the cookie that's been set. If setting failed for any reason, this will be \"null\", and \"chrome.extension.lastError\" will be set."
+ }
+ ]
}
]
},
@@ -3203,6 +3213,24 @@
"name": {"type": "string", "description": "The name of the cookie to remove."},
"storeId": {"type": "string", "optional": true, "description": "The ID of the cookie store to look in for the cookie. If unspecified, the cookie is looked for by default in the current execution context's cookie store."}
}
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "Contains details about the cookie that's been removed. If removal failed for any reason, this will be \"null\", and \"chrome.extension.lastError\" will be set.",
+ "optional": true,
+ "properties": {
+ "url": {"type": "string", "description": "The URL associated with the cookie that's been removed."},
+ "name": {"type": "string", "description": "The name of the cookie that's been removed."},
+ "storeId": {"type": "string", "description": "The ID of the cookie store from which the cookie was removed."}
+ }
+ }
+ ]
}
]
},
@@ -3328,7 +3356,7 @@
"url": {"type": "string"},
"frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
"transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used."},
- "transitionQualifiers": {"type": "string", "description": "Zero or more transition qualifiers delimited by \"|\". Possible qualifiers are \"client_redirect\", \"server_redirect\", and \"forward_back\"."},
+ "transitionQualifiers": {"type": "array", "description": "A list of transition qualifiers.", "items:": {"type": "string", "enum": ["client_redirect", "server_redirect", "forward_back"]}},
"timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
}
}
@@ -3397,7 +3425,7 @@
"properties": {
"sourceTabId": {"type": "integer", "description": "The ID of the tab in which the navigation is triggered."},
"sourceUrl": {"type": "string", "description": "The URL of the document that is opening the new window."},
- "targetUrl": {"type": "string", "description": "The URL to be opened in the new window."},
+ "url": {"type": "string", "description": "The URL to be opened in the new window."},
"timeStamp": {"type": "number", "description": "The time when the browser was about to create a new view, in milliseconds since the epoch."}
}
}
@@ -3684,30 +3712,31 @@
"type": "object",
"description": "An object encapsulating a single proxy server's specification.",
"properties": {
- "scheme": {"type": "string", "optional": true, "enum": ["http", "https", "socks", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself."},
- "host": {"type": "string", "description": "The URI of the proxy server."},
- "port": {"type": "integer", "optional": true, "description": "The port of the proxy server."}
+ "scheme": {"type": "string", "optional": true, "enum": ["http", "https", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself. Defaults to 'http'."},
+ "host": {"type": "string", "description": "The URI of the proxy server. This must be an ASCII hostname (in Punycode format). IDNA is not supported, yet."},
+ "port": {"type": "integer", "optional": true, "description": "The port of the proxy server. Defaults to a port that depends on the scheme."}
}
},
{
"id": "ProxyRules",
"type": "object",
- "description": "An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'socksProxy'.",
+ "description": "An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'fallbackProxy'.",
"properties": {
- "singleProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for all per-URL requests (i.e., http, https, and ftp)."},
+ "singleProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for all per-URL requests (that is http, https, and ftp)."},
"proxyForHttp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTP requests."},
"proxyForHttps": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTPS requests."},
"proxyForFtp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for FTP requests."},
- "socksProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for SOCKS requests."},
+ "fallbackProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for everthing else or if any of the specific proxyFor... is not specified."},
"bypassList": {"type": "array", "items": {"type": "string"}, "optional": true, "description": "List of servers to connect to without a proxy server."}
}
},
{
"id": "PacScript",
"type": "object",
- "description": "An object holding proxy auto-config information. Only one of the fields should be non-empty.",
+ "description": "An object holding proxy auto-config information. Exactly one of the fields should be non-empty.",
"properties": {
- "url": {"type": "string", "optional": true, "description": "URL of he PAC file to be used."}
+ "url": {"type": "string", "optional": true, "description": "URL of the PAC file to be used."},
+ "data": {"type": "string", "optional": true, "description": "A PAC script."}
}
},
{
@@ -3725,57 +3754,43 @@
}
}
],
- "functions": [
- {
- "name": "useCustomProxySettings",
- "type": "function",
- "description": "Apply the given proxy configuration.",
- "parameters": [
- {
- "name": "config",
- "$ref": "ProxyConfig"
- },
- {
- "name": "incognito",
- "type": "boolean",
- "description": "If true, the proxy settings apply only to incognito windows. Otherwise they apply to regular windows (and incognito windows if no specific settings are provided for incognito windows)",
- "optional": true
- }
- ]
- },
- {
- "name": "removeCustomProxySettings",
- "type": "function",
- "description": "Remove a custom proxy set by the current extension. This is the inverse of useCustomProxySettings.",
- "parameters": [
+ "properties": {
+ "settings": {
+ "$ref": "Preference",
+ "description": "Proxy settings to be used. The value of this preference is a ProxyConfig object.",
+ "value": [
+ "proxy",
+ {"$ref": "ProxyConfig"},
{
- "name": "incognito",
- "type": "boolean",
- "description": "See incognito parameter of useCustomProxySettings.",
- "optional": true
+ "get": "experimental.proxy.get",
+ "set": "experimental.proxy.set"
}
]
- },
+ }
+ },
+ "events": [
{
- "name": "getCurrentProxySettings",
+ "name": "onProxyError",
"type": "function",
- "description": "Returns the currently effective proxy settings. These can originate from default values, command line options, the extension settings API, policies and possibly other sources in the future.",
+ "description": "Notifies about proxy errors.",
"parameters": [
{
- "name": "incognito",
- "type": "boolean",
- "description": "See incognito parameter of useCustomProxySettings."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "config",
- "$ref": "ProxyConfig",
- "description": "Configuration, not necessarily a literal copy of the configuration passed to useCustomProxySettings."
+ "type": "object",
+ "name": "details",
+ "properties": {
+ "fatal": {
+ "type": "boolean",
+ "description": "If true, the error was fatal and the network transaction was aborted. Otherwise, a direct connection is used instead."
+ },
+ "error": {
+ "type": "string",
+ "description": "The error description."
+ },
+ "details": {
+ "type": "string",
+ "description": "Additional details about the error such as a JavaScript runtime error."
}
- ]
+ }
}
]
}
@@ -4177,7 +4192,7 @@
"type": "object",
"properties": {
"size": { "type": "integer", "description": "A number representing the width and height of the icon. Likely values include (but are not limited to) 128, 48, 24, and 16." },
- "url": { "type": "string", "description": "The url for this icon image." }
+ "url": { "type": "string", "description": "The URL for this icon image. To display a grayscale version of the icon (to indicate that an extension is disabled, for example), append <code>?grayscale=true</code> to the URL." }
}
},
{
@@ -4214,6 +4229,11 @@
"type": "string",
"optional": true
},
+ "homepageUrl": {
+ "description": "The URL of the homepage of this extension or app",
+ "type": "string",
+ "optional": true
+ },
"optionsUrl": {
"description": "The url for the item's options page, if it has one.",
"type": "string"
@@ -4502,5 +4522,125 @@
]
}
]
+ },
+ {
+ "namespace": "experimental.extension",
+ "types": [
+ {
+ "id": "Preference",
+ "type": "object",
+ "customBindings": "Preference",
+ "description": "An object which allows access to a preference.",
+ "functions": [
+ {
+ "name": "get",
+ "type": "function",
+ "description": "Get the setting from the user preferences.",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "What setting to return.",
+ "properties": {
+ "incognito": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether to return the setting that applies to the incognito session only (default false)."
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "Details of the currently effective preference value.",
+ "properties": {
+ "value": {
+ "description": "The value of the preference.",
+ "type": "any"
+ },
+ "levelOfControl": {
+ "description": "One of<br>NotControllable = cannot be controlled by any extension<br>ControlledByOtherExtensions = controlled by extensions with higher precedence<br>ControllableByThisExtension = can be controlled by this extension<br>ControlledByThisExtension = controlled by this extension",
+ "type": "string",
+ "enum": ["NotControllable", "ControlledByOtherExtensions", "ControllableByThisExtension", "ControlledByThisExtension"]
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "set",
+ "type": "function",
+ "description": "Set the setting in the user preferences",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "What setting to change.",
+ "properties": {
+ "value": {
+ "description": "The value of the preference.",
+ "type": "any"
+ },
+ "incognito": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether to modify the setting for the incognito session only (default false)."
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Called after the preference has been set.",
+ "optional": true,
+ "parameters": []
+ }
+ ]
+ },
+ {
+ "name": "clear",
+ "type": "function",
+ "description": "Clears the setting in the user preferences. This way default settings can become effective again.",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "What setting to clear.",
+ "properties": {
+ "incognito": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether to clear the setting for the incognito session only (default false)."
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Called after the preference has been cleared.",
+ "optional": true,
+ "parameters": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "namespace": "experimental.contentSettings.misc",
+ "properties": {
+ "blockThirdPartyCookies": {
+ "$ref": "Preference",
+ "value": ["blockThirdPartyCookies", {"type": "boolean"}],
+ "description": "Whether third party cookies should be blocked. The value of this preference is of type boolean."
+ }
+ }
}
]
diff --git a/chrome/common/extensions/docs/background_pages.html b/chrome/common/extensions/docs/background_pages.html
index 2516499..3df0cc7 100644
--- a/chrome/common/extensions/docs/background_pages.html
+++ b/chrome/common/extensions/docs/background_pages.html
@@ -369,6 +369,14 @@ like this:
...
}</pre>
+<p>
+If you need the browser to start up early—so
+you can display notifications, for example—then
+you might also want to specify the
+<a href="manifest.html#permissions">"background" permission</a>.
+</p>
+
+
<a name="H2-1"></a><h2>Details</h2>
<p>
diff --git a/chrome/common/extensions/docs/cookies.html b/chrome/common/extensions/docs/cookies.html
index 247b976..14c8cf6 100644
--- a/chrome/common/extensions/docs/cookies.html
+++ b/chrome/common/extensions/docs/cookies.html
@@ -1824,7 +1824,8 @@ see <a href="samples.html">Samples</a>.
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
<span>chrome.cookies.remove</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
- <var><span>details</span></var></span>)</div>
+ <var><span>details</span></var></span><span class="optional"><span>, </span><span>function</span>
+ <var><span>callback</span></var></span>)</div>
<div class="description">
<p class="todo" style="display: none; ">Undocumented.</p>
@@ -2102,6 +2103,76 @@ see <a href="samples.html">Samples</a>.
</dd>
</div>
+ </div><div>
+ <div>
+ <dt>
+ <var>callback</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>function</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <dd style="display: none; ">
+ Description of this parameter from the json schema.
+ </dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
</div>
</dl>
@@ -2115,10 +2186,10 @@ see <a href="samples.html">Samples</a>.
</dl>
<!-- CALLBACK -->
- <div style="display: none; ">
+ <div>
<div>
<h4>Callback function</h4>
- <p>
+ <p style="display: none; ">
The callback <em>parameter</em> should specify a function
that looks like this:
</p>
@@ -2128,11 +2199,277 @@ see <a href="samples.html">Samples</a>.
</p>
<!-- Note: intentionally longer 80 columns -->
- <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
+ <pre>function(<span>object details</span>) <span class="subdued">{...}</span>;</pre>
<dl>
<div>
<div>
- </div>
+ <dt>
+ <var>details</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>object</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Contains details about the cookie that's been removed. If removal failed for any reason, this will be "null", and "chrome.extension.lastError" will be set.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>url</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>string</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The URL associated with the cookie that's been removed.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>name</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>string</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The name of the cookie that's been removed.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>storeId</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>string</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The ID of the cookie store from which the cookie was removed.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
</div>
</dl>
</div>
@@ -2154,7 +2491,8 @@ see <a href="samples.html">Samples</a>.
<div class="summary"><span style="display: none; ">void</span>
<!-- Note: intentionally longer 80 columns -->
<span>chrome.cookies.set</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
- <var><span>details</span></var></span>)</div>
+ <var><span>details</span></var></span><span class="optional"><span>, </span><span>function</span>
+ <var><span>callback</span></var></span>)</div>
<div class="description">
<p class="todo" style="display: none; ">Undocumented.</p>
@@ -2840,6 +3178,76 @@ see <a href="samples.html">Samples</a>.
</dd>
</div>
+ </div><div>
+ <div>
+ <dt>
+ <var>callback</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>function</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <dd style="display: none; ">
+ Description of this parameter from the json schema.
+ </dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
</div>
</dl>
@@ -2853,10 +3261,10 @@ see <a href="samples.html">Samples</a>.
</dl>
<!-- CALLBACK -->
- <div style="display: none; ">
+ <div>
<div>
<h4>Callback function</h4>
- <p>
+ <p style="display: none; ">
The callback <em>parameter</em> should specify a function
that looks like this:
</p>
@@ -2866,11 +3274,76 @@ see <a href="samples.html">Samples</a>.
</p>
<!-- Note: intentionally longer 80 columns -->
- <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
+ <pre>function(<span>Cookie cookie</span>) <span class="subdued">{...}</span>;</pre>
<dl>
<div>
<div>
- </div>
+ <dt>
+ <var>cookie</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span>
+ <a href="cookies.html#type-Cookie">Cookie</a>
+ </span>
+ <span style="display: none; ">
+ <span>
+ array of <span><span></span></span>
+ </span>
+ <span>paramType</span>
+ <span></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "chrome.extension.lastError" will be set.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
</div>
</dl>
</div>
diff --git a/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png b/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png
index 9a79a46..84c4be3 100644
--- a/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png
+++ b/chrome/common/extensions/docs/examples/api/bookmarks/basic/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png
index 9a79a46..84c4be3 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png b/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png
index d145964..a38a537 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/print/print_16x16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png
index 9a79a46..84c4be3 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon1.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png
index 8d3f710..9bb6f33 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon2.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png
index 2d9dec3..1659dbf 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon3.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png
index 896fc36..2e5aeee 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon4.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png
index a5afa25..b4eea57 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/icon5.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png b/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png
index 1f1c906..4924db1 100644
--- a/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png
+++ b/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip b/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip
index af4689f..6b6bb81 100644
--- a/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip
+++ b/chrome/common/extensions/docs/examples/api/contextMenus/basic.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/cookies.zip b/chrome/common/extensions/docs/examples/api/cookies.zip
index 561ac09..cb167fc 100644
--- a/chrome/common/extensions/docs/examples/api/cookies.zip
+++ b/chrome/common/extensions/docs/examples/api/cookies.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/cookies/cookie.png b/chrome/common/extensions/docs/examples/api/cookies/cookie.png
index ca72eca..0f78760 100644
--- a/chrome/common/extensions/docs/examples/api/cookies/cookie.png
+++ b/chrome/common/extensions/docs/examples/api/cookies/cookie.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png b/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png
index 9a79a46..84c4be3 100644
--- a/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png
+++ b/chrome/common/extensions/docs/examples/api/i18n/getMessage/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png
index 1c961db..d733b1e 100644
--- a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png
+++ b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png
index a10636f..dcc5c14 100644
--- a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png
+++ b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png
index 32f265a..01e0aa8 100644
--- a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png
+++ b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-19.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png
index bee88b7..3af1eb8 100644
--- a/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png
+++ b/chrome/common/extensions/docs/examples/api/idle/idle_simple/sample-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png
index a233154..98f5b50 100644
--- a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png
+++ b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png
index 86f3b3c..2258238 100644
--- a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png
+++ b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png
index e84dc86..dfe3ae1 100644
--- a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png
+++ b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-19.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png
index d7f2324..d61dea6 100644
--- a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png
+++ b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/sandwich-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png b/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png
index 7889ac0..107d6e7 100644
--- a/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png
+++ b/chrome/common/extensions/docs/examples/api/messaging/timer/clock.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/notifications.zip b/chrome/common/extensions/docs/examples/api/notifications.zip
index 46af038..9685730 100644
--- a/chrome/common/extensions/docs/examples/api/notifications.zip
+++ b/chrome/common/extensions/docs/examples/api/notifications.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/notifications/128.png b/chrome/common/extensions/docs/examples/api/notifications/128.png
index 7013aa9..8cc7c37 100644
--- a/chrome/common/extensions/docs/examples/api/notifications/128.png
+++ b/chrome/common/extensions/docs/examples/api/notifications/128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/notifications/16.png b/chrome/common/extensions/docs/examples/api/notifications/16.png
index 669c791..4d38399 100644
--- a/chrome/common/extensions/docs/examples/api/notifications/16.png
+++ b/chrome/common/extensions/docs/examples/api/notifications/16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/notifications/48.png b/chrome/common/extensions/docs/examples/api/notifications/48.png
index 8a151ad..1e9eb41 100644
--- a/chrome/common/extensions/docs/examples/api/notifications/48.png
+++ b/chrome/common/extensions/docs/examples/api/notifications/48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/notifications/64.png b/chrome/common/extensions/docs/examples/api/notifications/64.png
index 347e28f..d87bbbb 100644
--- a/chrome/common/extensions/docs/examples/api/notifications/64.png
+++ b/chrome/common/extensions/docs/examples/api/notifications/64.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png
index c7e114f..a463186 100644
--- a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png
+++ b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png
index 23b34a0..e2d5d3a 100644
--- a/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png
+++ b/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/icon-16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png
index a233154..98f5b50 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png
index e84dc86..dfe3ae1 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-19.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png
index d7f2324..d61dea6 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/sandwich-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png
index fbfe538..0734990 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png
index 91679f0..9c3fa8f 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-19.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png
index 59e9935..0574e0e 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/icon-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png
index 9a79a46..84c4be3 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon1.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png
index 8d3f710..9bb6f33 100644
--- a/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png
+++ b/chrome/common/extensions/docs/examples/api/pageAction/set_icon/icon2.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png b/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png
index 9a79a46..84c4be3 100644
--- a/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png
+++ b/chrome/common/extensions/docs/examples/api/processes/process_monitor/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png b/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png
index 9a79a46..84c4be3 100644
--- a/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png
+++ b/chrome/common/extensions/docs/examples/api/processes/show_tabs/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png b/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png
index be26c39..687525f 100644
--- a/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png
+++ b/chrome/common/extensions/docs/examples/api/tabs/screenshot/camera.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png
index 00bea8e..a083b58 100644
--- a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png
+++ b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png
index 2d8f727..7defec6 100644
--- a/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png
+++ b/chrome/common/extensions/docs/examples/api/windows/merge_windows/merge_windows_48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/app_launcher.zip b/chrome/common/extensions/docs/examples/extensions/app_launcher.zip
index 6f71c38..432b93e 100644
--- a/chrome/common/extensions/docs/examples/extensions/app_launcher.zip
+++ b/chrome/common/extensions/docs/examples/extensions/app_launcher.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png b/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png
index 046ee42..fb40a52 100644
--- a/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/app_launcher/browser_action_icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png b/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png
index 4aa2994..8e64d3d 100644
--- a/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/app_launcher/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/benchmark.zip b/chrome/common/extensions/docs/examples/extensions/benchmark.zip
index 3370dc1..3623358 100644
--- a/chrome/common/extensions/docs/examples/extensions/benchmark.zip
+++ b/chrome/common/extensions/docs/examples/extensions/benchmark.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/buildbot.zip b/chrome/common/extensions/docs/examples/extensions/buildbot.zip
index 472d88e..b873501 100644
--- a/chrome/common/extensions/docs/examples/extensions/buildbot.zip
+++ b/chrome/common/extensions/docs/examples/extensions/buildbot.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png b/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png
index cc9fb60..8c07cf8 100644
--- a/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png
+++ b/chrome/common/extensions/docs/examples/extensions/buildbot/chromium.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png b/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png
index b3c3474..691d382 100644
--- a/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/buildbot/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/calendar.zip b/chrome/common/extensions/docs/examples/extensions/calendar.zip
index addfe53..ba1b874 100644
--- a/chrome/common/extensions/docs/examples/extensions/calendar.zip
+++ b/chrome/common/extensions/docs/examples/extensions/calendar.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/chrome_search.zip b/chrome/common/extensions/docs/examples/extensions/chrome_search.zip
index 81693c0..0095c3d 100644
--- a/chrome/common/extensions/docs/examples/extensions/chrome_search.zip
+++ b/chrome/common/extensions/docs/examples/extensions/chrome_search.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html b/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html
index e796e77..59c0292 100644
--- a/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html
+++ b/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html
@@ -116,7 +116,7 @@ function search(query, callback) {
query = '"' + query + '"';
var url = "http://www.google.com/codesearch/feeds/search?" +
- "q=package:src.chromium.org/git/chromium.git+" + query;
+ "vert=chromium&as_q=" + query;
var req = new XMLHttpRequest();
req.open("GET", url, true);
@@ -131,7 +131,8 @@ function search(query, callback) {
}
function getUrl(path, line) {
- var url = "http://www.google.com/codesearch/p#hfE6470xZHk/" + path;
+ var url = "http://www.google.com/codesearch/p#OAMlx_jo-ck/" + path
+ "&exact_package=chromium";
if (line)
url += "&l=" + line;
return url;
@@ -161,8 +162,8 @@ chrome.omnibox.onInputEntered.addListener(function(text) {
} else if (text == 'halp') {
// TODO(aa)
} else {
- navigate("http://codesearch.google.com/codesearch?q=" +
- "package:src.chromium.org/git/chromium.git " + text);
+ navigate("http://codesearch.google.com/codesearch?" +
+ "vert=chromium&as_q=" + text);
}
});
</script>
diff --git a/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json b/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json
index 54de17c..a30e25f 100644
--- a/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json
+++ b/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json
@@ -4,6 +4,6 @@
"name": "Chromium Search",
"omnibox": { "keyword" : "src" },
"permissions": [ "tabs", "http://www.google.com/" ],
- "version": "5",
+ "version": "6",
"minimum_chrome_version": "9"
}
diff --git a/chrome/common/extensions/docs/examples/extensions/email_this_page.zip b/chrome/common/extensions/docs/examples/extensions/email_this_page.zip
index ab63c9b..b8ba712 100644
--- a/chrome/common/extensions/docs/examples/extensions/email_this_page.zip
+++ b/chrome/common/extensions/docs/examples/extensions/email_this_page.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png b/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png
index 492bdc6..155ce5c 100644
--- a/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png
+++ b/chrome/common/extensions/docs/examples/extensions/email_this_page/email_16x16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png b/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png
index 4221ec5..581c97a 100644
--- a/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png
+++ b/chrome/common/extensions/docs/examples/extensions/email_this_page/mail_128x128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/fx.zip b/chrome/common/extensions/docs/examples/extensions/fx.zip
index f2c66fa..962f30a 100644
--- a/chrome/common/extensions/docs/examples/extensions/fx.zip
+++ b/chrome/common/extensions/docs/examples/extensions/fx.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/fx/icon.png b/chrome/common/extensions/docs/examples/extensions/fx/icon.png
index c8322c3..ce610f6 100644
--- a/chrome/common/extensions/docs/examples/extensions/fx/icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/fx/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/gdocs.zip b/chrome/common/extensions/docs/examples/extensions/gdocs.zip
index 60b27a4..d3b62bc 100644
--- a/chrome/common/extensions/docs/examples/extensions/gdocs.zip
+++ b/chrome/common/extensions/docs/examples/extensions/gdocs.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png b/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png
index 7afd3fb..eaee07f 100644
--- a/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png
+++ b/chrome/common/extensions/docs/examples/extensions/gdocs/img/icons/trashed.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail.zip b/chrome/common/extensions/docs/examples/extensions/gmail.zip
index 16ad002..19f8b93 100644
--- a/chrome/common/extensions/docs/examples/extensions/gmail.zip
+++ b/chrome/common/extensions/docs/examples/extensions/gmail.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png
index 8d5e256..eec9019 100644
--- a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png
+++ b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_logged_in.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png
index 582d262..ac38fa4 100644
--- a/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png
+++ b/chrome/common/extensions/docs/examples/extensions/gmail/gmail_not_logged_in.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png b/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png
index 1ddc33b..3a33f40 100644
--- a/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png
+++ b/chrome/common/extensions/docs/examples/extensions/gmail/icon_128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo.zip b/chrome/common/extensions/docs/examples/extensions/imageinfo.zip
index 1629fef..7d14906 100644
--- a/chrome/common/extensions/docs/examples/extensions/imageinfo.zip
+++ b/chrome/common/extensions/docs/examples/extensions/imageinfo.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png
index 697fe31..23a7de3 100644
--- a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png
+++ b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png
index 23a5de2..ef3bd02 100644
--- a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png
+++ b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png
index 3769c38..afac004 100644
--- a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png
+++ b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-19.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png
index 22781b7..e3e2754 100644
--- a/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png
+++ b/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/mappy.zip b/chrome/common/extensions/docs/examples/extensions/mappy.zip
index e5c9f3b..097306a 100644
--- a/chrome/common/extensions/docs/examples/extensions/mappy.zip
+++ b/chrome/common/extensions/docs/examples/extensions/mappy.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/mappy/icon.png b/chrome/common/extensions/docs/examples/extensions/mappy/icon.png
index 40ebbff..f48e213 100644
--- a/chrome/common/extensions/docs/examples/extensions/mappy/icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/mappy/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/mappy/marker.png b/chrome/common/extensions/docs/examples/extensions/mappy/marker.png
index 3aa768b..83c8889 100644
--- a/chrome/common/extensions/docs/examples/extensions/mappy/marker.png
+++ b/chrome/common/extensions/docs/examples/extensions/mappy/marker.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/maps_app/128.png b/chrome/common/extensions/docs/examples/extensions/maps_app/128.png
index f8109e1..8148d6c 100644
--- a/chrome/common/extensions/docs/examples/extensions/maps_app/128.png
+++ b/chrome/common/extensions/docs/examples/extensions/maps_app/128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/maps_app/24.png b/chrome/common/extensions/docs/examples/extensions/maps_app/24.png
index 86daf92..0b4433e 100644
--- a/chrome/common/extensions/docs/examples/extensions/maps_app/24.png
+++ b/chrome/common/extensions/docs/examples/extensions/maps_app/24.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news.zip b/chrome/common/extensions/docs/examples/extensions/news.zip
index 7c8d358..d8b6015 100644
--- a/chrome/common/extensions/docs/examples/extensions/news.zip
+++ b/chrome/common/extensions/docs/examples/extensions/news.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png b/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png
index c81c585..c02f12d 100644
--- a/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png
+++ b/chrome/common/extensions/docs/examples/extensions/news/images/buzz.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png b/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png
index 732b36e..4087427 100644
--- a/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/news/images/delete-icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/fb.png b/chrome/common/extensions/docs/examples/extensions/news/images/fb.png
index b6cba93..6298d4f 100644
--- a/chrome/common/extensions/docs/examples/extensions/news/images/fb.png
+++ b/chrome/common/extensions/docs/examples/extensions/news/images/fb.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png b/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png
index 24b0ca7..98fe9b2 100644
--- a/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png
+++ b/chrome/common/extensions/docs/examples/extensions/news/images/news_action.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png b/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png
index 42da406..7d69f79 100644
--- a/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/news/images/news_icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png b/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png
index 111f3f4..278ea7f 100644
--- a/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png
+++ b/chrome/common/extensions/docs/examples/extensions/news/images/twitter.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news_a11y.zip b/chrome/common/extensions/docs/examples/extensions/news_a11y.zip
index 7a98522..33deba2 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_a11y.zip
+++ b/chrome/common/extensions/docs/examples/extensions/news_a11y.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png
index 24b0ca7..98fe9b2 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png
+++ b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_action.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png
index 42da406..7d69f79 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/news_a11y/news_icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n.zip b/chrome/common/extensions/docs/examples/extensions/news_i18n.zip
index 212a07b..d11612a 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_i18n.zip
+++ b/chrome/common/extensions/docs/examples/extensions/news_i18n.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png
index 24b0ca7..98fe9b2 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png
+++ b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_action.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png
index 42da406..7d69f79 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png
+++ b/chrome/common/extensions/docs/examples/extensions/news_i18n/news_icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip b/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip
index a8d23ea..8982836 100644
--- a/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip
+++ b/chrome/common/extensions/docs/examples/extensions/oauth_contacts.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png
index 1a50790..d04874d 100644
--- a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png
+++ b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png
index 73bb72d..123cbf7 100644
--- a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png
+++ b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-off.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png
index 74b1172..4451534 100644
--- a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png
+++ b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-19-on.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png
index 4434c81..6e05a2b 100644
--- a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png
+++ b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-32.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png
index 6b55784..93960b9 100644
--- a/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png
+++ b/chrome/common/extensions/docs/examples/extensions/oauth_contacts/img/icon-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave.zip b/chrome/common/extensions/docs/examples/extensions/wave.zip
index 32f3231..81e5379 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave.zip
+++ b/chrome/common/extensions/docs/examples/extensions/wave.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave/128.png b/chrome/common/extensions/docs/examples/extensions/wave/128.png
index cec8dae..b2ef48c 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave/128.png
+++ b/chrome/common/extensions/docs/examples/extensions/wave/128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave/16.png b/chrome/common/extensions/docs/examples/extensions/wave/16.png
index 80a6968..6b82d6a 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave/16.png
+++ b/chrome/common/extensions/docs/examples/extensions/wave/16.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave/48.png b/chrome/common/extensions/docs/examples/extensions/wave/48.png
index 06c8adc..0ec2b62 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave/48.png
+++ b/chrome/common/extensions/docs/examples/extensions/wave/48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave/64.png b/chrome/common/extensions/docs/examples/extensions/wave/64.png
index 2090cfb..11a31b4 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave/64.png
+++ b/chrome/common/extensions/docs/examples/extensions/wave/64.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave/authorized.png b/chrome/common/extensions/docs/examples/extensions/wave/authorized.png
index 80a6968..6b82d6a 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave/authorized.png
+++ b/chrome/common/extensions/docs/examples/extensions/wave/authorized.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave/logo.png b/chrome/common/extensions/docs/examples/extensions/wave/logo.png
index 6593b01..0004103 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave/logo.png
+++ b/chrome/common/extensions/docs/examples/extensions/wave/logo.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png b/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png
index dc8f763..eef5b09 100644
--- a/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png
+++ b/chrome/common/extensions/docs/examples/extensions/wave/unauthorized.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png
index 1c961db..d733b1e 100644
--- a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png
+++ b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png
index bee88b7..3af1eb8 100644
--- a/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png
+++ b/chrome/common/extensions/docs/examples/howto/contentscript_xhr/sample-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png
index 105443f..de390dc 100644
--- a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png
+++ b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-128.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png
index b91a8b8..08c2b2e 100644
--- a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png
+++ b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-19.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png
index 391f064..80395b8 100644
--- a/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png
+++ b/chrome/common/extensions/docs/examples/tutorials/analytics/analytics-extension-icon-48.png
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png b/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png
index 103ff36..0fe39b0 100644
--- a/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png
+++ b/chrome/common/extensions/docs/examples/tutorials/getstarted/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/experimental.contentSettings.misc.html b/chrome/common/extensions/docs/experimental.contentSettings.misc.html
new file mode 100644
index 0000000..61631d8
--- /dev/null
+++ b/chrome/common/extensions/docs/experimental.contentSettings.misc.html
@@ -0,0 +1,574 @@
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
+ 1) The <head> information in this page is significant, should be uniform
+ across api docs and should be edited only with knowledge of the
+ templating mechanism.
+ 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
+ browser, it will be re-generated from the template, json schema and
+ authored overview content.
+ 4) The <body>.innerHTML is also generated by an offline step so that this
+ page may easily be indexed by search engines.
+--><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css">
+ <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
+ <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js">
+ </script>
+ <script type="text/javascript" src="js/api_page_generator.js"></script>
+ <script type="text/javascript" src="js/bootstrap.js"></script>
+ <script type="text/javascript" src="js/sidebar.js"></script>
+ <title>chrome.experimental.contentSettings.misc - Google Chrome Extensions - Google Code</title></head>
+ <body> <div id="gc-container" class="labs">
+ <div id="devModeWarning">
+ 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.
+ </div>
+ <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
+ <!-- In particular, sub-templates that recurse, must be used by allowing
+ jstemplate to make a copy of the template in this section which
+ are not operated on by way of the jsskip="true" -->
+ <div style="display:none">
+
+ <!-- VALUE -->
+ <div id="valueTemplate">
+ <dt>
+ <var>paramName</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum">enumerated</span>
+ <span id="typeTemplate">
+ <span>
+ <a> Type</a>
+ </span>
+ <span>
+ <span>
+ array of <span><span></span></span>
+ </span>
+ <span>paramType</span>
+ <span></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <dd>
+ Description of this parameter from the json schema.
+ </dd>
+ <dd>
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd>
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd>
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd>
+ <div></div>
+ </dd>
+
+ </div> <!-- /VALUE -->
+
+ <div id="functionParametersTemplate">
+ <h5>Parameters</h5>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div> <!-- /SUBTEMPLATES -->
+
+ <a id="top"></a>
+ <div id="skipto">
+ <a href="#gc-pagecontent">Skip to page content</a>
+ <a href="#gc-toc">Skip to main navigation</a>
+ </div>
+ <!-- API HEADER -->
+ <table id="header" width="100%" cellspacing="0" border="0">
+ <tbody><tr>
+ <td valign="middle"><a href="http://code.google.com/"><img src="images/code_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:0; margin:0;"></a></td>
+ <td valign="middle" width="100%" style="padding-left:0.6em;">
+ <form action="http://www.google.com/cse" id="cse" style="margin-top:0.5em">
+ <div id="gsc-search-box">
+ <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno">
+ <input type="hidden" name="ie" value="UTF-8">
+ <input type="text" name="q" value="" size="55">
+ <input class="gsc-search-button" type="submit" name="sa" value="Search">
+ <br>
+ <span class="greytext">e.g. "page action" or "tabs"</span>
+ </div>
+ </form>
+
+ <script type="text/javascript" src="http://www.google.com/jsapi"></script>
+ <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
+ <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse&amp;t13n_langs=en"></script>
+ <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse&amp;lang=en"></script>
+ </td>
+ </tr>
+ </tbody></table>
+
+ <div id="codesiteContent" class="">
+
+ <a id="gc-topnav-anchor"></a>
+ <div id="gc-topnav">
+ <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Labs</a>)</h1>
+ <ul id="home" class="gc-topnav-tabs">
+ <li id="home_link">
+ <a href="index.html" title="Google Chrome Extensions home page">Home</a>
+ </li>
+ <li id="docs_link">
+ <a href="docs.html" title="Official Google Chrome Extensions documentation">Docs</a>
+ </li>
+ <li id="faq_link">
+ <a href="faq.html" title="Answers to frequently asked questions about Google Chrome Extensions">FAQ</a>
+ </li>
+ <li id="samples_link">
+ <a href="samples.html" title="Sample extensions (with source code)">Samples</a>
+ </li>
+ <li id="group_link">
+ <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions" title="Google Chrome Extensions developer forum">Group</a>
+ </li>
+ </ul>
+ </div> <!-- end gc-topnav -->
+
+ <div class="g-section g-tpl-170">
+ <!-- SIDENAV -->
+ <div class="g-unit g-first" id="gc-toc">
+ <ul>
+ <li><a href="getstarted.html">Getting Started</a></li>
+ <li><a href="overview.html">Overview</a></li>
+ <li><a href="whats_new.html">What's New?</a></li>
+ <li><h2><a href="devguide.html">Developer's Guide</a></h2>
+ <ul>
+ <li>Browser UI
+ <ul>
+ <li><a href="browserAction.html">Browser Actions</a></li>
+ <li><a href="contextMenus.html">Context Menus</a></li>
+ <li><a href="notifications.html">Desktop Notifications</a></li>
+ <li><a href="omnibox.html">Omnibox</a></li>
+ <li><a href="options.html">Options Pages</a></li>
+ <li><a href="override.html">Override Pages</a></li>
+ <li><a href="pageAction.html">Page Actions</a></li>
+ </ul>
+ </li>
+ <li>Browser Interaction
+ <ul>
+ <li><a href="bookmarks.html">Bookmarks</a></li>
+ <li><a href="cookies.html">Cookies</a></li>
+ <li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
+ <li><a href="management.html">Management</a></li>
+ <li><a href="tabs.html">Tabs</a></li>
+ <li><a href="windows.html">Windows</a></li>
+ </ul>
+ </li>
+ <li>Implementation
+ <ul>
+ <li><a href="a11y.html">Accessibility</a></li>
+ <li><a href="background_pages.html">Background Pages</a></li>
+ <li><a href="content_scripts.html">Content Scripts</a></li>
+ <li><a href="xhr.html">Cross-Origin XHR</a></li>
+ <li><a href="idle.html">Idle</a></li>
+ <li><a href="i18n.html">Internationalization</a></li>
+ <li><a href="messaging.html">Message Passing</a></li>
+ <li><a href="npapi.html">NPAPI Plugins</a></li>
+ </ul>
+ </li>
+ <li>Finishing
+ <ul>
+ <li><a href="hosting.html">Hosting</a></li>
+ <li><a href="external_extensions.html">Other Deployment Options</a></li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li><h2><a href="apps.html">Packaged Apps</a></h2></li>
+ <li><h2><a href="tutorials.html">Tutorials</a></h2>
+ <ul>
+ <li><a href="tut_debugging.html">Debugging</a></li>
+ <li><a href="tut_analytics.html">Google Analytics</a></li>
+ <li><a href="tut_oauth.html">OAuth</a></li>
+ </ul>
+ </li>
+ <li><h2>Reference</h2>
+ <ul>
+ <li>Formats
+ <ul>
+ <li><a href="manifest.html">Manifest Files</a></li>
+ <li><a href="match_patterns.html">Match Patterns</a></li>
+ </ul>
+ </li>
+ <li><a href="permission_warnings.html">Permission Warnings</a></li>
+ <li><a href="api_index.html">chrome.* APIs</a></li>
+ <li><a href="api_other.html">Other APIs</a></li>
+ </ul>
+ </li>
+ <li><h2><a href="samples.html">Samples</a></h2></li>
+ <div class="line"> </div>
+ <li><h2>More</h2>
+ <ul>
+ <li><a href="http://code.google.com/chrome/webstore/docs/index.html">Chrome Web Store</a></li>
+ <li><a href="http://code.google.com/chrome/apps/docs/developers_guide.html">Hosted Apps</a></li>
+ <li><a href="themes.html">Themes</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <script>
+ initToggles();
+ </script>
+
+ <div class="g-unit" id="gc-pagecontent">
+ <div id="pageTitle">
+ <h1 class="page_title">chrome.experimental.contentSettings.misc</h1>
+ </div>
+ <!-- TABLE OF CONTENTS -->
+ <div id="toc">
+ <h2>Contents</h2>
+ <ol>
+ <li style="display: none; ">
+ <a>h2Name</a>
+ <ol>
+ <li>
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li>
+ <li>
+ <a href="#apiReference">API reference: chrome.experimental.contentSettings.misc</a>
+ <ol>
+ <li>
+ <a href="#properties">Properties</a>
+ <ol>
+ <li>
+ <a href="#property-blockThirdPartyCookies">blockThirdPartyCookies</a>
+ </li>
+ </ol>
+ </li>
+ <li style="display: none; ">
+ <a>Methods</a>
+ <ol>
+ <li>
+ <a href="#method-anchor">methodName</a>
+ </li>
+ </ol>
+ </li>
+ <li style="display: none; ">
+ <a>Events</a>
+ <ol>
+ <li>
+ <a href="#event-anchor">eventName</a>
+ </li>
+ </ol>
+ </li>
+ <li style="display: none; ">
+ <a href="#types">Types</a>
+ <ol>
+ <li>
+ <a href="#id-anchor">id</a>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ </div>
+ <!-- /TABLE OF CONTENTS -->
+
+ <!-- Standard content lead-in for experimental API pages -->
+ <p id="classSummary">
+ For information on how to use experimental APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
+ </p>
+
+ <!-- STATIC CONTENT PLACEHOLDER -->
+ <div id="static"></div>
+
+ <!-- API PAGE -->
+ <div class="apiPage">
+ <a name="apiReference"></a>
+ <h2>API reference: chrome.experimental.contentSettings.misc</h2>
+
+ <!-- PROPERTIES -->
+ <div class="apiGroup">
+ <a name="properties"></a>
+ <h3 id="properties">Properties</h3>
+
+ <div>
+ <a name="property-blockThirdPartyCookies"></a>
+ <h4>blockThirdPartyCookies</h4>
+ <div class="summary">
+ <!-- Note: intentionally longer 80 columns -->
+ <span>chrome.experimental.contentSettings.misc.</span><span>blockThirdPartyCookies</span>
+ </div>
+ <div>
+ <dt>
+ <var>blockThirdPartyCookies</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span>
+ <a href="experimental.extension.html#type-Preference">Preference</a>
+ </span>
+ <span style="display: none; ">
+ <span>
+ array of <span><span></span></span>
+ </span>
+ <span>paramType</span>
+ <span></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Whether third party cookies should be blocked. The value of this preference is of type boolean.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+
+ </div> <!-- /apiGroup -->
+
+ <!-- METHODS -->
+ <div id="methodsTemplate" class="apiGroup" style="display: none; ">
+ <a></a>
+ <h3>Methods</h3>
+
+ <!-- iterates over all functions -->
+ <div class="apiItem">
+ <a></a> <!-- method-anchor -->
+ <h4>method name</h4>
+
+ <div class="summary"><span>void</span>
+ <!-- Note: intentionally longer 80 columns -->
+ <span>chrome.module.methodName</span>(<span><span>, </span><span></span>
+ <var><span></span></var></span>)</div>
+
+ <div class="description">
+ <p class="todo">Undocumented.</p>
+ <p>
+ A description from the json schema def of the function goes here.
+ </p>
+
+ <!-- PARAMETERS -->
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- RETURNS -->
+ <h4>Returns</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- CALLBACK -->
+ <div>
+ <div>
+ <h4>Callback function</h4>
+ <p>
+ The callback <em>parameter</em> should specify a function
+ that looks like this:
+ </p>
+ <p>
+ If you specify the <em>callback</em> parameter, it should
+ specify a function that looks like this:
+ </p>
+
+ <!-- Note: intentionally longer 80 columns -->
+ <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div>
+
+ <!-- MIN_VERSION -->
+ <p>
+ This function was added in version <b><span></span></b>.
+ If you require this function, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </p>
+ </div> <!-- /description -->
+
+ </div> <!-- /apiItem -->
+
+ </div> <!-- /apiGroup -->
+
+ <!-- EVENTS -->
+ <div id="eventsTemplate" class="apiGroup" style="display: none; ">
+ <a></a>
+ <h3>Events</h3>
+ <!-- iterates over all events -->
+ <div class="apiItem">
+ <a></a>
+ <h4>event name</h4>
+
+ <div class="summary">
+ <!-- Note: intentionally longer 80 columns -->
+ <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);
+ </div>
+
+ <div class="description">
+ <p class="todo">Undocumented.</p>
+ <p>
+ A description from the json schema def of the event goes here.
+ </p>
+
+ <!-- PARAMETERS -->
+ <div>
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div> <!-- /decription -->
+
+ </div> <!-- /apiItem -->
+
+ </div> <!-- /apiGroup -->
+
+ <!-- TYPES -->
+ <div class="apiGroup" style="display: none; ">
+ <a name="types"></a>
+ <h3 id="types">Types</h3>
+
+ <!-- iterates over all types -->
+ <div class="apiItem">
+ <a></a>
+ <h4>type name</h4>
+
+ <div>
+ </div>
+
+ </div> <!-- /apiItem -->
+
+ </div> <!-- /apiGroup -->
+
+ </div> <!-- /apiPage -->
+ </div> <!-- /gc-pagecontent -->
+ </div> <!-- /g-section -->
+ </div> <!-- /codesiteContent -->
+ <div id="gc-footer" --="">
+ <div class="text">
+ <p>
+ Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>,
+ the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons
+ Attribution 3.0 License</a>, and code samples are licensed under the
+ <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>.
+ </p>
+ <p>
+ ©2011 Google
+ </p>
+
+<!-- begin analytics -->
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+ // chrome doc tracking
+ try {
+ var engdocs = _gat._getTracker("YT-10763712-2");
+ engdocs._trackPageview();
+ } catch(err) {}
+
+ // code.google.com site-wide tracking
+ try {
+ _uacct="UA-18071-1";
+ _uanchor=1;
+ _uff=0;
+ urchinTracker();
+ }
+ catch(e) {/* urchinTracker not available. */}
+</script>
+<!-- end analytics -->
+ </div>
+ </div> <!-- /gc-footer -->
+ </div> <!-- /gc-container -->
+</body></html>
diff --git a/chrome/common/extensions/docs/experimental.extension.html b/chrome/common/extensions/docs/experimental.extension.html
new file mode 100644
index 0000000..4d203ae
--- /dev/null
+++ b/chrome/common/extensions/docs/experimental.extension.html
@@ -0,0 +1,1638 @@
+<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
+ 1) The <head> information in this page is significant, should be uniform
+ across api docs and should be edited only with knowledge of the
+ templating mechanism.
+ 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
+ browser, it will be re-generated from the template, json schema and
+ authored overview content.
+ 4) The <body>.innerHTML is also generated by an offline step so that this
+ page may easily be indexed by search engines.
+--><html xmlns="http://www.w3.org/1999/xhtml"><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css">
+ <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
+ <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js">
+ </script>
+ <script type="text/javascript" src="js/api_page_generator.js"></script>
+ <script type="text/javascript" src="js/bootstrap.js"></script>
+ <script type="text/javascript" src="js/sidebar.js"></script>
+ <title>chrome.experimental.extension - Google Chrome Extensions - Google Code</title></head>
+ <body> <div id="gc-container" class="labs">
+ <div id="devModeWarning">
+ 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.
+ </div>
+ <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
+ <!-- In particular, sub-templates that recurse, must be used by allowing
+ jstemplate to make a copy of the template in this section which
+ are not operated on by way of the jsskip="true" -->
+ <div style="display:none">
+
+ <!-- VALUE -->
+ <div id="valueTemplate">
+ <dt>
+ <var>paramName</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum">enumerated</span>
+ <span id="typeTemplate">
+ <span>
+ <a> Type</a>
+ </span>
+ <span>
+ <span>
+ array of <span><span></span></span>
+ </span>
+ <span>paramType</span>
+ <span></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <dd>
+ Description of this parameter from the json schema.
+ </dd>
+ <dd>
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd>
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd>
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd>
+ <div></div>
+ </dd>
+
+ </div> <!-- /VALUE -->
+
+ <div id="functionParametersTemplate">
+ <h5>Parameters</h5>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div> <!-- /SUBTEMPLATES -->
+
+ <a id="top"></a>
+ <div id="skipto">
+ <a href="#gc-pagecontent">Skip to page content</a>
+ <a href="#gc-toc">Skip to main navigation</a>
+ </div>
+ <!-- API HEADER -->
+ <table id="header" width="100%" cellspacing="0" border="0">
+ <tbody><tr>
+ <td valign="middle"><a href="http://code.google.com/"><img src="images/code_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:0; margin:0;"></a></td>
+ <td valign="middle" width="100%" style="padding-left:0.6em;">
+ <form action="http://www.google.com/cse" id="cse" style="margin-top:0.5em">
+ <div id="gsc-search-box">
+ <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno">
+ <input type="hidden" name="ie" value="UTF-8">
+ <input type="text" name="q" value="" size="55">
+ <input class="gsc-search-button" type="submit" name="sa" value="Search">
+ <br>
+ <span class="greytext">e.g. "page action" or "tabs"</span>
+ </div>
+ </form>
+
+ <script type="text/javascript" src="http://www.google.com/jsapi"></script>
+ <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
+ <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse&amp;t13n_langs=en"></script>
+ <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse&amp;lang=en"></script>
+ </td>
+ </tr>
+ </tbody></table>
+
+ <div id="codesiteContent" class="">
+
+ <a id="gc-topnav-anchor"></a>
+ <div id="gc-topnav">
+ <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Labs</a>)</h1>
+ <ul id="home" class="gc-topnav-tabs">
+ <li id="home_link">
+ <a href="index.html" title="Google Chrome Extensions home page">Home</a>
+ </li>
+ <li id="docs_link">
+ <a href="docs.html" title="Official Google Chrome Extensions documentation">Docs</a>
+ </li>
+ <li id="faq_link">
+ <a href="faq.html" title="Answers to frequently asked questions about Google Chrome Extensions">FAQ</a>
+ </li>
+ <li id="samples_link">
+ <a href="samples.html" title="Sample extensions (with source code)">Samples</a>
+ </li>
+ <li id="group_link">
+ <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions" title="Google Chrome Extensions developer forum">Group</a>
+ </li>
+ </ul>
+ </div> <!-- end gc-topnav -->
+
+ <div class="g-section g-tpl-170">
+ <!-- SIDENAV -->
+ <div class="g-unit g-first" id="gc-toc">
+ <ul>
+ <li><a href="getstarted.html">Getting Started</a></li>
+ <li><a href="overview.html">Overview</a></li>
+ <li><a href="whats_new.html">What's New?</a></li>
+ <li><h2><a href="devguide.html">Developer's Guide</a></h2>
+ <ul>
+ <li>Browser UI
+ <ul>
+ <li><a href="browserAction.html">Browser Actions</a></li>
+ <li><a href="contextMenus.html">Context Menus</a></li>
+ <li><a href="notifications.html">Desktop Notifications</a></li>
+ <li><a href="omnibox.html">Omnibox</a></li>
+ <li><a href="options.html">Options Pages</a></li>
+ <li><a href="override.html">Override Pages</a></li>
+ <li><a href="pageAction.html">Page Actions</a></li>
+ </ul>
+ </li>
+ <li>Browser Interaction
+ <ul>
+ <li><a href="bookmarks.html">Bookmarks</a></li>
+ <li><a href="cookies.html">Cookies</a></li>
+ <li><a href="events.html">Events</a></li>
+ <li><a href="history.html">History</a></li>
+ <li><a href="management.html">Management</a></li>
+ <li><a href="tabs.html">Tabs</a></li>
+ <li><a href="windows.html">Windows</a></li>
+ </ul>
+ </li>
+ <li>Implementation
+ <ul>
+ <li><a href="a11y.html">Accessibility</a></li>
+ <li><a href="background_pages.html">Background Pages</a></li>
+ <li><a href="content_scripts.html">Content Scripts</a></li>
+ <li><a href="xhr.html">Cross-Origin XHR</a></li>
+ <li><a href="idle.html">Idle</a></li>
+ <li><a href="i18n.html">Internationalization</a></li>
+ <li><a href="messaging.html">Message Passing</a></li>
+ <li><a href="npapi.html">NPAPI Plugins</a></li>
+ </ul>
+ </li>
+ <li>Finishing
+ <ul>
+ <li><a href="hosting.html">Hosting</a></li>
+ <li><a href="external_extensions.html">Other Deployment Options</a></li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li><h2><a href="apps.html">Packaged Apps</a></h2></li>
+ <li><h2><a href="tutorials.html">Tutorials</a></h2>
+ <ul>
+ <li><a href="tut_debugging.html">Debugging</a></li>
+ <li><a href="tut_analytics.html">Google Analytics</a></li>
+ <li><a href="tut_oauth.html">OAuth</a></li>
+ </ul>
+ </li>
+ <li><h2>Reference</h2>
+ <ul>
+ <li>Formats
+ <ul>
+ <li><a href="manifest.html">Manifest Files</a></li>
+ <li><a href="match_patterns.html">Match Patterns</a></li>
+ </ul>
+ </li>
+ <li><a href="permission_warnings.html">Permission Warnings</a></li>
+ <li><a href="api_index.html">chrome.* APIs</a></li>
+ <li><a href="api_other.html">Other APIs</a></li>
+ </ul>
+ </li>
+ <li><h2><a href="samples.html">Samples</a></h2></li>
+ <div class="line"> </div>
+ <li><h2>More</h2>
+ <ul>
+ <li><a href="http://code.google.com/chrome/webstore/docs/index.html">Chrome Web Store</a></li>
+ <li><a href="http://code.google.com/chrome/apps/docs/developers_guide.html">Hosted Apps</a></li>
+ <li><a href="themes.html">Themes</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <script>
+ initToggles();
+ </script>
+
+ <div class="g-unit" id="gc-pagecontent">
+ <div id="pageTitle">
+ <h1 class="page_title">chrome.experimental.extension</h1>
+ </div>
+ <!-- TABLE OF CONTENTS -->
+ <div id="toc">
+ <h2>Contents</h2>
+ <ol>
+ <li style="display: none; ">
+ <a>h2Name</a>
+ <ol>
+ <li>
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li>
+ <li>
+ <a href="#apiReference">API reference: chrome.experimental.extension</a>
+ <ol>
+ <li style="display: none; ">
+ <a href="#properties">Properties</a>
+ <ol>
+ <li>
+ <a href="#property-anchor">propertyName</a>
+ </li>
+ </ol>
+ </li>
+ <li style="display: none; ">
+ <a>Methods</a>
+ <ol>
+ <li>
+ <a href="#method-anchor">methodName</a>
+ </li>
+ </ol>
+ </li>
+ <li style="display: none; ">
+ <a>Events</a>
+ <ol>
+ <li>
+ <a href="#event-anchor">eventName</a>
+ </li>
+ </ol>
+ </li>
+ <li>
+ <a href="#types">Types</a>
+ <ol>
+ <li>
+ <a href="#type-Preference">Preference</a>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ </div>
+ <!-- /TABLE OF CONTENTS -->
+
+ <!-- Standard content lead-in for experimental API pages -->
+ <p id="classSummary">
+ For information on how to use experimental APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
+ </p>
+
+ <!-- STATIC CONTENT PLACEHOLDER -->
+ <div id="static"></div>
+
+ <!-- API PAGE -->
+ <div class="apiPage">
+ <a name="apiReference"></a>
+ <h2>API reference: chrome.experimental.extension</h2>
+
+ <!-- PROPERTIES -->
+ <div class="apiGroup" style="display: none; ">
+ <a name="properties"></a>
+ <h3 id="properties">Properties</h3>
+
+ <div>
+ <a></a>
+ <h4>getLastError</h4>
+ <div class="summary">
+ <!-- Note: intentionally longer 80 columns -->
+ <span>chrome.extension</span><span>lastError</span>
+ </div>
+ <div>
+ </div>
+ </div>
+
+ </div> <!-- /apiGroup -->
+
+ <!-- METHODS -->
+ <div id="methodsTemplate" class="apiGroup" style="display: none; ">
+ <a></a>
+ <h3>Methods</h3>
+
+ <!-- iterates over all functions -->
+ <div class="apiItem">
+ <a></a> <!-- method-anchor -->
+ <h4>method name</h4>
+
+ <div class="summary"><span>void</span>
+ <!-- Note: intentionally longer 80 columns -->
+ <span>chrome.module.methodName</span>(<span><span>, </span><span></span>
+ <var><span></span></var></span>)</div>
+
+ <div class="description">
+ <p class="todo">Undocumented.</p>
+ <p>
+ A description from the json schema def of the function goes here.
+ </p>
+
+ <!-- PARAMETERS -->
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- RETURNS -->
+ <h4>Returns</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- CALLBACK -->
+ <div>
+ <div>
+ <h4>Callback function</h4>
+ <p>
+ The callback <em>parameter</em> should specify a function
+ that looks like this:
+ </p>
+ <p>
+ If you specify the <em>callback</em> parameter, it should
+ specify a function that looks like this:
+ </p>
+
+ <!-- Note: intentionally longer 80 columns -->
+ <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div>
+
+ <!-- MIN_VERSION -->
+ <p>
+ This function was added in version <b><span></span></b>.
+ If you require this function, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </p>
+ </div> <!-- /description -->
+
+ </div> <!-- /apiItem -->
+
+ </div> <!-- /apiGroup -->
+
+ <!-- EVENTS -->
+ <div id="eventsTemplate" class="apiGroup" style="display: none; ">
+ <a></a>
+ <h3>Events</h3>
+ <!-- iterates over all events -->
+ <div class="apiItem">
+ <a></a>
+ <h4>event name</h4>
+
+ <div class="summary">
+ <!-- Note: intentionally longer 80 columns -->
+ <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);
+ </div>
+
+ <div class="description">
+ <p class="todo">Undocumented.</p>
+ <p>
+ A description from the json schema def of the event goes here.
+ </p>
+
+ <!-- PARAMETERS -->
+ <div>
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div> <!-- /decription -->
+
+ </div> <!-- /apiItem -->
+
+ </div> <!-- /apiGroup -->
+
+ <!-- TYPES -->
+ <div class="apiGroup">
+ <a name="types"></a>
+ <h3 id="types">Types</h3>
+
+ <!-- iterates over all types -->
+ <div class="apiItem">
+ <a name="type-Preference"></a>
+ <h4>Preference</h4>
+
+ <div>
+ <dt>
+ <var style="display: none; ">paramName</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>object</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>An object which allows access to a preference.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd>
+ <div class="apiGroup" style="">
+ <a name="global-Preference-methods"></a>
+ <h3>Methods of Preference</h3>
+
+ <!-- iterates over all functions -->
+ <div class="apiItem">
+ <a name="method-Preference-clear"></a> <!-- method-anchor -->
+ <h4>clear</h4>
+
+ <div class="summary"><span style="display: none; ">void</span>
+ <!-- Note: intentionally longer 80 columns -->
+ <span>preference.clear</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <var><span>details</span></var></span><span class="optional"><span>, </span><span>function</span>
+ <var><span>callback</span></var></span>)</div>
+
+ <div class="description">
+ <p class="todo" style="display: none; ">Undocumented.</p>
+ <p>Clears the setting in the user preferences. This way default settings can become effective again.</p>
+
+ <!-- PARAMETERS -->
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>details</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>object</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>What setting to clear.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>incognito</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>boolean</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Whether to clear the setting for the incognito session only (default false).</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>callback</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>function</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Called after the preference has been cleared.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+
+ <!-- RETURNS -->
+ <h4 style="display: none; ">Returns</h4>
+ <dl>
+ <div style="display: none; ">
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- CALLBACK -->
+ <div>
+ <div>
+ <h4>Callback function</h4>
+ <p style="display: none; ">
+ The callback <em>parameter</em> should specify a function
+ that looks like this:
+ </p>
+ <p>
+ If you specify the <em>callback</em> parameter, it should
+ specify a function that looks like this:
+ </p>
+
+ <!-- Note: intentionally longer 80 columns -->
+ <pre>function(<span></span>) <span class="subdued">{...}</span>;</pre>
+ <dl>
+ <div style="display: none; ">
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div>
+
+ <!-- MIN_VERSION -->
+ <p style="display: none; ">
+ This function was added in version <b><span></span></b>.
+ If you require this function, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </p>
+ </div> <!-- /description -->
+
+ </div><div class="apiItem">
+ <a name="method-Preference-get"></a> <!-- method-anchor -->
+ <h4>get</h4>
+
+ <div class="summary"><span style="display: none; ">void</span>
+ <!-- Note: intentionally longer 80 columns -->
+ <span>preference.get</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <var><span>details</span></var></span><span class="null"><span>, </span><span>function</span>
+ <var><span>callback</span></var></span>)</div>
+
+ <div class="description">
+ <p class="todo" style="display: none; ">Undocumented.</p>
+ <p>Get the setting from the user preferences.</p>
+
+ <!-- PARAMETERS -->
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>details</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>object</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>What setting to return.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>incognito</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>boolean</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Whether to return the setting that applies to the incognito session only (default false).</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>callback</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>function</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <dd style="display: none; ">
+ Description of this parameter from the json schema.
+ </dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+
+ <!-- RETURNS -->
+ <h4 style="display: none; ">Returns</h4>
+ <dl>
+ <div style="display: none; ">
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- CALLBACK -->
+ <div>
+ <div>
+ <h4>Callback function</h4>
+ <p>
+ The callback <em>parameter</em> should specify a function
+ that looks like this:
+ </p>
+ <p style="display: none; ">
+ If you specify the <em>callback</em> parameter, it should
+ specify a function that looks like this:
+ </p>
+
+ <!-- Note: intentionally longer 80 columns -->
+ <pre>function(<span>object details</span>) <span class="subdued">{...}</span>;</pre>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>details</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>object</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Details of the currently effective preference value.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>value</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>any</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The value of the preference.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>levelOfControl</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>string</span>
+ <span>["NotControllable", "ControlledByOtherExtensions", "ControllableByThisExtension", "ControlledByThisExtension"]</span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>One of<br>NotControllable = cannot be controlled by any extension<br>ControlledByOtherExtensions = controlled by extensions with higher precedence<br>ControllableByThisExtension = can be controlled by this extension<br>ControlledByThisExtension = controlled by this extension</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div>
+
+ <!-- MIN_VERSION -->
+ <p style="display: none; ">
+ This function was added in version <b><span></span></b>.
+ If you require this function, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </p>
+ </div> <!-- /description -->
+
+ </div><div class="apiItem">
+ <a name="method-Preference-set"></a> <!-- method-anchor -->
+ <h4>set</h4>
+
+ <div class="summary"><span style="display: none; ">void</span>
+ <!-- Note: intentionally longer 80 columns -->
+ <span>preference.set</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
+ <var><span>details</span></var></span><span class="optional"><span>, </span><span>function</span>
+ <var><span>callback</span></var></span>)</div>
+
+ <div class="description">
+ <p class="todo" style="display: none; ">Undocumented.</p>
+ <p>Set the setting in the user preferences</p>
+
+ <!-- PARAMETERS -->
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>details</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>object</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>What setting to change.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>value</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>any</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The value of the preference.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>incognito</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>boolean</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Whether to modify the setting for the incognito session only (default false).</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>callback</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>function</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>Called after the preference has been set.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+
+ <!-- RETURNS -->
+ <h4 style="display: none; ">Returns</h4>
+ <dl>
+ <div style="display: none; ">
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- CALLBACK -->
+ <div>
+ <div>
+ <h4>Callback function</h4>
+ <p style="display: none; ">
+ The callback <em>parameter</em> should specify a function
+ that looks like this:
+ </p>
+ <p>
+ If you specify the <em>callback</em> parameter, it should
+ specify a function that looks like this:
+ </p>
+
+ <!-- Note: intentionally longer 80 columns -->
+ <pre>function(<span></span>) <span class="subdued">{...}</span>;</pre>
+ <dl>
+ <div style="display: none; ">
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div>
+
+ <!-- MIN_VERSION -->
+ <p style="display: none; ">
+ This function was added in version <b><span></span></b>.
+ If you require this function, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </p>
+ </div> <!-- /description -->
+
+ </div> <!-- /apiItem -->
+
+ </div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+
+ </div> <!-- /apiItem -->
+
+ </div> <!-- /apiGroup -->
+
+ </div> <!-- /apiPage -->
+ </div> <!-- /gc-pagecontent -->
+ </div> <!-- /g-section -->
+ </div> <!-- /codesiteContent -->
+ <div id="gc-footer" --="">
+ <div class="text">
+ <p>
+ Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>,
+ the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons
+ Attribution 3.0 License</a>, and code samples are licensed under the
+ <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>.
+ </p>
+ <p>
+ ©2011 Google
+ </p>
+
+<!-- begin analytics -->
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+ // chrome doc tracking
+ try {
+ var engdocs = _gat._getTracker("YT-10763712-2");
+ engdocs._trackPageview();
+ } catch(err) {}
+
+ // code.google.com site-wide tracking
+ try {
+ _uacct="UA-18071-1";
+ _uanchor=1;
+ _uff=0;
+ urchinTracker();
+ }
+ catch(e) {/* urchinTracker not available. */}
+</script>
+<!-- end analytics -->
+ </div>
+ </div> <!-- /gc-footer -->
+ </div> <!-- /gc-container -->
+</body></html>
diff --git a/chrome/common/extensions/docs/experimental.html b/chrome/common/extensions/docs/experimental.html
index 80a6919..b7af23f 100644
--- a/chrome/common/extensions/docs/experimental.html
+++ b/chrome/common/extensions/docs/experimental.html
@@ -322,6 +322,8 @@ on the following experimental APIs:
<ul>
<li>
<a href="experimental.clipboard.html">experimental.clipboard</a></li><li>
+ <a href="experimental.contentSettings.misc.html">experimental.contentSettings.misc</a></li><li>
+ <a href="experimental.extension.html">experimental.extension</a></li><li>
<a href="experimental.infobars.html">experimental.infobars</a></li><li>
<a href="experimental.processes.html">experimental.processes</a></li><li>
<a href="experimental.proxy.html">experimental.proxy</a></li><li>
@@ -367,13 +369,26 @@ upload extensions that use experimental APIs.
</pre>
</li>
<li>
- Specify the <b>--enable-experimental-extension-apis</b> flag
- when you launch the browser.
- On Windows, you can do this by modifying
- the properties of the shortcut that you use to launch Google Chrome.
- For example:
+ Enable the experimental API in your browser.
+ You can do this in either of two ways:
+ <ul>
+ <li> Go to <b>chrome://flags</b>,
+ find "Experimental Extension APIs",
+ click its "Enable" link,
+ and restart Chrome.
+ From now on,
+ unless you return to that page and disable experimental APIs,
+ you'll be able to run extensions that use experimental APIs.
+ </li>
+ <li> Specify the <b>--enable-experimental-extension-apis</b> flag
+ each time you launch the browser.
+ On Windows, you can do this by modifying
+ the properties of the shortcut that you use to launch Google Chrome.
+ For example:
<pre><em>path_to_chrome.exe</em> <b>--enable-experimental-extension-apis</b></pre>
+ </li>
+ </ul>
</li>
<li>
diff --git a/chrome/common/extensions/docs/experimental.proxy.html b/chrome/common/extensions/docs/experimental.proxy.html
index 1b1a16c..485e607 100644
--- a/chrome/common/extensions/docs/experimental.proxy.html
+++ b/chrome/common/extensions/docs/experimental.proxy.html
@@ -16,7 +16,7 @@
<script type="text/javascript" src="js/api_page_generator.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/sidebar.js"></script>
- <title>chrome.experimental.proxy - Google Chrome Extensions - Google Code</title></head>
+ <title>Proxy Settings - Google Chrome Extensions - Google Code</title></head>
<body> <div id="gc-container" class="labs">
<div id="devModeWarning">
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.
@@ -251,16 +251,43 @@
<div class="g-unit" id="gc-pagecontent">
<div id="pageTitle">
- <h1 class="page_title">chrome.experimental.proxy</h1>
+ <h1 class="page_title">Proxy Settings</h1>
</div>
<!-- TABLE OF CONTENTS -->
<div id="toc">
<h2>Contents</h2>
<ol>
- <li style="display: none; ">
- <a>h2Name</a>
+ <li>
+ <a href="#manifest">Manifest</a>
+ <ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#description">Objects and properties</a>
<ol>
<li>
+ <a href="#proxy_modes">Proxy modes</a>
+ </li><li>
+ <a href="#proxy_rules">Proxy rules</a>
+ </li><li>
+ <a href="#proxy_server_objects">Proxy server objects</a>
+ </li><li>
+ <a href="#bypass_list">Bypass list</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#precedence">Precedence</a>
+ <ol>
+ <li style="display: none; ">
+ <a>h3Name</a>
+ </li>
+ </ol>
+ </li><li>
+ <a href="#overview-examples">Examples</a>
+ <ol>
+ <li style="display: none; ">
<a>h3Name</a>
</li>
</ol>
@@ -268,31 +295,27 @@
<li>
<a href="#apiReference">API reference: chrome.experimental.proxy</a>
<ol>
- <li style="display: none; ">
+ <li>
<a href="#properties">Properties</a>
<ol>
<li>
- <a href="#property-anchor">propertyName</a>
+ <a href="#property-settings">settings</a>
</li>
</ol>
</li>
- <li>
- <a href="#global-methods">Methods</a>
+ <li style="display: none; ">
+ <a>Methods</a>
<ol>
<li>
- <a href="#method-getCurrentProxySettings">getCurrentProxySettings</a>
- </li><li>
- <a href="#method-removeCustomProxySettings">removeCustomProxySettings</a>
- </li><li>
- <a href="#method-useCustomProxySettings">useCustomProxySettings</a>
+ <a href="#method-anchor">methodName</a>
</li>
</ol>
</li>
- <li style="display: none; ">
- <a>Events</a>
+ <li>
+ <a href="#global-events">Events</a>
<ol>
<li>
- <a href="#event-anchor">eventName</a>
+ <a href="#event-onProxyError">onProxyError</a>
</li>
</ol>
</li>
@@ -317,12 +340,270 @@
<!-- /TABLE OF CONTENTS -->
<!-- Standard content lead-in for experimental API pages -->
- <p id="classSummary">
+ <p id="classSummary" style="display: none; ">
For information on how to use experimental APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
</p>
<!-- STATIC CONTENT PLACEHOLDER -->
- <div id="static"></div>
+ <div id="static"><div id="pageData-name" class="pageData">Proxy Settings</div>
+
+<!-- BEGIN AUTHORED CONTENT -->
+<p id="classSummary">
+Use the <code>chrome.experimental.proxysettings</code> module to manage Chrome's
+proxy settings. This module is still experimental. For information on how to use
+experimental APIs, see the <a href="experimental.html">chrome.experimental.*
+ APIs</a> page.
+</p>
+
+<h2 id="manifest">Manifest</h2>
+<p>You must declare the "proxy" permission
+in the <a href="manifest.html">extension manifest</a>
+to use the proxy settings API.
+For example:</p>
+<pre>{
+ "name": "My extension",
+ ...
+ <b>"permissions": [
+ "experimental", "proxy"
+ ]</b>,
+ ...
+}</pre>
+
+<h2 id="description">Objects and properties</h2>
+
+<p>
+Proxy settings are defined in a
+<a href="#type-ProxyConfig"><code>ProxyConfig</code></a> object. Depending on
+Chrome's proxy settings, the settings may contain
+<a href="#type-ProxyRules"><code>ProxyRules</code></a> or a <a href="#type-PacScript"><code>PacScript</code></a>.
+</p>
+
+<h3 id="proxy_modes">Proxy modes</h3>
+
+<p>
+A ProxyConfig object's <code>mode</code> attribute determines the overall
+behavior of Chrome with regards to proxy usage. It can take the following
+values:
+</p><dl>
+ <dt><code>direct</code></dt>
+ <dd>In <code>direct</code> mode all connections are created directly, without
+ any proxy involved. This mode allows no further parameters in the
+ <code>ProxyConfig</code> object.</dd>
+
+ <dt><code>auto_detect</code></dt>
+ <dd>In <code>auto_detect</code> mode the proxy configuration is determined by
+ a PAC script that can be downloaded at
+ <a href="http://wpad/wpad.dat">http://wpad/wpad.dat</a>.
+ This mode allows no further parameters in the <code>ProxyConfig</code>
+ object.</dd>
+
+ <dt><code>pac_script</code></dt>
+ <dd>In <code>pac_script</code> mode the proxy configuration is determined by
+ a PAC script that is either retrieved from the URL specified in the
+ <a href="#type-PacScript"><code>PacScript</code></a> object or
+ taken literally from the <code>data</code> element specified in the
+ <a href="#type-PacScript"><code>PacScript</code></a> object.
+ Besides this, this mode allows no further parameters in the
+ <code>ProxyConfig</code> object.</dd>
+
+ <dt><code>fixed_servers</code></dt>
+ <dd>In <code>fixed_servers</code> mode the proxy configuration is codified in
+ a <a href="#type-ProxyRules&gt;&lt;code&gt;ProxyRules"><code>ProxyRules</code></a>
+ object. Its structure is described in <a href="#proxy_rules">Proxy rules</a>.
+ Besides this, the <code>fixed_servers</code> mode allows no further parameters
+ in the <code>ProxyConfig</code> object.</dd>
+
+ <dt><code>system</code></dt>
+ <dd>In <code>system</code> mode the proxy configuration is taken from the
+ operating system. This mode allows no further parameters in the
+ <code>ProxyConfig</code> object. Note that the <code>system</code> mode is
+ different from setting no proxy configuration. In the latter case, Chrome
+ falls back to the system settings only if no command-line options influence
+ the proxy configuration.</dd>
+</dl>
+<p></p>
+
+<h3 id="proxy_rules">Proxy rules</h3>
+
+<p>
+The <a href="#type-ProxyRules"><code>ProxyRules</code></a> object can contain
+either a <code>singleProxy</code> attribute or a subset of
+<code>proxyForHttp</code>, <code>proxyForHttps</code>, <code>proxyForFtp</code>,
+and <code>fallbackProxy</code>.
+</p>
+
+<p>
+In the first case, HTTP, HTTPS and FTP traffic is proxied through the specified
+proxy server. Other traffic is sent directly. In the latter case the behavior is
+slightly more subtle: If a proxy server is configured for the HTTP, HTTPS or FTP
+protocol, the respective traffic is proxied through the specified server. If no
+such proxy server is specified or traffic uses a different protocol than HTTP,
+HTTPS or FTP, the <code>fallbackProxy</code> is used. If no
+<code>fallbackProxy</code> is specified, traffic is sent directly without a
+proxy server.
+</p>
+
+<h3 id="proxy_server_objects">Proxy server objects</h3>
+
+<p>
+A proxy server is configured in a
+<a href="#type-ProxyServer"><code>ProxyServer</code></a> object. The connection
+to the proxy server (defined by the <code>host</code> attribute) uses the
+protocol defined in the <code>scheme</code> attribute. If no <code>scheme</code>
+is specified, the proxy connection defaults to <code>http</code>.
+</p>
+
+<p>
+If no <code>port</code> is defined in a
+<a href="#type-ProxyServer"><code>ProxyServer</code></a> object, the port is
+derived from the scheme. The default ports are:
+</p><table>
+ <tbody><tr><th>Scheme</th><th>Port</th></tr>
+ <tr><td>http</td><td>80</td></tr>
+ <tr><td>https</td><td>443</td></tr>
+ <tr><td>socks4</td><td>1080</td></tr>
+ <tr><td>socks5</td><td>1080</td></tr>
+</tbody></table>
+<p></p>
+
+<h3 id="bypass_list">Bypass list</h3>
+
+<p>
+Individual servers may be excluded from being proxied with the
+<code>bypassList</code>. This list may contain the following entries:
+</p><dl>
+ <dt><code>[<em>&lt;scheme&gt;</em>://]<em>&lt;host-pattern&gt;</em>[:<em>&lt;port&gt;</em>]</code></dt>
+ <dd>Match all hostnames that match the pattern <em>&lt;host-pattern&gt;</em>.<br>
+ Examples: <code>"foobar.com", "*foobar.com", "*.foobar.com", "*foobar.com:99",
+ "https://x.*.y.com:99"</code></dd>
+
+ <dt><code>[<em>&lt;scheme&gt;</em>://]<em>&lt;ip-literal&gt;</em>[:<em>&lt;port&gt;</em>]</code></dt>
+ <dd>Match URLs that are IP address literals.<br>
+ Conceptually this is the similar to the first case, but with special cases
+ to handle IP literal canonicalization. For example, matching
+ on "[0:0:0::1]" is the same as matching on "[::1]" because
+ the IPv6 canonicalization is done internally.<br>
+ Examples: <code>"127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99"</code></dd>
+
+ <dt><code><em>&lt;ip-literal&gt;</em>/<em>&lt;prefix-length-in-bits&gt;</em></code></dt>
+ <dd>Match any URL containing an IP literal within the given range. The IP
+ range is specified using CIDR notation.<br>
+ Examples: <code>"192.168.1.1/16", "fefe:13::abc/33"</code></dd>
+
+ <dt><code>&lt;local&gt;</code></dt>
+ <dd>Match local addresses. An address is local if the host is "127.0.0.1",
+ "::1", or "localhost".<br>
+ Example: <code>"&lt;local&gt;"</code></dd>
+</dl>
+
+
+<h2 id="precedence">Precedence</h2>
+
+<p>
+Chrome manages settings on different layers. The following list describes the
+layers that may influence the effective proxy settings, in increasing order of
+precedence.
+</p><ol>
+ <li>System settings provided by the operating system</li>
+ <li>Command line parameters</li>
+ <li>Preferences set by extensions</li>
+ <li>Policies</li>
+</ol>
+<p></p>
+
+<p>
+As the list implies, policies might overrule any changes that you specify with
+the proxy settings API.
+</p>
+
+<p>
+Chrome allows using different proxy settings for regular windows and incognito
+windows. The following example illustrates the behavior. Assume that no policy
+overrides the proxy settings and that an extension can set proxy settings for
+regular windows <b>(R)</b> and proxy settings for incognito windows <b>(I)</b>.
+</p>
+
+<p>
+</p><ul>
+ <li>If only <b>(R)</b> is set, these settings are effective for both regular
+ and incognito windows.</li>
+ <li>If only <b>(I)</b> is set, these settings are effective for only incognito
+ windows. Regular windows use the proxy settings determined by the lower layers
+ (command-line options and system settings).</li>
+ <li>If both <b>(R)</b> and <b>(I)</b> are set, the respective settings are
+ used for regular and incognito windows.</li>
+</ul>
+<p></p>
+
+<p>
+If two extensions want to set proxy settings, the extension installed last takes
+precedence over the other extensions. If the extension installed last sets only
+<b>(I)</b>, the settings of regular windows can be defined by more recently
+installed extensions.
+</p>
+
+
+
+<h2 id="overview-examples">Examples</h2>
+
+<p>
+The following code sets a SOCKS 5 proxy for HTTP connections to all servers but
+foobar.com and uses direct connections for all other protocols. The settings
+apply to regular and incognito windows.
+</p>
+
+<pre>var config = {
+ mode: "fixed_servers",
+ rules: {
+ httpProxy: {
+ scheme: "socks5",
+ host: "1.2.3.4"
+ },
+ bypassList: ["foobar.com"]
+ }
+};
+chrome.experimental.proxy.settings.set(
+ {'value': config, 'incognito': false},
+ function() {});
+</pre>
+
+<p>
+The following code sets a custom pac script.
+</p>
+
+<pre>var config = {
+ mode: "pac_script",
+ pacScript: {
+ data: "function FindProxyForURL(url, host) {\n" +
+ " if (host == 'foobar.com')\n" +
+ " return 'PROXY blackhole:80';\n" +
+ " return 'DIRECT';\n" +
+ "}"
+ }
+};
+chrome.experimental.proxy.settings.set(
+ {'value': config, 'incognito': false},
+ function() {});
+</pre>
+
+<p>
+The next snippet queries the current proxy settings.
+</p>
+
+<pre>chrome.experimental.proxy.settings.get(
+ {'incognito': false},
+ function(config) {console.log(JSON.stringify(config));});
+</pre>
+
+<p>
+Note that the <code>value</code> object passed to <code>set()</code> is not
+identical to the <code>value</code> object passed to callback function of
+<code>get()</code>. The latter will contain a <code>rules.httpProxy.port</code>
+element.
+</p>
+
+<!-- END AUTHORED CONTENT -->
+</div>
<!-- API PAGE -->
<div class="apiPage">
@@ -330,50 +611,20 @@
<h2>API reference: chrome.experimental.proxy</h2>
<!-- PROPERTIES -->
- <div class="apiGroup" style="display: none; ">
+ <div class="apiGroup">
<a name="properties"></a>
<h3 id="properties">Properties</h3>
<div>
- <a></a>
- <h4>getLastError</h4>
+ <a name="property-settings"></a>
+ <h4>settings</h4>
<div class="summary">
<!-- Note: intentionally longer 80 columns -->
- <span>chrome.extension</span><span>lastError</span>
+ <span>chrome.experimental.proxy.</span><span>settings</span>
</div>
<div>
- </div>
- </div>
-
- </div> <!-- /apiGroup -->
-
- <!-- METHODS -->
- <div id="methodsTemplate" class="apiGroup">
- <a name="global-methods"></a>
- <h3>Methods</h3>
-
- <!-- iterates over all functions -->
- <div class="apiItem">
- <a name="method-getCurrentProxySettings"></a> <!-- method-anchor -->
- <h4>getCurrentProxySettings</h4>
-
- <div class="summary"><span style="display: none; ">void</span>
- <!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.proxy.getCurrentProxySettings</span>(<span class="null"><span style="display: none; ">, </span><span>boolean</span>
- <var><span>incognito</span></var></span><span class="null"><span>, </span><span>function</span>
- <var><span>callback</span></var></span>)</div>
-
- <div class="description">
- <p class="todo" style="display: none; ">Undocumented.</p>
- <p>Returns the currently effective proxy settings. These can originate from default values, command line options, the extension settings API, policies and possibly other sources in the future.</p>
-
- <!-- PARAMETERS -->
- <h4>Parameters</h4>
- <dl>
- <div>
- <div>
<dt>
- <var>incognito</var>
+ <var>settings</var>
<em>
<!-- TYPE -->
@@ -382,15 +633,15 @@
<span class="optional" style="display: none; ">optional</span>
<span class="enum" style="display: none; ">enumerated</span>
<span id="typeTemplate">
- <span style="display: none; ">
- <a> Type</a>
- </span>
<span>
- <span style="display: none; ">
+ <a href="experimental.extension.html#type-Preference">Preference</a>
+ </span>
+ <span style="display: none; ">
+ <span>
array of <span><span></span></span>
</span>
- <span>boolean</span>
- <span style="display: none; "></span>
+ <span>paramType</span>
+ <span></span>
</span>
</span>
)
@@ -401,7 +652,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>See incognito parameter of useCustomProxySettings.</dd>
+ <dd>Proxy settings to be used. The value of this preference is a ProxyConfig object.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -438,83 +689,44 @@
</dd>
</div>
- </div><div>
- <div>
- <dt>
- <var>callback</var>
- <em>
-
- <!-- TYPE -->
- <div style="display:inline">
- (
- <span class="optional" style="display: none; ">optional</span>
- <span class="enum" style="display: none; ">enumerated</span>
- <span id="typeTemplate">
- <span style="display: none; ">
- <a> Type</a>
- </span>
- <span>
- <span style="display: none; ">
- array of <span><span></span></span>
- </span>
- <span>function</span>
- <span style="display: none; "></span>
- </span>
- </span>
- )
- </div>
+ </div>
- </em>
- </dt>
- <dd class="todo">
- Undocumented.
- </dd>
- <dd style="display: none; ">
- Description of this parameter from the json schema.
- </dd>
- <dd style="display: none; ">
- This parameter was added in version
- <b><span></span></b>.
- You must omit this parameter in earlier versions,
- and you may omit it in any version. If you require this
- parameter, the manifest key
- <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
- can ensure that your extension won't be run in an earlier browser version.
- </dd>
+ </div> <!-- /apiGroup -->
- <!-- OBJECT PROPERTIES -->
- <dd style="display: none; ">
- <dl>
- <div>
- <div>
- </div>
- </div>
- </dl>
- </dd>
+ <!-- METHODS -->
+ <div id="methodsTemplate" class="apiGroup" style="display: none; ">
+ <a></a>
+ <h3>Methods</h3>
- <!-- OBJECT METHODS -->
- <dd style="display: none; ">
- <div></div>
- </dd>
+ <!-- iterates over all functions -->
+ <div class="apiItem">
+ <a></a> <!-- method-anchor -->
+ <h4>method name</h4>
- <!-- OBJECT EVENT FIELDS -->
- <dd style="display: none; ">
- <div></div>
- </dd>
+ <div class="summary"><span>void</span>
+ <!-- Note: intentionally longer 80 columns -->
+ <span>chrome.module.methodName</span>(<span><span>, </span><span></span>
+ <var><span></span></var></span>)</div>
- <!-- FUNCTION PARAMETERS -->
- <dd style="display: none; ">
- <div></div>
- </dd>
+ <div class="description">
+ <p class="todo">Undocumented.</p>
+ <p>
+ A description from the json schema def of the function goes here.
+ </p>
- </div>
+ <!-- PARAMETERS -->
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ </div>
</div>
</dl>
<!-- RETURNS -->
- <h4 style="display: none; ">Returns</h4>
+ <h4>Returns</h4>
<dl>
- <div style="display: none; ">
+ <div>
<div>
</div>
</div>
@@ -528,18 +740,61 @@
The callback <em>parameter</em> should specify a function
that looks like this:
</p>
- <p style="display: none; ">
+ <p>
If you specify the <em>callback</em> parameter, it should
specify a function that looks like this:
</p>
<!-- Note: intentionally longer 80 columns -->
- <pre>function(<span>ProxyConfig config</span>) <span class="subdued">{...}</span>;</pre>
+ <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div>
+
+ <!-- MIN_VERSION -->
+ <p>
+ This function was added in version <b><span></span></b>.
+ If you require this function, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </p>
+ </div> <!-- /description -->
+
+ </div> <!-- /apiItem -->
+
+ </div> <!-- /apiGroup -->
+
+ <!-- EVENTS -->
+ <div id="eventsTemplate" class="apiGroup">
+ <a name="global-events"></a>
+ <h3>Events</h3>
+ <!-- iterates over all events -->
+ <div class="apiItem">
+ <a name="event-onProxyError"></a>
+ <h4>onProxyError</h4>
+
+ <div class="summary">
+ <!-- Note: intentionally longer 80 columns -->
+ <span class="subdued">chrome.experimental.proxy.</span><span>onProxyError</span><span class="subdued">.addListener</span>(function(<span>object details</span>) <span class="subdued">{...}</span>);
+ </div>
+
+ <div class="description">
+ <p class="todo" style="display: none; ">Undocumented.</p>
+ <p>Notifies about proxy errors.</p>
+
+ <!-- PARAMETERS -->
+ <div>
+ <h4>Parameters</h4>
<dl>
<div>
<div>
<dt>
- <var>config</var>
+ <var>details</var>
<em>
<!-- TYPE -->
@@ -548,15 +803,15 @@
<span class="optional" style="display: none; ">optional</span>
<span class="enum" style="display: none; ">enumerated</span>
<span id="typeTemplate">
- <span>
- <a href="experimental.proxy.html#type-ProxyConfig">ProxyConfig</a>
- </span>
<span style="display: none; ">
- <span>
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
array of <span><span></span></span>
</span>
- <span>paramType</span>
- <span></span>
+ <span>object</span>
+ <span style="display: none; "></span>
</span>
</span>
)
@@ -564,10 +819,12 @@
</em>
</dt>
- <dd class="todo" style="display: none; ">
+ <dd class="todo">
Undocumented.
</dd>
- <dd>Configuration, not necessarily a literal copy of the configuration passed to useCustomProxySettings.</dd>
+ <dd style="display: none; ">
+ Description of this parameter from the json schema.
+ </dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -579,71 +836,18 @@
</dd>
<!-- OBJECT PROPERTIES -->
- <dd style="display: none; ">
+ <dd>
<dl>
<div>
<div>
- </div>
- </div>
- </dl>
- </dd>
-
- <!-- OBJECT METHODS -->
- <dd style="display: none; ">
- <div></div>
- </dd>
-
- <!-- OBJECT EVENT FIELDS -->
- <dd style="display: none; ">
- <div></div>
- </dd>
-
- <!-- FUNCTION PARAMETERS -->
- <dd style="display: none; ">
- <div></div>
- </dd>
-
- </div>
- </div>
- </dl>
- </div>
- </div>
-
- <!-- MIN_VERSION -->
- <p style="display: none; ">
- This function was added in version <b><span></span></b>.
- If you require this function, the manifest key
- <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
- can ensure that your extension won't be run in an earlier browser version.
- </p>
- </div> <!-- /description -->
-
- </div><div class="apiItem">
- <a name="method-removeCustomProxySettings"></a> <!-- method-anchor -->
- <h4>removeCustomProxySettings</h4>
-
- <div class="summary"><span style="display: none; ">void</span>
- <!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.proxy.removeCustomProxySettings</span>(<span class="optional"><span style="display: none; ">, </span><span>boolean</span>
- <var><span>incognito</span></var></span>)</div>
-
- <div class="description">
- <p class="todo" style="display: none; ">Undocumented.</p>
- <p>Remove a custom proxy set by the current extension. This is the inverse of useCustomProxySettings.</p>
-
- <!-- PARAMETERS -->
- <h4>Parameters</h4>
- <dl>
- <div>
- <div>
<dt>
- <var>incognito</var>
+ <var>fatal</var>
<em>
<!-- TYPE -->
<div style="display:inline">
(
- <span class="optional">optional</span>
+ <span class="optional" style="display: none; ">optional</span>
<span class="enum" style="display: none; ">enumerated</span>
<span id="typeTemplate">
<span style="display: none; ">
@@ -665,7 +869,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>See incognito parameter of useCustomProxySettings.</dd>
+ <dd>If true, the error was fatal and the network transaction was aborted. Otherwise, a direct connection is used instead.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -702,72 +906,10 @@
</dd>
</div>
- </div>
- </dl>
-
- <!-- RETURNS -->
- <h4 style="display: none; ">Returns</h4>
- <dl>
- <div style="display: none; ">
- <div>
- </div>
- </div>
- </dl>
-
- <!-- CALLBACK -->
- <div style="display: none; ">
- <div>
- <h4>Callback function</h4>
- <p>
- The callback <em>parameter</em> should specify a function
- that looks like this:
- </p>
- <p>
- If you specify the <em>callback</em> parameter, it should
- specify a function that looks like this:
- </p>
-
- <!-- Note: intentionally longer 80 columns -->
- <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
- <dl>
- <div>
- <div>
- </div>
- </div>
- </dl>
- </div>
- </div>
-
- <!-- MIN_VERSION -->
- <p style="display: none; ">
- This function was added in version <b><span></span></b>.
- If you require this function, the manifest key
- <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
- can ensure that your extension won't be run in an earlier browser version.
- </p>
- </div> <!-- /description -->
-
- </div><div class="apiItem">
- <a name="method-useCustomProxySettings"></a> <!-- method-anchor -->
- <h4>useCustomProxySettings</h4>
-
- <div class="summary"><span style="display: none; ">void</span>
- <!-- Note: intentionally longer 80 columns -->
- <span>chrome.experimental.proxy.useCustomProxySettings</span>(<span class="null"><span style="display: none; ">, </span><span>ProxyConfig</span>
- <var><span>config</span></var></span><span class="optional"><span>, </span><span>boolean</span>
- <var><span>incognito</span></var></span>)</div>
-
- <div class="description">
- <p class="todo" style="display: none; ">Undocumented.</p>
- <p>Apply the given proxy configuration.</p>
-
- <!-- PARAMETERS -->
- <h4>Parameters</h4>
- <dl>
- <div>
- <div>
+ </div><div>
+ <div>
<dt>
- <var>config</var>
+ <var>error</var>
<em>
<!-- TYPE -->
@@ -776,15 +918,15 @@
<span class="optional" style="display: none; ">optional</span>
<span class="enum" style="display: none; ">enumerated</span>
<span id="typeTemplate">
- <span>
- <a href="experimental.proxy.html#type-ProxyConfig">ProxyConfig</a>
- </span>
<span style="display: none; ">
- <span>
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
array of <span><span></span></span>
</span>
- <span>paramType</span>
- <span></span>
+ <span>string</span>
+ <span style="display: none; "></span>
</span>
</span>
)
@@ -792,12 +934,10 @@
</em>
</dt>
- <dd class="todo">
+ <dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd style="display: none; ">
- Description of this parameter from the json schema.
- </dd>
+ <dd>The error description.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -834,16 +974,16 @@
</dd>
</div>
- </div><div>
- <div>
+ </div><div>
+ <div>
<dt>
- <var>incognito</var>
+ <var>details</var>
<em>
<!-- TYPE -->
<div style="display:inline">
(
- <span class="optional">optional</span>
+ <span class="optional" style="display: none; ">optional</span>
<span class="enum" style="display: none; ">enumerated</span>
<span id="typeTemplate">
<span style="display: none; ">
@@ -853,7 +993,7 @@
<span style="display: none; ">
array of <span><span></span></span>
</span>
- <span>boolean</span>
+ <span>string</span>
<span style="display: none; "></span>
</span>
</span>
@@ -865,7 +1005,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>If true, the proxy settings apply only to incognito windows. Otherwise they apply to regular windows (and incognito windows if no specific settings are provided for incognito windows)</dd>
+ <dd>Additional details about the error such as a JavaScript runtime error.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -902,82 +1042,26 @@
</dd>
</div>
- </div>
- </dl>
-
- <!-- RETURNS -->
- <h4 style="display: none; ">Returns</h4>
- <dl>
- <div style="display: none; ">
- <div>
- </div>
- </div>
- </dl>
-
- <!-- CALLBACK -->
- <div style="display: none; ">
- <div>
- <h4>Callback function</h4>
- <p>
- The callback <em>parameter</em> should specify a function
- that looks like this:
- </p>
- <p>
- If you specify the <em>callback</em> parameter, it should
- specify a function that looks like this:
- </p>
-
- <!-- Note: intentionally longer 80 columns -->
- <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
- <dl>
- <div>
- <div>
- </div>
- </div>
- </dl>
- </div>
- </div>
-
- <!-- MIN_VERSION -->
- <p style="display: none; ">
- This function was added in version <b><span></span></b>.
- If you require this function, the manifest key
- <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
- can ensure that your extension won't be run in an earlier browser version.
- </p>
- </div> <!-- /description -->
-
- </div> <!-- /apiItem -->
-
- </div> <!-- /apiGroup -->
+ </div>
+ </dl>
+ </dd>
- <!-- EVENTS -->
- <div id="eventsTemplate" class="apiGroup" style="display: none; ">
- <a></a>
- <h3>Events</h3>
- <!-- iterates over all events -->
- <div class="apiItem">
- <a></a>
- <h4>event name</h4>
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
- <div class="summary">
- <!-- Note: intentionally longer 80 columns -->
- <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);
- </div>
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
- <div class="description">
- <p class="todo">Undocumented.</p>
- <p>
- A description from the json schema def of the event goes here.
- </p>
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
- <!-- PARAMETERS -->
- <div>
- <h4>Parameters</h4>
- <dl>
- <div>
- <div>
- </div>
+ </div>
</div>
</dl>
</div>
@@ -1061,7 +1145,7 @@
array of <span><span></span></span>
</span>
<span>string</span>
- <span>["http", "https", "socks", "socks4", "socks5"]</span>
+ <span>["http", "https", "socks4", "socks5"]</span>
</span>
</span>
)
@@ -1072,7 +1156,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The scheme (protocol) of the proxy server itself.</dd>
+ <dd>The scheme (protocol) of the proxy server itself. Defaults to 'http'.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -1140,7 +1224,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The URI of the proxy server.</dd>
+ <dd>The URI of the proxy server. This must be an ASCII hostname (in Punycode format). IDNA is not supported, yet.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -1208,7 +1292,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The port of the proxy server.</dd>
+ <dd>The port of the proxy server. Defaults to a port that depends on the scheme.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -1300,7 +1384,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'socksProxy'.</dd>
+ <dd>An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'fallbackProxy'.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -1345,7 +1429,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The proxy server to be used for all per-URL requests (i.e., http, https, and ftp).</dd>
+ <dd>The proxy server to be used for all per-URL requests (that is http, https, and ftp).</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -1589,7 +1673,7 @@
</div><div>
<div>
<dt>
- <var>socksProxy</var>
+ <var>fallbackProxy</var>
<em>
<!-- TYPE -->
@@ -1617,7 +1701,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The proxy server to be used for SOCKS requests.</dd>
+ <dd>The proxy server to be used for everthing else or if any of the specific proxyFor... is not specified.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -1788,7 +1872,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>An object holding proxy auto-config information. Only one of the fields should be non-empty.</dd>
+ <dd>An object holding proxy auto-config information. Exactly one of the fields should be non-empty.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -1833,7 +1917,75 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>URL of he PAC file to be used.</dd>
+ <dd>URL of the PAC file to be used.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>data</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>string</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>A PAC script.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
diff --git a/chrome/common/extensions/docs/experimental.webNavigation.html b/chrome/common/extensions/docs/experimental.webNavigation.html
index 166af51..7d733d1 100644
--- a/chrome/common/extensions/docs/experimental.webNavigation.html
+++ b/chrome/common/extensions/docs/experimental.webNavigation.html
@@ -1062,7 +1062,7 @@
</div><div>
<div>
<dt>
- <var>targetUrl</var>
+ <var>url</var>
<em>
<!-- TYPE -->
@@ -1574,10 +1574,10 @@
<a> Type</a>
</span>
<span>
- <span style="display: none; ">
- array of <span><span></span></span>
+ <span>
+ array of <span style="display: none; "><span></span></span>
</span>
- <span>string</span>
+ <span style="display: none; ">paramType</span>
<span style="display: none; "></span>
</span>
</span>
@@ -1589,7 +1589,7 @@
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>Zero or more transition qualifiers delimited by "|". Possible qualifiers are "client_redirect", "server_redirect", and "forward_back".</dd>
+ <dd>A list of transition qualifiers.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
diff --git a/chrome/common/extensions/docs/faq.html b/chrome/common/extensions/docs/faq.html
index 245567f..4304f18 100644
--- a/chrome/common/extensions/docs/faq.html
+++ b/chrome/common/extensions/docs/faq.html
@@ -330,27 +330,37 @@ try the
<h4>General</h4>
<ul>
<li><a href="#faq-gen-01">What are Google Chrome Extensions?</a></li>
+ <li><a href="#faq-dev-01">How can I set up Chrome for extension development?</a></li>
<li><a href="#faq-gen-02">What technologies are used to write extensions for Chrome?</a></li>
<li><a href="#faq-gen-03">Are extensions fetched from the web every time the browser is loaded?</a></li>
+ <li><a href="#faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</a></li>
</ul>
- <h4>Development</h4>
+ <h4>Capabilities</h4>
<ul>
- <li><a href="#faq-dev-01">How can I set up Chrome for extension development?</a></li>
- <li><a href="#faq-dev-02">Can I make cross-domain Ajax requests in an extension?</a></li>
- <li><a href="#faq-dev-03">Can I use 3rd party web services in my extension?</a></li>
- <li><a href="#faq-dev-04">Can I use OAuth in my extensions?</a></li>
- <li><a href="#faq-dev-05">What UI controls can I create for my extension?</a></li>
- <li><a href="#faq-dev-06">Can I load DLLs in my extension?</a></li>
+ <li><a href="#faq-dev-02">Can extensions make cross-domain Ajax requests?</a></li>
+ <li><a href="#faq-dev-03">Can extensions use 3rd party web services?</a></li>
<li><a href="#faq-dev-07">Can extensions encode/decode JSON data?</a></li>
- <li><a href="#faq-dev-08">Can I store data locally in my extension?</a></li>
- <li><a href="#faq-dev-09">How much data can I store in localStorage?</a></li>
- <li><a href="#faq-dev-10">Can I create an options menu for my application?</a></li>
- <li><a href="#faq-dev-11">Can two extensions communicate with each other?</a></li>
- <li><a href="#faq-dev-12">What debugging tools are available to extension developers?</a></li>
+ <li><a href="#faq-dev-08">Can extensions store data locally?</a></li>
+ <li><a href="#faq-dev-04">Can extensions use OAuth?</a></li>
+ <li><a href="#faq-dev-06">Can extensions load DLLs?</a></li>
+ <li><a href="#faq-dev-05">Can extensions create UI outside of the rendered web page?</a></li>
+ <li><a href="#faq-interact-chrome">Can extensions listen to clicks on Chrome tabs and navigation buttons?</a>
+ </li><li><a href="#faq-dev-11">Can two extensions communicate with each other?</a></li>
<li><a href="#faq-dev-13">Can extensions use Google Analytics?</a></li>
- <li><a href="#faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</a></li>
- <li><a href="#faq-dev-15">Can I add a content script to chrome:// URLs?</a></li>
+ <li><a href="#faq-dev-15">Can extensions modify chrome:// URLs?</a></li>
+ <li><a href="#faq-open-popups">Can extensions open browser/page action popups without user interaction?</a></li>
+ <li><a href="#faq-persist-popups">Can extensions keep popups open after the user clicks away from them?</a></li>
+ <li><a href="#faq-lifecycle-events">Can extensions be notified when they are installed/uninstalled?</a></li>
+ </ul>
+ <h4>Development</h4>
+ <ul>
+ <li><a href="#faq-building-ui">How do I build a UI for my extension?</a>
+ </li><li><a href="#faq-dev-09">How much data can I store in localStorage?</a></li>
+ <li><a href="#faq-dev-10">How do I create an options menu for my application?</a></li>
+ <li><a href="#faq-dev-12">What debugging tools are available to extension developers?</a></li>
<li><a href="#faq-dev-16">Why do wildcard matches not work for top level domains (TLDs)?</a></li>
+ <li><a href="#faq-management">Why does the management API not fire events when my extension is installed/uninstalled?</a></li>
+ <li><a href="#faq-firstrun">How can an extension determine whether it is running for the first time?</a></li>
</ul>
<h4>Features and bugs</h4>
<ul>
@@ -368,6 +378,26 @@ try the
party websites or services, and customized browsing experiences.
</p>
+<h3 id="faq-dev-01">How can I set up Chrome for extension development?</h3>
+<p>
+ As long as you are using a version of Chrome that supports
+ extensions, you already have everything you need to start writing an
+ extension of your own.
+ You can start by turning on Developer mode.
+ </p>
+
+ <p>
+ Click the wrench icon
+ <img src="images/toolsmenu.gif" height="29" width="29" alt="" class="nomargin">
+ and select <b>Extensions</b> from the <b>Tools</b> menu.
+ If there's a "+" next to "Developer mode",
+ click the "+" so it turns into a "-".
+ Now you can reload extensions,
+ load an unpacked directory of files as if it were a packaged extension,
+ and more. For a complete tutorial, see
+ <a href="http://code.google.com/chrome/extensions/getstarted.html">Getting Started</a>.
+</p>
+
<h3 id="faq-gen-02">What technologies are used to write extensions for Chrome?</h3>
<p>
Extensions are written using the same standard web
@@ -393,73 +423,61 @@ try the
content from the web.
</p>
+<h3 id="faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</h3>
+<p>
+ To determine which version of Chrome is currently available on each
+ of the different platforms, visit
+ <a href="http://omahaproxy.appspot.com">omahaproxy.appspot.com</a>. On that
+ site you will see data in a format similar to:
+</p>
-<h2>Development</h2>
-
+<pre>cf,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cf,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cf,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+linux,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+linux,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+linux,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+mac,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+mac,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+mac,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,canary,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cros,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cros,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####</pre>
-<h3 id="faq-dev-01">How can I set up Chrome for extension development?</h3>
<p>
- As long as you are using a version of Chrome that supports
- extensions, you already have everything you need to start writing an
- extension of your own.
- You can start by turning on Developer mode.
- </p>
-
- <p>
- Click the wrench icon
- <img src="images/toolsmenu.gif" height="29" width="29" alt="" class="nomargin">
- and select <b>Extensions</b> from the <b>Tools</b> menu.
- If there's a "+" next to "Developer mode",
- click the "+" so it turns into a "-".
- Now you can reload extensions,
- load an unpacked directory of files as if it were a packaged extension,
- and more. For a complete tutorial, see
- <a href="http://code.google.com/chrome/extensions/getstarted.html">Getting Started</a>.
+ Each line represents information about a different platform and channel
+ combination. The
+ listed platforms are <code>cf</code> (Google Chrome Frame),
+ <code>linux</code>, <code>mac</code>, <code>win</code>, and
+ <code>cros</code> (Google Chrome OS). The listed
+ channels are <code>canary</code>, <code>dev</code>, <code>beta</code>,
+ and <code>stable</code>.
+ The two four-part numbers after the channel represent the current and previous
+ versions of Chrome deployed to that platform-channel
+ combination. The rest of the information is metadata about when the releases
+ were first pushed, as well as revision numbers associated with each build.
</p>
-<h3 id="faq-dev-02">Can I make cross-domain Ajax requests in an extension?</h3>
+
+<h2>Capabilities</h2>
+
+<h3 id="faq-dev-02">Can extensions make cross-domain Ajax requests?</h3>
<p>
Yes. Extensions can make cross-domain requests. See
<a href="http://code.google.com/chrome/extensions/xhr.html">this page</a>
for more information.
</p>
-<h3 id="faq-dev-03">Can I use 3rd party web services in my extension?</h3>
+<h3 id="faq-dev-03">Can extensions use 3rd party web services?</h3>
<p>
Yes. Extensions are capable of making cross-domain Ajax
requests, so they can call remote APIs directly. APIs that provide data
in JSON format are particularly easy to use.
</p>
-<h3 id="faq-dev-04">Can I use OAuth in my extensions?</h3>
-<p>
- Absolutely, there are extensions that use OAuth to access remote data
- APIs. Most developers find it convenient to use a
- <a href="http://unitedheroes.net/OAuthSimple/js/OAuthSimple.js">JavaScript OAuth library</a>
- in order to simplify the process of signing OAuth requests.
-</p>
-
-<h3 id="faq-dev-05">What UI controls can I create for my extension?</h3>
-<p>
- Extensions use HTML and CSS to define their user interfaces, so you can use
- standard form controls to build your UI, or style the interface with CSS,
- as you would a web page. Additionally, your extension may add buttons
- to the Chrome browser itself. See
- <a href="http://code.google.com/chrome/extensions/browserAction.html">browser actions</a>
- and
- <a href="http://code.google.com/chrome/extensions/pageAction.html">page actions</a>
- for more information.
-</p>
-
-<h3 id="faq-dev-06">Can I load DLLs in my extension?</h3>
-<p>
- Yes, using the
- <a href="http://code.google.com/chrome/extensions/trunk/npapi.html">NPAPI interface</a>.
- Because of the possibility for abuse, though, we will review your extension
- before hosting it in the Google Chrome Extensions Gallery
- or Chrome Web Store.
-</p>
-
<h3 id="faq-dev-07">Can extensions encode/decode JSON data?</h3>
<p>
Yes, because V8 (Chrome's JavaScript engine) supports
@@ -469,7 +487,7 @@ try the
any additional JSON libraries in your code.
</p>
-<h3 id="faq-dev-08">Can I store data locally in my extension?</h3>
+<h3 id="faq-dev-08">Can extensions store data locally?</h3>
<p>
Yes, extensions can use <a href="http://dev.w3.org/html5/webstorage/">localStorage</a>
to store string data permanently. Using Chrome's built-in JSON
@@ -480,33 +498,44 @@ try the
which may be used as well.
</p>
-<h3 id="faq-dev-09">How much data can I store in localStorage?</h3>
+<h3 id="faq-dev-04">Can extensions use OAuth?</h3>
<p>
- Extensions can store up to 5MB of data in localStorage.
+ Yes, there are extensions that use OAuth to access remote data
+ APIs. Most developers find it convenient to use a
+ <a href="http://unitedheroes.net/OAuthSimple/js/OAuthSimple.js">JavaScript OAuth library</a>
+ in order to simplify the process of signing OAuth requests.
</p>
-<h3 id="faq-dev-10">Can I create an options menu for my application?</h3>
+<h3 id="faq-dev-06">Can extensions load DLLs?</h3>
<p>
- You can let users set options for your extension by creating an
- <a href="http://code.google.com/chrome/extensions/trunk/options.html">options page</a>,
- which is a simple HTML page that will be loaded when a user clicks the
- "options" button for your extension. This page can read and write settings
- to localStorage, or even send options to a web server so that they can be
- persisted across browsers.
+ Yes, using the <a href="npapi.html">NPAPI interface</a>.
+ Because of the possibility for abuse, though, we will review your extension
+ before hosting it in the Google Chrome Extensions Gallery
+ or Chrome Web Store.
</p>
-<h3 id="faq-dev-11">Can two extensions communicate with each other?</h3>
+<h3 id="faq-dev-05">Can extensions create UI outside of the rendered web page?</h3>
<p>
- Extensions may pass messages to other extensions. See the
- <a href="http://code.google.com/chrome/extensions/trunk/messaging.html#external">message passing documentation</a>
- for more information.
+ Yes, your extension may add buttons to the Chrome browser's user interface.
+ See <a href="browserAction.html">browser actions</a> and
+ <a href="pageAction.html">page actions</a> for more information.
+</p>
+<p>
+ An extension may also create popup notifications, which exist outside of the
+ browser window. See the <a href="notifications.html">desktop
+ notifications</a> documentation for more details.
</p>
-<h3 id="faq-dev-12">What debugging tools are available to extension developers?</h3>
+<h3 id="faq-interact-chrome">Can extensions listen to clicks on Chrome tabs and
+ navigation buttons?</h3>
<p>
- Chrome's built-in developer tools can be used to debug extensions
- as well as web pages. See this
- <a href="http://code.google.com/chrome/extensions/tut_debugging.html ">tutorial on debugging extensions</a>
+ No. Extensions are limited to listening to the events described in the <a href="api_index.html">API documentation</a>.
+</p>
+
+<h3 id="faq-dev-11">Can two extensions communicate with each other?</h3>
+<p>
+ Yes, extensions may pass messages to other extensions. See the
+ <a href="messaging.html#external">message passing documentation</a>
for more information.
</p>
@@ -520,39 +549,7 @@ try the
this.
</p>
-<h3 id="faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</h3>
-<p>
- To determine which version of Chrome is currently available on each
- of the different platforms, visit
- <a href="http://omahaproxy.appspot.com">omahaproxy.appspot.com</a>. On that
- site you will see data in a format similar to:
-</p>
-<pre>cf,dev,#.#.###.#,#.#.###.#
-cf,beta,#.#.###.#,#.#.###.#
-cf,stable,#.#.###.#,#.#.###.#
-linux,dev,#.#.###.#,#.#.###.#
-linux,beta,#.#.###.#,#.#.###.#
-linux,stable,#.#.###.#,#.#.###.#
-mac,dev,#.#.###.#,#.#.###.#
-mac,beta,#.#.###.#,#.#.###.#
-mac,stable,#.#.###.#,#.#.###.#
-win,canary,#.#.###.#,#.#.###.#
-win,dev,#.#.###.#,#.#.###.#
-win,beta,#.#.###.#,#.#.###.#
-win,stable,#.#.###.#,#.#.###.#</pre>
-
-<p>
- Each line represents a different platform and channel combination. The
- listed platforms are <code>cf</code> (Google Chrome Frame),
- <code>linux</code>, <code>mac</code>, and <code>win</code>. The listed
- channels are <code>canary</code>, <code>dev</code>, <code>beta</code>,
- and <code>stable</code>.
- The two four-part numbers at the end of each line represent the range of
- versions of Chrome currently deployed to that platform-channel
- combination.
-</p>
-
-<h3 id="faq-dev-15">Can I add a content script to chrome:// URLs?</h3>
+<h3 id="faq-dev-15">Can extensions modify chrome:// URLs?</h3>
<p>
No. The extensions APIs have been designed to minimize backwards
compatibility issues that can arise when new versions of the browser are
@@ -573,6 +570,64 @@ win,stable,#.#.###.#,#.#.###.#</pre>
to stay the same.
</p>
+<h3 id="faq-open-popups">Can extensions open browser/page action popups without
+ user interaction?</h3>
+<p>
+ No, popups can only be opened if the user clicks on the corresponding page or
+ browser action. An extension cannot open its popup programatically.
+</p>
+
+<h3 id="faq-persist-popups">Can extensions keep popups open after the user
+ clicks away from them?</h3>
+<p>
+ No, popups automatically close when the user focuses on some portion of the
+ browser outside of the popup. There is no way to keep the popup open after
+ the user has clicked away.
+</p>
+
+<h3 id="faq-lifecycle-events">Can extensions be notified when they are
+ installed/uninstalled?</h3>
+<p>
+ No, there are no events an extension can listen to in order to determine
+ whether it has been installed or uninstalled. However, an extension can
+ determine when it has been run for the first time. See <a href="#faq-firstrun">this FAQ entry</a> for information.
+</p>
+
+
+<h2>Development</h2>
+
+
+<h3 id="faq-building-ui">How do I build a UI for my extension?</h3>
+<p>
+ Extensions use HTML and CSS to define their user interfaces, so you can use
+ standard form controls to build your UI, or style the interface with CSS,
+ as you would a web page. Additionally, extensions can add
+ <a href="#faq-dev-05">some limited UI elements to Chrome itself.</a>
+</p>
+
+<h3 id="faq-dev-09">How much data can I store in localStorage?</h3>
+<p>
+ Extensions can store up to 5MB of data in localStorage.
+</p>
+
+<h3 id="faq-dev-10">How do I create an options menu for my application?</h3>
+<p>
+ You can let users set options for your extension by creating an
+ <a href="http://code.google.com/chrome/extensions/trunk/options.html">options page</a>,
+ which is a simple HTML page that will be loaded when a user clicks the
+ "options" button for your extension. This page can read and write settings
+ to localStorage, or even send options to a web server so that they can be
+ persisted across browsers.
+</p>
+
+<h3 id="faq-dev-12">What debugging tools are available to extension developers?</h3>
+<p>
+ Chrome's built-in developer tools can be used to debug extensions
+ as well as web pages. See this
+ <a href="http://code.google.com/chrome/extensions/tut_debugging.html ">tutorial on debugging extensions</a>
+ for more information.
+</p>
+
<h3 id="faq-dev-16">Why do wildcard matches not work for top level domains
(TLDs)?</h3>
<p>
@@ -597,8 +652,35 @@ win,stable,#.#.###.#,#.#.###.#</pre>
your extension on.
</p>
+<h3 id="faq-management">Why does the management API not fire events when my
+ extension is installed/uninstalled?</h3>
+<p>
+ The <a href="management.html">management API</a> was intended to help create
+ new tab page replacement extensions. It was not intended to fire
+ install/uninstall events for the current extension.
+</p>
+
+<h3 id="faq-firstrun">How can an extension determine whether it is running for
+ the first time?</h3>
+<p>
+ An extension can check to see whether it is running for the first time by
+ checking for the presence of a value in localStorage, and writing the value if
+ it does not exist. For example:
+</p>
+
+<pre>var firstRun = (localStorage['firstRun'] == 'true');
+if (!firstRun) {
+ localStorage['firstRun'] = 'true';
+}</pre>
+
+<p>
+ Note that this check should be run in a background page, not a content script.
+</p>
+
+
<h2>Features and bugs</h2>
+
<h3 id="faq-fea-01">I think I've found a bug! How do I make sure it gets
fixed?</h3>
<p>
diff --git a/chrome/common/extensions/docs/images/a11y/focus-outline-2.png b/chrome/common/extensions/docs/images/a11y/focus-outline-2.png
index 3d62a90..b8c96c1 100644
--- a/chrome/common/extensions/docs/images/a11y/focus-outline-2.png
+++ b/chrome/common/extensions/docs/images/a11y/focus-outline-2.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/a11y/focus-outline.png b/chrome/common/extensions/docs/images/a11y/focus-outline.png
index 8be29d5..aea6551 100644
--- a/chrome/common/extensions/docs/images/a11y/focus-outline.png
+++ b/chrome/common/extensions/docs/images/a11y/focus-outline.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/a11y/standard-html-controls.png b/chrome/common/extensions/docs/images/a11y/standard-html-controls.png
index a3afb95..518ee8e 100644
--- a/chrome/common/extensions/docs/images/a11y/standard-html-controls.png
+++ b/chrome/common/extensions/docs/images/a11y/standard-html-controls.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/bookmarks.png b/chrome/common/extensions/docs/images/bookmarks.png
index 1186d3c..d8e56f8 100644
--- a/chrome/common/extensions/docs/images/bookmarks.png
+++ b/chrome/common/extensions/docs/images/bookmarks.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/browser-action.png b/chrome/common/extensions/docs/images/browser-action.png
index 25b0da4..82ebe33 100644
--- a/chrome/common/extensions/docs/images/browser-action.png
+++ b/chrome/common/extensions/docs/images/browser-action.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/google-mail-checker-capture.png b/chrome/common/extensions/docs/images/google-mail-checker-capture.png
index eb2da60..2b59b6b 100644
--- a/chrome/common/extensions/docs/images/google-mail-checker-capture.png
+++ b/chrome/common/extensions/docs/images/google-mail-checker-capture.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/hello-world-small.png b/chrome/common/extensions/docs/images/hello-world-small.png
index 53e3d7a..567b167 100644
--- a/chrome/common/extensions/docs/images/hello-world-small.png
+++ b/chrome/common/extensions/docs/images/hello-world-small.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/hello-world.png b/chrome/common/extensions/docs/images/hello-world.png
index efefcb9..11ba245 100644
--- a/chrome/common/extensions/docs/images/hello-world.png
+++ b/chrome/common/extensions/docs/images/hello-world.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/icon.png b/chrome/common/extensions/docs/images/icon.png
index d3d3a71..37283ba 100644
--- a/chrome/common/extensions/docs/images/icon.png
+++ b/chrome/common/extensions/docs/images/icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/index/flashapp.png b/chrome/common/extensions/docs/images/index/flashapp.png
index 040ddd5..c3052b4 100644
--- a/chrome/common/extensions/docs/images/index/flashapp.png
+++ b/chrome/common/extensions/docs/images/index/flashapp.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/index/gmail-small.png b/chrome/common/extensions/docs/images/index/gmail-small.png
index d235d6e..0e70bc0 100644
--- a/chrome/common/extensions/docs/images/index/gmail-small.png
+++ b/chrome/common/extensions/docs/images/index/gmail-small.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/index/gmail.png b/chrome/common/extensions/docs/images/index/gmail.png
index 5551b15..dda74da 100644
--- a/chrome/common/extensions/docs/images/index/gmail.png
+++ b/chrome/common/extensions/docs/images/index/gmail.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/index/html5app.png b/chrome/common/extensions/docs/images/index/html5app.png
index 2228197..62582b6 100644
--- a/chrome/common/extensions/docs/images/index/html5app.png
+++ b/chrome/common/extensions/docs/images/index/html5app.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/index/news.png b/chrome/common/extensions/docs/images/index/news.png
index 410a344..0dedda4 100644
--- a/chrome/common/extensions/docs/images/index/news.png
+++ b/chrome/common/extensions/docs/images/index/news.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/index/rss.png b/chrome/common/extensions/docs/images/index/rss.png
index f8d2fc4..304e8ff 100644
--- a/chrome/common/extensions/docs/images/index/rss.png
+++ b/chrome/common/extensions/docs/images/index/rss.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/infobar.png b/chrome/common/extensions/docs/images/infobar.png
index c4dd4c5..d375fa1 100644
--- a/chrome/common/extensions/docs/images/infobar.png
+++ b/chrome/common/extensions/docs/images/infobar.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/intermediate/bookmarks.png b/chrome/common/extensions/docs/images/intermediate/bookmarks.png
index 142fa08..cd33381 100644
--- a/chrome/common/extensions/docs/images/intermediate/bookmarks.png
+++ b/chrome/common/extensions/docs/images/intermediate/bookmarks.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/intermediate/hello-world.png b/chrome/common/extensions/docs/images/intermediate/hello-world.png
index c2d0ddf..4de5a4c 100644
--- a/chrome/common/extensions/docs/images/intermediate/hello-world.png
+++ b/chrome/common/extensions/docs/images/intermediate/hello-world.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/intermediate/news.png b/chrome/common/extensions/docs/images/intermediate/news.png
index a599277..5d06122 100644
--- a/chrome/common/extensions/docs/images/intermediate/news.png
+++ b/chrome/common/extensions/docs/images/intermediate/news.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/intermediate/tabs.png b/chrome/common/extensions/docs/images/intermediate/tabs.png
index ab506e6..d561206 100644
--- a/chrome/common/extensions/docs/images/intermediate/tabs.png
+++ b/chrome/common/extensions/docs/images/intermediate/tabs.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/intermediate/windows.png b/chrome/common/extensions/docs/images/intermediate/windows.png
index a0279a9..befd246 100644
--- a/chrome/common/extensions/docs/images/intermediate/windows.png
+++ b/chrome/common/extensions/docs/images/intermediate/windows.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/load_after.png b/chrome/common/extensions/docs/images/load_after.png
index 09b7085..cbeb8b3 100644
--- a/chrome/common/extensions/docs/images/load_after.png
+++ b/chrome/common/extensions/docs/images/load_after.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/load_after_small.png b/chrome/common/extensions/docs/images/load_after_small.png
index 160de47..204cd90 100644
--- a/chrome/common/extensions/docs/images/load_after_small.png
+++ b/chrome/common/extensions/docs/images/load_after_small.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/notification-linux.png b/chrome/common/extensions/docs/images/notification-linux.png
index 5f006c4..e0d06a4 100644
--- a/chrome/common/extensions/docs/images/notification-linux.png
+++ b/chrome/common/extensions/docs/images/notification-linux.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/notification-mac.png b/chrome/common/extensions/docs/images/notification-mac.png
index 34c88db..dfa1d92 100644
--- a/chrome/common/extensions/docs/images/notification-mac.png
+++ b/chrome/common/extensions/docs/images/notification-mac.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/ntp-blank.png b/chrome/common/extensions/docs/images/ntp-blank.png
index c137e34..79ad292 100644
--- a/chrome/common/extensions/docs/images/ntp-blank.png
+++ b/chrome/common/extensions/docs/images/ntp-blank.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/ntp-default.png b/chrome/common/extensions/docs/images/ntp-default.png
index 6b1bad2..4aa15c1 100644
--- a/chrome/common/extensions/docs/images/ntp-default.png
+++ b/chrome/common/extensions/docs/images/ntp-default.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/omnibox.png b/chrome/common/extensions/docs/images/omnibox.png
index 14b9aa1..c8d3bb4 100644
--- a/chrome/common/extensions/docs/images/omnibox.png
+++ b/chrome/common/extensions/docs/images/omnibox.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/page-action.png b/chrome/common/extensions/docs/images/page-action.png
index 3b840f7..3e3b391 100644
--- a/chrome/common/extensions/docs/images/page-action.png
+++ b/chrome/common/extensions/docs/images/page-action.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/perms-hw1.png b/chrome/common/extensions/docs/images/perms-hw1.png
index 224bd2d..5e88b0d 100644
--- a/chrome/common/extensions/docs/images/perms-hw1.png
+++ b/chrome/common/extensions/docs/images/perms-hw1.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/perms-hw2-disabled.png b/chrome/common/extensions/docs/images/perms-hw2-disabled.png
index efd1479..1e880ff 100644
--- a/chrome/common/extensions/docs/images/perms-hw2-disabled.png
+++ b/chrome/common/extensions/docs/images/perms-hw2-disabled.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/perms-hw2.png b/chrome/common/extensions/docs/images/perms-hw2.png
index 644a276..82cee5d 100644
--- a/chrome/common/extensions/docs/images/perms-hw2.png
+++ b/chrome/common/extensions/docs/images/perms-hw2.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/sample-default-icon.png b/chrome/common/extensions/docs/images/sample-default-icon.png
index 8359c14..04f4319 100644
--- a/chrome/common/extensions/docs/images/sample-default-icon.png
+++ b/chrome/common/extensions/docs/images/sample-default-icon.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/subscribe-cap1.png b/chrome/common/extensions/docs/images/subscribe-cap1.png
index b9dff7c..c73d74c 100644
--- a/chrome/common/extensions/docs/images/subscribe-cap1.png
+++ b/chrome/common/extensions/docs/images/subscribe-cap1.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/subscribe-cap2.png b/chrome/common/extensions/docs/images/subscribe-cap2.png
index 7f286ce..70128ab 100644
--- a/chrome/common/extensions/docs/images/subscribe-cap2.png
+++ b/chrome/common/extensions/docs/images/subscribe-cap2.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/tabs.png b/chrome/common/extensions/docs/images/tabs.png
index 781ae26..1a039d2 100644
--- a/chrome/common/extensions/docs/images/tabs.png
+++ b/chrome/common/extensions/docs/images/tabs.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/toggle_sprite.png b/chrome/common/extensions/docs/images/toggle_sprite.png
index a91c2d4..cca1032 100644
--- a/chrome/common/extensions/docs/images/toggle_sprite.png
+++ b/chrome/common/extensions/docs/images/toggle_sprite.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/tut_analytics/screenshot01.png b/chrome/common/extensions/docs/images/tut_analytics/screenshot01.png
index b698691..52792f6 100644
--- a/chrome/common/extensions/docs/images/tut_analytics/screenshot01.png
+++ b/chrome/common/extensions/docs/images/tut_analytics/screenshot01.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/tut_analytics/screenshot02.png b/chrome/common/extensions/docs/images/tut_analytics/screenshot02.png
index afe7cc8..e590de6 100644
--- a/chrome/common/extensions/docs/images/tut_analytics/screenshot02.png
+++ b/chrome/common/extensions/docs/images/tut_analytics/screenshot02.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/tut_analytics/screenshot03.png b/chrome/common/extensions/docs/images/tut_analytics/screenshot03.png
index 7d075aa..5a4efc8 100644
--- a/chrome/common/extensions/docs/images/tut_analytics/screenshot03.png
+++ b/chrome/common/extensions/docs/images/tut_analytics/screenshot03.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/tut_analytics/screenshot04.png b/chrome/common/extensions/docs/images/tut_analytics/screenshot04.png
index 14f8601..4c82be0 100644
--- a/chrome/common/extensions/docs/images/tut_analytics/screenshot04.png
+++ b/chrome/common/extensions/docs/images/tut_analytics/screenshot04.png
Binary files differ
diff --git a/chrome/common/extensions/docs/images/windows.png b/chrome/common/extensions/docs/images/windows.png
index c54b182..6abfb01 100644
--- a/chrome/common/extensions/docs/images/windows.png
+++ b/chrome/common/extensions/docs/images/windows.png
Binary files differ
diff --git a/chrome/common/extensions/docs/management.html b/chrome/common/extensions/docs/management.html
index 59e4e08..5312d8c 100644
--- a/chrome/common/extensions/docs/management.html
+++ b/chrome/common/extensions/docs/management.html
@@ -2059,7 +2059,7 @@ For example:</p>
<dd class="todo" style="display: none; ">
Undocumented.
</dd>
- <dd>The url for this icon image.</dd>
+ <dd>The URL for this icon image. To display a grayscale version of the icon (to indicate that an extension is disabled, for example), append <code>?grayscale=true</code> to the URL.</dd>
<dd style="display: none; ">
This parameter was added in version
<b><span></span></b>.
@@ -2644,6 +2644,74 @@ For example:</p>
</div><div>
<div>
<dt>
+ <var>homepageUrl</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>string</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The URL of the homepage of this extension or app</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- OBJECT METHODS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- OBJECT EVENT FIELDS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
<var>optionsUrl</var>
<em>
diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html
index 73f24dc..4be948c 100644
--- a/chrome/common/extensions/docs/manifest.html
+++ b/chrome/common/extensions/docs/manifest.html
@@ -635,7 +635,7 @@ or packaged app can use.
<p class="note">
<strong>Note:</strong>
Hosted apps can use the
-"geolocation", "notifications", and "unlimitedStorage" permissions,
+"background", "geolocation", "notifications", and "unlimitedStorage" permissions,
but not any other permissions listed in this table.
</p>
@@ -656,6 +656,37 @@ but not any other permissions listed in this table.
<a href="match_patterns.html">Match Patterns</a>.
</td>
</tr>
+<tr id="bg">
+ <td> "background" </td>
+ <td> <p>
+ Makes Chrome start up early and and shut down late,
+ so that apps and extensions can have a longer life.
+ </p>
+
+ <p>
+ When any installed hosted app, packaged app, or extension
+ has "background" permission, Chrome runs (invisibly)
+ as soon as the user logs into their computer—before
+ the user launches Chrome.
+ The "background" permission also makes Chrome continue running
+ (even after its last window is closed)
+ until the user explicitly quits Chrome.
+ </p>
+
+ <p class="note">
+ <b>Note:</b>
+ Disabled apps and extensions
+ are treated as if they aren't installed.
+ </p>
+
+ <p>
+ You typically use the "background" permission with a
+ <a href="background_pages.html">background page</a>
+ or (for hosted apps) a
+ <a href="http://code.google.com/chrome/apps/docs/background.html">background window</a>.
+ </p>
+ </td>
+</tr>
<tr>
<td> "bookmarks" </td>
<td> Required if the extension uses the
diff --git a/chrome/common/extensions/docs/match_patterns.html b/chrome/common/extensions/docs/match_patterns.html
index 46b1bb0..255897d 100644
--- a/chrome/common/extensions/docs/match_patterns.html
+++ b/chrome/common/extensions/docs/match_patterns.html
@@ -340,6 +340,12 @@ Each match pattern has 3 parts:</p>
<li> <em>scheme</em> —
for example, <code>http</code> or <code>file</code>
or <code>*</code>
+ <p class="note">
+ <b>Note:</b>
+ Access to <code>file</code> URLs isn't automatic.
+ The user must visit the extensions management page
+ and opt in to <code>file</code> access for each extension that requests it.
+ </p>
</li>
<li> <em>host</em> —
for example, <code>www.google.com</code>
@@ -449,7 +455,8 @@ The following table shows some valid patterns.
<code>file:///foo*</code>
</td>
- <td>Matches any local file whose path starts with <code>/foo</code></td>
+ <td>Matches any local file whose path starts with <code>/foo</code>
+ </td>
<td>
file:///foo/bar.html<br>
diff --git a/chrome/common/extensions/docs/messaging.html b/chrome/common/extensions/docs/messaging.html
index 0fec286..5182785 100644
--- a/chrome/common/extensions/docs/messaging.html
+++ b/chrome/common/extensions/docs/messaging.html
@@ -460,7 +460,7 @@ port.onMessage.addListener(function(msg) {
if (msg.question == "Who's there?")
port.postMessage({answer: "Madame"});
else if (msg.question == "Madame who?")
- port.postMessage({answer: "Madame... Bovary");
+ port.postMessage({answer: "Madame... Bovary"});
});
</pre>
diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html
index 3e19c14..bda40f4 100644
--- a/chrome/common/extensions/docs/samples.html
+++ b/chrome/common/extensions/docs/samples.html
@@ -313,7 +313,7 @@
<!-- STATIC CONTENT PLACEHOLDER -->
<div id="static"><link rel="stylesheet" href="css/samples.css">
-<script>var search_data = {"4da084813a9c0f3de28821a1c8d2504f5f7bcbad":"A BROWSER ACTION WHICH CHANGES ITS ICON WHEN CLICKED. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETICON","0569ec913dfd1aa4fad58fff04af99b0de7ec4b6":"A BROWSER ACTION WITH A POPUP THAT CHANGES THE PAGE COLOR. BROWSER_ACTION POPUP TABS CHROME.TABS.EXECUTESCRIPT","a02f64d5e8c8f96efb45b26c11bfa2320deddd36":"A BROWSER ACTION WITH NO ICON THAT MAKES THE PAGE RED BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.TABS.EXECUTESCRIPT","ebed3a237b5606a154cfc0e6326821154607d388":"ACCEPTLANGUAGE RETURNS ACCEPT LANGUAGES OF THE BROWSER BROWSER_ACTION POPUP CHROME.I18N.GETACCEPTLANGUAGES CHROME.I18N.GETMESSAGE","2f7777c80368bb0a8caf057dffaadd5feed7e9ee":"ANIMATED PAGE ACTION THIS EXTENSION ADDS AN ANIMATED BROWSER ACTION TO THE TOOLBAR. BACKGROUND_PAGE PAGE_ACTION TABS CHROME.PAGEACTION.HIDE CHROME.PAGEACTION.ONCLICKED CHROME.PAGEACTION.SETICON CHROME.PAGEACTION.SETTITLE CHROME.PAGEACTION.SHOW CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED","4da5aeb0840b36af753e694f2e81c90620494688":"APP LAUNCHER BROWSER_ACTION MANAGEMENT CHROME.EXTENSION.GETURL CHROME.MANAGEMENT.GET CHROME.MANAGEMENT.GETALL CHROME.MANAGEMENT.LAUNCHAPP CHROME.TABS.CREATE","63349d2a4f5ec8f315a05fc9b1cab181ad546fd2":"BLANK NEW TAB PAGE CHROME_URL_OVERRIDES","4c45b5015d2ca5f9053514ac70ff3acc3bca1f76":"CHROME SOUNDS ENJOY A MORE MAGICAL AND IMMERSIVE EXPERIENCE WHEN BROWSING THE WEB USING THE POWER OF SOUND. BACKGROUND_PAGE BOOKMARKS OPTIONS_PAGE TABS CHROME.BOOKMARKS.ONCREATED CHROME.BOOKMARKS.ONMOVED CHROME.BOOKMARKS.ONREMOVED CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.TABS.GET CHROME.TABS.ONATTACHED CHROME.TABS.ONCREATED CHROME.TABS.ONDETACHED CHROME.TABS.ONMOVED CHROME.TABS.ONREMOVED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.WINDOWS.ONCREATED CHROME.WINDOWS.ONFOCUSCHANGED CHROME.WINDOWS.ONREMOVED","2f41f968c8b6ddfc078363e305d2b530802a11dd":"CHROMIUM BUILDBOT MONITOR DISPLAYS THE STATUS OF THE CHROMIUM BUILDBOT IN THE TOOLBAR. CLICK TO SEE MORE DETAILED STATUS IN A POPUP. BACKGROUND_PAGE BROWSER_ACTION NOTIFICATIONS OPTIONS_PAGE POPUP CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.GETURL","32ff053c4a55b305243c83756304ca7c9d135ed0":"CHROMIUM SEARCH ADD SUPPORT TO THE OMNIBOX TO SEARCH THE CHROMIUM SOURCE CODE. BACKGROUND_PAGE TABS CHROME.OMNIBOX.ONINPUTCANCELLED CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED CHROME.OMNIBOX.ONINPUTSTARTED CHROME.OMNIBOX.SETDEFAULTSUGGESTION CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.UPDATE","6484bb796d9aef70aa1026c0edc0799bc7a48b68":"CLD DISPLAYS THE LANGUAGE OF A TAB BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.SETBADGETEXT CHROME.TABS.DETECTLANGUAGE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED","8818cf9ded850b5f0ba7348127526eb00165f202":"CONTEXT MENUS SAMPLE SHOWS SOME OF THE FEATURES OF THE CONTEXT MENUS API BACKGROUND_PAGE CONTEXTMENUS CHROME.CONTEXTMENUS.CREATE","ba79d21d1e9a1cf5edebc246b11f667406cb001f":"COOKIE API TEST EXTENSION TESTING COOKIE API BACKGROUND_PAGE BROWSER_ACTION COOKIES TABS CHROME.BROWSERACTION.ONCLICKED CHROME.COOKIES.GET CHROME.COOKIES.GETALL CHROME.COOKIES.ONCHANGED CHROME.COOKIES.REMOVE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL","b6ab1c298a1c1f939b393f36868c937391502112":"CROSS-DOMAIN XMLHTTPREQUEST FROM A CONTENT SCRIPT DEMONSTRATES A METHOD TO MAKE A CROSS-DOMAIN XMLHTTPREQUEST FETCH FROM A CONTENT SCRIPT. THIS EXTENSION FETCHES THE CURRENT TRENDING TOPICS FROM TWITTER AND INSERTS THEM IN AN OVERLAY AT THE TOP OF GOOGLE NEWS. VISIT HTTP://NEWS.GOOGLE.COM TO TEST THIS EXTENSION. BACKGROUND_PAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST","fad4ea2189bbcce1d2669a409ed296b10ec8b7c9":"EMAIL THIS PAGE (BY GOOGLE) THIS EXTENSION ADDS AN EMAIL BUTTON TO THE TOOLBAR WHICH ALLOWS YOU TO EMAIL THE PAGE LINK USING YOUR DEFAULT MAIL CLIENT OR GMAIL. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.CONNECT CHROME.EXTENSION.ONCONNECT CHROME.TABS.CREATE CHROME.TABS.EXECUTESCRIPT CHROME.TABS.UPDATE","26af638d88737474bed3837343caa13f3b924615":"EVENT TRACKING WITH GOOGLE ANALYTICS A SAMPLE EXTENSION WHICH USES GOOGLE ANALYTICS TO TRACK USAGE. BACKGROUND_PAGE BROWSER_ACTION POPUP","97c797be0add2ec9ce72747b1ecdbd9b80bc73d9":"EXTENSION DOCS SEARCH SEARCH THE CHROME EXTENSIONS DOCUMENTATION. TO USE, TYPE CRDOC PLUS A SEARCH TERM INTO THE OMNIBOX. BACKGROUND_PAGE TABS CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.ONREMOVED CHROME.TABS.UPDATE","f802b3cce3b05de17dddd7ccfb3394d70f0ba1b5":"GOOGLE CALENDAR CHECKER (BY GOOGLE) QUICKLY SEE THE TIME UNTIL YOUR NEXT MEETING FROM ANY OF YOUR CALENDARS. CLICK ON THE BUTTON TO BE TAKEN TO YOUR CALENDAR. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETICON CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.ONUPDATED CHROME.TABS.UPDATE","e83ae8cea73dfe87e420a9dac5e2906d795263cc":"GOOGLE DOCUMENT LIST VIEWER DEMONSTRATES HOW TO USE OAUTH TO CONNECT THE GOOGLE DOCUMENTS LIST DATA API. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.BROWSERACTION.SETBADGETEXT CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE","8ad6dbf5f536e3181945cd352930da9cc159dc71":"GOOGLE MAIL CHECKER DISPLAYS THE NUMBER OF UNREAD MESSAGES IN YOUR GOOGLE MAIL INBOX. YOU CAN ALSO CLICK THE BUTTON TO OPEN YOUR INBOX. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.ONUPDATED CHROME.TABS.UPDATE","56529b7cbd67869d7fcebd6d46c3efddfe7b598f":"GOOGLE WAVE NOTIFIER FIND OUT WHEN YOU HAVE NEW WAVES AND PREVIEW THEM FAST. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE","6deee0c2a7dbdd62a80deb526005814fa37e6556":"HELLO WORLD THE FIRST EXTENSION THAT I MADE. BROWSER_ACTION POPUP","f0f5a81e76c7b29f8d13543dafd728285ecc96d7":"IDLE - SIMPLE EXAMPLE DEMONSTRATES THE IDLE API BACKGROUND_PAGE BROWSER_ACTION IDLE CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.IDLE.ONSTATECHANGED CHROME.IDLE.QUERYSTATE","6e8555409ac09df65620a4f1651e9f283983eec5":"IGOOGLE NEW TAB PAGE CHROME_URL_OVERRIDES","e08426e68f327ea625937f4668b89da16da0e467":"IMAGEINFO GET IMAGE INFO FOR IMAGES, INCLUDING EXIF DATA BACKGROUND_PAGE CONTEXTMENUS TABS CHROME.CONTEXTMENUS.CREATE CHROME.TABS.GET CHROME.TABS.GETCURRENT CHROME.WINDOWS.CREATE CHROME.WINDOWS.UPDATE","5c7def7e0a26bac297128161b2bb9b2fc279985b":"MAPPY FINDS ADDRESSES IN THE WEB PAGE YOURE ON AND POPS UP A MAP WINDOW. BACKGROUND_PAGE PAGE_ACTION POPUP TABS CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.PAGEACTION.HIDE CHROME.PAGEACTION.SETTITLE CHROME.PAGEACTION.SHOW CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.TABS.SENDREQUEST","d72b4e8576fb00ad176957738099c930cffcfb9e":"MERGE WINDOWS MERGES ALL OF THE BROWSERS WINDOWS INTO THE CURRENT WINDOW BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.MOVE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT","af975d20117c15a36dff66ef5a1ebca92f653969":"MESSAGE TIMER TIMES HOW LONG IT TAKES TO SEND A MESSAGE TO A CONTENT SCRIPT AND BACK. BROWSER_ACTION POPUP TABS CHROME.EXTENSION.ONCONNECT CHROME.EXTENSION.ONREQUEST CHROME.TABS.CONNECT CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.SENDREQUEST","7772f091557a50889effa6e5b19e83b4cf80399b":"MY BOOKMARKS A BROWSER ACTION WITH A POPUP DUMP OF ALL BOOKMARKS, INCLUDING SEARCH, ADD, EDIT AND DELETE. BOOKMARKS BROWSER_ACTION POPUP TABS CHROME.BOOKMARKS.CREATE CHROME.BOOKMARKS.GET CHROME.BOOKMARKS.GETTREE CHROME.BOOKMARKS.REMOVE CHROME.BOOKMARKS.UPDATE CHROME.TABS.CREATE","28c933f585b0903a56f9a16658aa26cf61f9da0f":"NEWS READER DISPLAYS THE FIRST 5 ITEMS FROM THE GOOGLE NEWS - TOP NEWS RSS FEED IN A POPUP. BROWSER_ACTION POPUP TABS CHROME.TABS.CREATE","80e7eac29801029c81ecaabb7c7021bbd0ceea88":"NEWS READER DISPLAYS THE FIRST 5 ITEMS FROM THE GOOGLE NEWS - TOP NEWS RSS FEED IN A POPUP. BROWSER_ACTION POPUP TABS CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE","e9e5f15da193c45aad4d49ced748dfbbd6c904b3":"NEWS READER (BY GOOGLE) DISPLAYS THE LATEST STORIES FROM GOOGLE NEWS IN A POPUP. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.EXTENSION.GETURL CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE","324e557c216dd6edbeb0112ed53d55a05b5e6112":"NOTIFICATION DEMO SHOWS OFF DESKTOP NOTIFICATIONS, WHICH ARE TOAST WINDOWS THAT POP UP ON THE DESKTOP. BACKGROUND_PAGE NOTIFICATIONS OPTIONS_PAGE TABS CHROME.TABS.CREATE","85a9f4cfd3645dfc4d1d90cc559261b689803626":"OMNIBOX EXAMPLE TO USE, TYPE OMNIX PLUS A SEARCH TERM INTO THE OMNIBOX. BACKGROUND_PAGE CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED","56bbb002845c9ada93807b2f83d51447adf146fd":"PAGE ACTION BY CONTENT SHOWS A PAGE ACTION FOR HTML PAGES CONTAINING THE WORD SANDWICH BACKGROUND_PAGE PAGE_ACTION CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.PAGEACTION.SHOW","65afad56921c30f207a30f5ecf929e06b712f552":"PAGE ACTION BY URL SHOWS A PAGE ACTION FOR URLS WHICH HAVE THE LETTER G IN THEM. BACKGROUND_PAGE PAGE_ACTION TABS CHROME.PAGEACTION.SHOW CHROME.TABS.ONUPDATED","7446de67bf18dc34b5ff0fb4e1d9d7d166339bb9":"PAGE BENCHMARKER CHROMIUM PAGE BENCHMARKER. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.CONNECT CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETEXTENSIONTABS CHROME.EXTENSION.GETURL CHROME.EXTENSION.ONCONNECT CHROME.TABS.CREATE CHROME.TABS.EXECUTESCRIPT CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.GETSELECTED CHROME.TABS.REMOVE CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETCURRENT","a9ea9e35b2e9990e488afeb97407655ea14fc8dc":"PRINT THIS PAGE ADDS A PRINT BUTTON TO THE BROWSER. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.TABS.UPDATE","455ec3784d8094b318eac572bc092ec07c5286b0":"PROCESS MONITOR ADDS A BROWSER ACTION THAT MONITORS RESOURCE USAGE OF ALL BROWSER PROCESSES. BROWSER_ACTION EXPERIMENTAL POPUP TABS CHROME.EXPERIMENTAL.PROCESSES.ONUPDATED","545d6989740a0e7f57a9751c2ebc0e250053a08f":"SAMPLE - OAUTH CONTACTS USES OAUTH TO CONNECT TO GOOGLES CONTACTS SERVICE AND DISPLAY A LIST OF YOUR CONTACTS. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE","39a3d4c4282ee5090652938decfb6df79b626151":"SANDWICHBAR SHOWS AN INFOBAR ON PAGES WHICH CONTAIN THE WORD SANDWICH BACKGROUND_PAGE EXPERIMENTAL CHROME.EXPERIMENTAL.INFOBARS.SHOW CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST","364415e46171be6479a095b214eab9783a4648d2":"SHOW TABS IN PROCESS ADDS A BROWSER ACTION SHOWING WHICH TABS SHARE THE CURRENT TABS PROCESS. BROWSER_ACTION EXPERIMENTAL POPUP TABS CHROME.EXPERIMENTAL.PROCESSES.GETPROCESSIDFORTAB CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT CHROME.WINDOWS.UPDATE","ad0d399dfc6d92af6ee9b759d7792a0d0bb85370":"TAB INSPECTOR UTILITY FOR WORKING WITH THE EXTENSION TABS API BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.GETSELECTED CHROME.TABS.MOVE CHROME.TABS.ONATTACHED CHROME.TABS.ONCREATED CHROME.TABS.ONDETACHED CHROME.TABS.ONMOVED CHROME.TABS.ONREMOVED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE CHROME.TABS.UPDATE CHROME.WINDOWS.CREATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT CHROME.WINDOWS.GETLASTFOCUSED CHROME.WINDOWS.ONCREATED CHROME.WINDOWS.ONFOCUSCHANGED CHROME.WINDOWS.ONREMOVED CHROME.WINDOWS.REMOVE CHROME.WINDOWS.UPDATE","1e28bcf89e80466f155ab3a01a76cf5f60cb4104":"TEST SCREENSHOT EXTENSION DEMONSTRATE SCREENSHOT FUNCTIONALITY IN THE CHROME.TABS API. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.EXTENSION.GETVIEWS CHROME.TABS.CAPTUREVISIBLETAB CHROME.TABS.CREATE CHROME.TABS.ONUPDATED","7b375c0f2c88517b42a5a341ac77e0762b481233":"TYPED URL HISTORY READS YOUR HISTORY, AND SHOWS THE TOP TEN PAGES YOU GO TO BY TYPING THE URL. BROWSER_ACTION HISTORY TABS CHROME.HISTORY.GETVISITS CHROME.HISTORY.SEARCH CHROME.TABS.CREATE"}</script>
+<script>var search_data = {"0262260daf0c8f7b28feff2ef23b05e7abf9d1e0":"A BROWSER ACTION WHICH CHANGES ITS ICON WHEN CLICKED. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETICON","ea2894c41cb8e80a4433a3e6c5772dadce9be90d":"A BROWSER ACTION WITH A POPUP THAT CHANGES THE PAGE COLOR. BROWSER_ACTION POPUP TABS CHROME.TABS.EXECUTESCRIPT","ede3c47b7757245be42ec33fd5ca63df4b490066":"A BROWSER ACTION WITH NO ICON THAT MAKES THE PAGE RED BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.TABS.EXECUTESCRIPT","fbf0aa1a09a15ff8cc4fc7de4fd176d6c663d07a":"ACCEPTLANGUAGE RETURNS ACCEPT LANGUAGES OF THE BROWSER BROWSER_ACTION POPUP CHROME.I18N.GETACCEPTLANGUAGES CHROME.I18N.GETMESSAGE","9a6e4ec46997fb92b324974afa08a3d007e2537f":"ANIMATED PAGE ACTION THIS EXTENSION ADDS AN ANIMATED BROWSER ACTION TO THE TOOLBAR. BACKGROUND_PAGE PAGE_ACTION TABS CHROME.PAGEACTION.HIDE CHROME.PAGEACTION.ONCLICKED CHROME.PAGEACTION.SETICON CHROME.PAGEACTION.SETTITLE CHROME.PAGEACTION.SHOW CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED","a1f7cf79dd555b04fa8d603247a040e644996293":"APP LAUNCHER BROWSER_ACTION MANAGEMENT CHROME.EXTENSION.GETURL CHROME.MANAGEMENT.GET CHROME.MANAGEMENT.GETALL CHROME.MANAGEMENT.LAUNCHAPP CHROME.TABS.CREATE","9747e3d6a3eab39bc7c17f11a80573c62d44c7e5":"BLANK NEW TAB PAGE CHROME_URL_OVERRIDES","903e7277139e1e6caec123d3319cab295d8d1b3a":"CHROME SOUNDS ENJOY A MORE MAGICAL AND IMMERSIVE EXPERIENCE WHEN BROWSING THE WEB USING THE POWER OF SOUND. BACKGROUND_PAGE BOOKMARKS OPTIONS_PAGE TABS CHROME.BOOKMARKS.ONCREATED CHROME.BOOKMARKS.ONMOVED CHROME.BOOKMARKS.ONREMOVED CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.TABS.GET CHROME.TABS.ONATTACHED CHROME.TABS.ONCREATED CHROME.TABS.ONDETACHED CHROME.TABS.ONMOVED CHROME.TABS.ONREMOVED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.WINDOWS.ONCREATED CHROME.WINDOWS.ONFOCUSCHANGED CHROME.WINDOWS.ONREMOVED","0e790e035a4a00b6f1def5ef9a7d7be1bce95ab5":"CHROMIUM BUILDBOT MONITOR DISPLAYS THE STATUS OF THE CHROMIUM BUILDBOT IN THE TOOLBAR. CLICK TO SEE MORE DETAILED STATUS IN A POPUP. BACKGROUND_PAGE BROWSER_ACTION NOTIFICATIONS OPTIONS_PAGE POPUP CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.GETURL","ac31228200b41a87982e386cc90d3a6eee4ad885":"CHROMIUM SEARCH ADD SUPPORT TO THE OMNIBOX TO SEARCH THE CHROMIUM SOURCE CODE. BACKGROUND_PAGE TABS CHROME.OMNIBOX.ONINPUTCANCELLED CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED CHROME.OMNIBOX.ONINPUTSTARTED CHROME.OMNIBOX.SETDEFAULTSUGGESTION CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.UPDATE","7d5d6cf195bc25480256618e360aa38c6e6fba82":"CLD DISPLAYS THE LANGUAGE OF A TAB BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.SETBADGETEXT CHROME.TABS.DETECTLANGUAGE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED","5d81304a17cf7ac2887484f730fbd2b01e51e166":"CONTEXT MENUS SAMPLE SHOWS SOME OF THE FEATURES OF THE CONTEXT MENUS API BACKGROUND_PAGE CONTEXTMENUS CHROME.CONTEXTMENUS.CREATE","4daa6becd0899a54776d9cf7f09613ed1a9f4d77":"COOKIE API TEST EXTENSION TESTING COOKIE API BACKGROUND_PAGE BROWSER_ACTION COOKIES TABS CHROME.BROWSERACTION.ONCLICKED CHROME.COOKIES.GET CHROME.COOKIES.GETALL CHROME.COOKIES.ONCHANGED CHROME.COOKIES.REMOVE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL","6871d09f4a96bf9d4b6cc724d00e909cee0f3902":"CROSS-DOMAIN XMLHTTPREQUEST FROM A CONTENT SCRIPT DEMONSTRATES A METHOD TO MAKE A CROSS-DOMAIN XMLHTTPREQUEST FETCH FROM A CONTENT SCRIPT. THIS EXTENSION FETCHES THE CURRENT TRENDING TOPICS FROM TWITTER AND INSERTS THEM IN AN OVERLAY AT THE TOP OF GOOGLE NEWS. VISIT HTTP://NEWS.GOOGLE.COM TO TEST THIS EXTENSION. BACKGROUND_PAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST","028eb5364924344029bcbe1d527f132fc72b34e5":"EMAIL THIS PAGE (BY GOOGLE) THIS EXTENSION ADDS AN EMAIL BUTTON TO THE TOOLBAR WHICH ALLOWS YOU TO EMAIL THE PAGE LINK USING YOUR DEFAULT MAIL CLIENT OR GMAIL. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.CONNECT CHROME.EXTENSION.ONCONNECT CHROME.TABS.CREATE CHROME.TABS.EXECUTESCRIPT CHROME.TABS.UPDATE","763a08e9b06595d785568a8d392b95a2f3700258":"EVENT TRACKING WITH GOOGLE ANALYTICS A SAMPLE EXTENSION WHICH USES GOOGLE ANALYTICS TO TRACK USAGE. BACKGROUND_PAGE BROWSER_ACTION POPUP","e3df888a89e35bdeb9c8bc8d03be5e1851b97c68":"EXTENSION DOCS SEARCH SEARCH THE CHROME EXTENSIONS DOCUMENTATION. TO USE, TYPE CRDOC PLUS A SEARCH TERM INTO THE OMNIBOX. BACKGROUND_PAGE TABS CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.ONREMOVED CHROME.TABS.UPDATE","8b0dd31216235941bdd8eb33fda915ef5cf79a82":"GOOGLE CALENDAR CHECKER (BY GOOGLE) QUICKLY SEE THE TIME UNTIL YOUR NEXT MEETING FROM ANY OF YOUR CALENDARS. CLICK ON THE BUTTON TO BE TAKEN TO YOUR CALENDAR. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETICON CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.ONUPDATED CHROME.TABS.UPDATE","4e35caa9742fb82dbd628892d23a781614f6eff6":"GOOGLE DOCUMENT LIST VIEWER DEMONSTRATES HOW TO USE OAUTH TO CONNECT THE GOOGLE DOCUMENTS LIST DATA API. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.BROWSERACTION.SETBADGETEXT CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE","bb57f7a0132cbeb36ad7e7bb0ab75c21704234ca":"GOOGLE MAIL CHECKER DISPLAYS THE NUMBER OF UNREAD MESSAGES IN YOUR GOOGLE MAIL INBOX. YOU CAN ALSO CLICK THE BUTTON TO OPEN YOUR INBOX. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.ONUPDATED CHROME.TABS.UPDATE","1682e05ea9a1bde985123b04f6f8ac50a8a64033":"GOOGLE WAVE NOTIFIER FIND OUT WHEN YOU HAVE NEW WAVES AND PREVIEW THEM FAST. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE","14b9651fda4e57b2a5914ba73a779812201b750a":"HELLO WORLD THE FIRST EXTENSION THAT I MADE. BROWSER_ACTION POPUP","2020d72f2577f53caf8e94e3dbac0fb849ceaa4d":"IDLE - SIMPLE EXAMPLE DEMONSTRATES THE IDLE API BACKGROUND_PAGE BROWSER_ACTION IDLE CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.IDLE.ONSTATECHANGED CHROME.IDLE.QUERYSTATE","0ea1588bd07b20338fc21f725de1542a5fdf9726":"IGOOGLE NEW TAB PAGE CHROME_URL_OVERRIDES","646325c25f572a1d15edc73d057f821d847a4fbe":"IMAGEINFO GET IMAGE INFO FOR IMAGES, INCLUDING EXIF DATA BACKGROUND_PAGE CONTEXTMENUS TABS CHROME.CONTEXTMENUS.CREATE CHROME.TABS.GET CHROME.TABS.GETCURRENT CHROME.WINDOWS.CREATE CHROME.WINDOWS.UPDATE","ec97ec20ca2f095d081e39f1565fc12af09ef067":"MAPPY FINDS ADDRESSES IN THE WEB PAGE YOURE ON AND POPS UP A MAP WINDOW. BACKGROUND_PAGE PAGE_ACTION POPUP TABS CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.PAGEACTION.HIDE CHROME.PAGEACTION.SETTITLE CHROME.PAGEACTION.SHOW CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.TABS.SENDREQUEST","b2f5f8a790e16f091a7e4e0a39b2d0a6d32e3a6d":"MERGE WINDOWS MERGES ALL OF THE BROWSERS WINDOWS INTO THE CURRENT WINDOW BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.MOVE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT","51a83d2ba3a32e3ff1bdb624d4e18ccec4c4038e":"MESSAGE TIMER TIMES HOW LONG IT TAKES TO SEND A MESSAGE TO A CONTENT SCRIPT AND BACK. BROWSER_ACTION POPUP TABS CHROME.EXTENSION.ONCONNECT CHROME.EXTENSION.ONREQUEST CHROME.TABS.CONNECT CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.SENDREQUEST","4f6785ec4f937add6728615682dd37c9a42d9548":"MY BOOKMARKS A BROWSER ACTION WITH A POPUP DUMP OF ALL BOOKMARKS, INCLUDING SEARCH, ADD, EDIT AND DELETE. BOOKMARKS BROWSER_ACTION POPUP TABS CHROME.BOOKMARKS.CREATE CHROME.BOOKMARKS.GET CHROME.BOOKMARKS.GETTREE CHROME.BOOKMARKS.REMOVE CHROME.BOOKMARKS.UPDATE CHROME.TABS.CREATE","597015d3bcce3da693b02314afd607bec4f55291":"NEWS READER DISPLAYS THE FIRST 5 ITEMS FROM THE GOOGLE NEWS - TOP NEWS RSS FEED IN A POPUP. BROWSER_ACTION POPUP TABS CHROME.TABS.CREATE","6444e5c8ae112a6a433909c5e770669cd16e2e5f":"NEWS READER DISPLAYS THE FIRST 5 ITEMS FROM THE GOOGLE NEWS - TOP NEWS RSS FEED IN A POPUP. BROWSER_ACTION POPUP TABS CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE","3aea027164cb9b732ba4a8c51cb93708891726ef":"NEWS READER (BY GOOGLE) DISPLAYS THE LATEST STORIES FROM GOOGLE NEWS IN A POPUP. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.EXTENSION.GETURL CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE","f799e26ceef2367cf836f24bcb47df4398b0df58":"NOTIFICATION DEMO SHOWS OFF DESKTOP NOTIFICATIONS, WHICH ARE TOAST WINDOWS THAT POP UP ON THE DESKTOP. BACKGROUND_PAGE NOTIFICATIONS OPTIONS_PAGE TABS CHROME.TABS.CREATE","e787b322bddbc6289bb31b7d7550b1bf6456a80b":"OMNIBOX EXAMPLE TO USE, TYPE OMNIX PLUS A SEARCH TERM INTO THE OMNIBOX. BACKGROUND_PAGE CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED","8d0a50b57c26bb498be592e871001ffed91541b4":"PAGE ACTION BY CONTENT SHOWS A PAGE ACTION FOR HTML PAGES CONTAINING THE WORD SANDWICH BACKGROUND_PAGE PAGE_ACTION CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.PAGEACTION.SHOW","80b86ccc6e8520660fa591caa565826f0ed1b12c":"PAGE ACTION BY URL SHOWS A PAGE ACTION FOR URLS WHICH HAVE THE LETTER G IN THEM. BACKGROUND_PAGE PAGE_ACTION TABS CHROME.PAGEACTION.SHOW CHROME.TABS.ONUPDATED","d74c3c18a1c1dd18b035149105a306f837c8823e":"PAGE BENCHMARKER CHROMIUM PAGE BENCHMARKER. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.CONNECT CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETEXTENSIONTABS CHROME.EXTENSION.GETURL CHROME.EXTENSION.ONCONNECT CHROME.TABS.CREATE CHROME.TABS.EXECUTESCRIPT CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.GETSELECTED CHROME.TABS.REMOVE CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETCURRENT","e6ae17ab4ccfd7e059c8c01f25760ca5d894c7fd":"PRINT THIS PAGE ADDS A PRINT BUTTON TO THE BROWSER. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.TABS.UPDATE","beff6ecd9677dea0a7c648c5042165b48bb66f09":"PROCESS MONITOR ADDS A BROWSER ACTION THAT MONITORS RESOURCE USAGE OF ALL BROWSER PROCESSES. BROWSER_ACTION EXPERIMENTAL POPUP TABS CHROME.EXPERIMENTAL.PROCESSES.ONUPDATED","56a8d2ac24ca7bba78fd88ad57f43fc13c784497":"SAMPLE - OAUTH CONTACTS USES OAUTH TO CONNECT TO GOOGLES CONTACTS SERVICE AND DISPLAY A LIST OF YOUR CONTACTS. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE","38f6e1e17756ede38b1364c7114a738ca717dcbb":"SANDWICHBAR SHOWS AN INFOBAR ON PAGES WHICH CONTAIN THE WORD SANDWICH BACKGROUND_PAGE EXPERIMENTAL CHROME.EXPERIMENTAL.INFOBARS.SHOW CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST","fc89b35755483af30b66cd72cefa34a43a3e8312":"SHOW TABS IN PROCESS ADDS A BROWSER ACTION SHOWING WHICH TABS SHARE THE CURRENT TABS PROCESS. BROWSER_ACTION EXPERIMENTAL POPUP TABS CHROME.EXPERIMENTAL.PROCESSES.GETPROCESSIDFORTAB CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT CHROME.WINDOWS.UPDATE","230463f2d5c3d4d0ca13c230e1f00f2aae0a8a64":"TAB INSPECTOR UTILITY FOR WORKING WITH THE EXTENSION TABS API BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.GETSELECTED CHROME.TABS.MOVE CHROME.TABS.ONATTACHED CHROME.TABS.ONCREATED CHROME.TABS.ONDETACHED CHROME.TABS.ONMOVED CHROME.TABS.ONREMOVED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE CHROME.TABS.UPDATE CHROME.WINDOWS.CREATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT CHROME.WINDOWS.GETLASTFOCUSED CHROME.WINDOWS.ONCREATED CHROME.WINDOWS.ONFOCUSCHANGED CHROME.WINDOWS.ONREMOVED CHROME.WINDOWS.REMOVE CHROME.WINDOWS.UPDATE","e1697cacebad05218798bf3e8a0f724517f0e8c3":"TEST SCREENSHOT EXTENSION DEMONSTRATE SCREENSHOT FUNCTIONALITY IN THE CHROME.TABS API. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.EXTENSION.GETVIEWS CHROME.TABS.CAPTUREVISIBLETAB CHROME.TABS.CREATE CHROME.TABS.ONUPDATED","b3de91ab04b7d7a2670ca7ee9d740eb42cead0b6":"TYPED URL HISTORY READS YOUR HISTORY, AND SHOWS THE TOP TEN PAGES YOU GO TO BY TYPING THE URL. BROWSER_ACTION HISTORY TABS CHROME.HISTORY.GETVISITS CHROME.HISTORY.SEARCH CHROME.TABS.CREATE"}</script>
<script src="js/sample_search.js"></script>
@@ -361,11 +361,11 @@
</div>
</div>
-<div class="sample" id="4da084813a9c0f3de28821a1c8d2504f5f7bcbad">
+<div class="sample" id="0262260daf0c8f7b28feff2ef23b05e7abf9d1e0">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#4da084813a9c0f3de28821a1c8d2504f5f7bcbad">A browser action which changes its icon when clicked.</a>
+ <a href="#0262260daf0c8f7b28feff2ef23b05e7abf9d1e0">A browser action which changes its icon when clicked.</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -392,21 +392,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\set_icon_path\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\set_icon_path\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\set_icon_path\">Browse source</a>
- - <a href="examples\api\browserAction\set_icon_path.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/set_icon_path/">Browse source</a>
+ - <a href="examples/api/browserAction/set_icon_path.zip">Download source</a>
</div>
-</div><div class="sample" id="0569ec913dfd1aa4fad58fff04af99b0de7ec4b6">
+</div><div class="sample" id="ea2894c41cb8e80a4433a3e6c5772dadce9be90d">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#0569ec913dfd1aa4fad58fff04af99b0de7ec4b6">A browser action with a popup that changes the page color.</a>
+ <a href="#ea2894c41cb8e80a4433a3e6c5772dadce9be90d">A browser action with a popup that changes the page color.</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -431,21 +431,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\set_page_color\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\set_page_color\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\set_page_color\">Browse source</a>
- - <a href="examples\api\browserAction\set_page_color.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/set_page_color/">Browse source</a>
+ - <a href="examples/api/browserAction/set_page_color.zip">Download source</a>
</div>
-</div><div class="sample" id="a02f64d5e8c8f96efb45b26c11bfa2320deddd36">
+</div><div class="sample" id="ede3c47b7757245be42ec33fd5ca63df4b490066">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#a02f64d5e8c8f96efb45b26c11bfa2320deddd36">A browser action with no icon that makes the page red</a>
+ <a href="#ede3c47b7757245be42ec33fd5ca63df4b490066">A browser action with no icon that makes the page red</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -476,21 +476,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\make_page_red\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\make_page_red\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\make_page_red\">Browse source</a>
- - <a href="examples\api\browserAction\make_page_red.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/make_page_red/">Browse source</a>
+ - <a href="examples/api/browserAction/make_page_red.zip">Download source</a>
</div>
-</div><div class="sample" id="ebed3a237b5606a154cfc0e6326821154607d388">
+</div><div class="sample" id="fbf0aa1a09a15ff8cc4fc7de4fd176d6c663d07a">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#ebed3a237b5606a154cfc0e6326821154607d388">AcceptLanguage</a>
+ <a href="#fbf0aa1a09a15ff8cc4fc7de4fd176d6c663d07a">AcceptLanguage</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -514,27 +514,27 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\getMessage\_locales\en_US\messages.json?content-type=text/plain">_locales\en_US\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/getMessage/_locales/en_US/messages.json?content-type=text/plain">_locales/en_US/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\getMessage\_locales\es\messages.json?content-type=text/plain">_locales\es\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/getMessage/_locales/es/messages.json?content-type=text/plain">_locales/es/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\getMessage\_locales\sr\messages.json?content-type=text/plain">_locales\sr\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/getMessage/_locales/sr/messages.json?content-type=text/plain">_locales/sr/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\getMessage\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/getMessage/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\getMessage\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/getMessage/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\getMessage\">Browse source</a>
- - <a href="examples\api\i18n\getMessage.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/getMessage/">Browse source</a>
+ - <a href="examples/api/i18n/getMessage.zip">Download source</a>
</div>
-</div><div class="sample" id="2f7777c80368bb0a8caf057dffaadd5feed7e9ee">
+</div><div class="sample" id="9a6e4ec46997fb92b324974afa08a3d007e2537f">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#2f7777c80368bb0a8caf057dffaadd5feed7e9ee">Animated Page Action</a>
+ <a href="#9a6e4ec46997fb92b324974afa08a3d007e2537f">Animated Page Action</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -573,21 +573,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\set_icon\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/set_icon/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\set_icon\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/set_icon/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\set_icon\">Browse source</a>
- - <a href="examples\api\pageAction\set_icon.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/set_icon/">Browse source</a>
+ - <a href="examples/api/pageAction/set_icon.zip">Download source</a>
</div>
-</div><div class="sample" id="4da5aeb0840b36af753e694f2e81c90620494688">
+</div><div class="sample" id="a1f7cf79dd555b04fa8d603247a040e644996293">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#4da5aeb0840b36af753e694f2e81c90620494688">App Launcher</a>
+ <a href="#a1f7cf79dd555b04fa8d603247a040e644996293">App Launcher</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -617,25 +617,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\app_launcher\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/app_launcher/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\app_launcher\popup.css?content-type=text/plain">popup.css</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/app_launcher/popup.css?content-type=text/plain">popup.css</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\app_launcher\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/app_launcher/popup.html?content-type=text/plain">popup.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\app_launcher\popup.js?content-type=text/plain">popup.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/app_launcher/popup.js?content-type=text/plain">popup.js</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\app_launcher\">Browse source</a>
- - <a href="examples\extensions\app_launcher.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/app_launcher/">Browse source</a>
+ - <a href="examples/extensions/app_launcher.zip">Download source</a>
</div>
-</div><div class="sample" id="63349d2a4f5ec8f315a05fc9b1cab181ad546fd2">
+</div><div class="sample" id="9747e3d6a3eab39bc7c17f11a80573c62d44c7e5">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#63349d2a4f5ec8f315a05fc9b1cab181ad546fd2">Blank new tab page</a>
+ <a href="#9747e3d6a3eab39bc7c17f11a80573c62d44c7e5">Blank new tab page</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -654,21 +654,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\override\blank_ntp\blank.html?content-type=text/plain">blank.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/override/blank_ntp/blank.html?content-type=text/plain">blank.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\override\blank_ntp\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/override/blank_ntp/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\override\blank_ntp\">Browse source</a>
- - <a href="examples\api\override\blank_ntp.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/override/blank_ntp/">Browse source</a>
+ - <a href="examples/api/override/blank_ntp.zip">Download source</a>
</div>
-</div><div class="sample" id="4c45b5015d2ca5f9053514ac70ff3acc3bca1f76">
- <img class="icon" src="examples\extensions\fx\icon.png">
+</div><div class="sample" id="903e7277139e1e6caec123d3319cab295d8d1b3a">
+ <img class="icon" src="examples/extensions/fx/icon.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#4c45b5015d2ca5f9053514ac70ff3acc3bca1f76">Chrome Sounds</a>
+ <a href="#903e7277139e1e6caec123d3319cab295d8d1b3a">Chrome Sounds</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -728,27 +728,27 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\fx\bg.html?content-type=text/plain">bg.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/fx/bg.html?content-type=text/plain">bg.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\fx\bg.js?content-type=text/plain">bg.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/fx/bg.js?content-type=text/plain">bg.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\fx\content.js?content-type=text/plain">content.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/fx/content.js?content-type=text/plain">content.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\fx\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/fx/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\fx\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/fx/options.html?content-type=text/plain">options.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\fx\">Browse source</a>
- - <a href="examples\extensions\fx.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/fx/">Browse source</a>
+ - <a href="examples/extensions/fx.zip">Download source</a>
</div>
-</div><div class="sample" id="2f41f968c8b6ddfc078363e305d2b530802a11dd">
- <img class="icon" src="examples\extensions\buildbot\icon.png">
+</div><div class="sample" id="0e790e035a4a00b6f1def5ef9a7d7be1bce95ab5">
+ <img class="icon" src="examples/extensions/buildbot/icon.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#2f41f968c8b6ddfc078363e305d2b530802a11dd">Chromium Buildbot Monitor</a>
+ <a href="#0e790e035a4a00b6f1def5ef9a7d7be1bce95ab5">Chromium Buildbot Monitor</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -785,25 +785,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\buildbot\bg.html?content-type=text/plain">bg.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/buildbot/bg.html?content-type=text/plain">bg.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\buildbot\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/buildbot/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\buildbot\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/buildbot/options.html?content-type=text/plain">options.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\buildbot\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/buildbot/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\buildbot\">Browse source</a>
- - <a href="examples\extensions\buildbot.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/buildbot/">Browse source</a>
+ - <a href="examples/extensions/buildbot.zip">Download source</a>
</div>
-</div><div class="sample" id="32ff053c4a55b305243c83756304ca7c9d135ed0">
+</div><div class="sample" id="ac31228200b41a87982e386cc90d3a6eee4ad885">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#32ff053c4a55b305243c83756304ca7c9d135ed0">Chromium Search</a>
+ <a href="#ac31228200b41a87982e386cc90d3a6eee4ad885">Chromium Search</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -839,21 +839,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\chrome_search\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/chrome_search/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\chrome_search\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/chrome_search/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\chrome_search\">Browse source</a>
- - <a href="examples\extensions\chrome_search.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/chrome_search/">Browse source</a>
+ - <a href="examples/extensions/chrome_search.zip">Download source</a>
</div>
-</div><div class="sample" id="6484bb796d9aef70aa1026c0edc0799bc7a48b68">
+</div><div class="sample" id="7d5d6cf195bc25480256618e360aa38c6e6fba82">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#6484bb796d9aef70aa1026c0edc0799bc7a48b68">CLD</a>
+ <a href="#7d5d6cf195bc25480256618e360aa38c6e6fba82">CLD</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -888,21 +888,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\cld\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/cld/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\cld\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/cld/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\i18n\cld\">Browse source</a>
- - <a href="examples\api\i18n\cld.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/i18n/cld/">Browse source</a>
+ - <a href="examples/api/i18n/cld.zip">Download source</a>
</div>
-</div><div class="sample" id="8818cf9ded850b5f0ba7348127526eb00165f202">
+</div><div class="sample" id="5d81304a17cf7ac2887484f730fbd2b01e51e166">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#8818cf9ded850b5f0ba7348127526eb00165f202">Context Menus Sample</a>
+ <a href="#5d81304a17cf7ac2887484f730fbd2b01e51e166">Context Menus Sample</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -924,23 +924,23 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\contextMenus\basic\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/contextMenus/basic/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\contextMenus\basic\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/contextMenus/basic/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\contextMenus\basic\sample.js?content-type=text/plain">sample.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/contextMenus/basic/sample.js?content-type=text/plain">sample.js</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\contextMenus\basic\">Browse source</a>
- - <a href="examples\api\contextMenus\basic.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/contextMenus/basic/">Browse source</a>
+ - <a href="examples/api/contextMenus/basic.zip">Download source</a>
</div>
-</div><div class="sample" id="ba79d21d1e9a1cf5edebc246b11f667406cb001f">
- <img class="icon" src="examples\api\cookies\cookie.png">
+</div><div class="sample" id="4daa6becd0899a54776d9cf7f09613ed1a9f4d77">
+ <img class="icon" src="examples/api/cookies/cookie.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#ba79d21d1e9a1cf5edebc246b11f667406cb001f">Cookie API Test Extension</a>
+ <a href="#4daa6becd0899a54776d9cf7f09613ed1a9f4d77">Cookie API Test Extension</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -986,23 +986,23 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\cookies\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/cookies/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\cookies\manager.html?content-type=text/plain">manager.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/cookies/manager.html?content-type=text/plain">manager.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\cookies\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/cookies/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\cookies\">Browse source</a>
- - <a href="examples\api\cookies.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/cookies/">Browse source</a>
+ - <a href="examples/api/cookies.zip">Download source</a>
</div>
-</div><div class="sample" id="b6ab1c298a1c1f939b393f36868c937391502112">
- <img class="icon" src="examples\howto\contentscript_xhr\sample-128.png">
+</div><div class="sample" id="6871d09f4a96bf9d4b6cc724d00e909cee0f3902">
+ <img class="icon" src="examples/howto/contentscript_xhr/sample-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#b6ab1c298a1c1f939b393f36868c937391502112">Cross-domain XMLHttpRequest from a content script</a>
+ <a href="#6871d09f4a96bf9d4b6cc724d00e909cee0f3902">Cross-domain XMLHttpRequest from a content script</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1023,23 +1023,23 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\howto\contentscript_xhr\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/howto/contentscript_xhr/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\howto\contentscript_xhr\contentscript.js?content-type=text/plain">contentscript.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/howto/contentscript_xhr/contentscript.js?content-type=text/plain">contentscript.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\howto\contentscript_xhr\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/howto/contentscript_xhr/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\howto\contentscript_xhr\">Browse source</a>
- - <a href="examples\howto\contentscript_xhr.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/howto/contentscript_xhr/">Browse source</a>
+ - <a href="examples/howto/contentscript_xhr.zip">Download source</a>
</div>
-</div><div class="sample" id="fad4ea2189bbcce1d2669a409ed296b10ec8b7c9">
- <img class="icon" src="examples\extensions\email_this_page\mail_128x128.png">
+</div><div class="sample" id="028eb5364924344029bcbe1d527f132fc72b34e5">
+ <img class="icon" src="examples/extensions/email_this_page/mail_128x128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#fad4ea2189bbcce1d2669a409ed296b10ec8b7c9">Email this page (by Google)</a>
+ <a href="#028eb5364924344029bcbe1d527f132fc72b34e5">Email this page (by Google)</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1077,25 +1077,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\email_this_page\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\email_this_page\content_script.js?content-type=text/plain">content_script.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/content_script.js?content-type=text/plain">content_script.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\email_this_page\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\email_this_page\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/options.html?content-type=text/plain">options.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\email_this_page\">Browse source</a>
- - <a href="examples\extensions\email_this_page.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/">Browse source</a>
+ - <a href="examples/extensions/email_this_page.zip">Download source</a>
</div>
-</div><div class="sample" id="26af638d88737474bed3837343caa13f3b924615">
- <img class="icon" src="examples\tutorials\analytics\analytics-extension-icon-128.png">
+</div><div class="sample" id="763a08e9b06595d785568a8d392b95a2f3700258">
+ <img class="icon" src="examples/tutorials/analytics/analytics-extension-icon-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#26af638d88737474bed3837343caa13f3b924615">Event Tracking with Google Analytics</a>
+ <a href="#763a08e9b06595d785568a8d392b95a2f3700258">Event Tracking with Google Analytics</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1120,25 +1120,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\analytics\analytics.js?content-type=text/plain">analytics.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/analytics/analytics.js?content-type=text/plain">analytics.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\analytics\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/analytics/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\analytics\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/analytics/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\analytics\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/analytics/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\analytics\">Browse source</a>
- - <a href="examples\tutorials\analytics.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/analytics/">Browse source</a>
+ - <a href="examples/tutorials/analytics.zip">Download source</a>
</div>
-</div><div class="sample" id="97c797be0add2ec9ce72747b1ecdbd9b80bc73d9">
- <img class="icon" src="examples\api\omnibox\extension-docs\icon-128.png">
+</div><div class="sample" id="e3df888a89e35bdeb9c8bc8d03be5e1851b97c68">
+ <img class="icon" src="examples/api/omnibox/extension-docs/icon-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#97c797be0add2ec9ce72747b1ecdbd9b80bc73d9">Extension Docs Search</a>
+ <a href="#e3df888a89e35bdeb9c8bc8d03be5e1851b97c68">Extension Docs Search</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1170,21 +1170,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\omnibox\extension-docs\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\omnibox\extension-docs\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\omnibox\extension-docs\">Browse source</a>
- - <a href="examples\api\omnibox\extension-docs.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/omnibox/extension-docs/">Browse source</a>
+ - <a href="examples/api/omnibox/extension-docs.zip">Download source</a>
</div>
-</div><div class="sample" id="f802b3cce3b05de17dddd7ccfb3394d70f0ba1b5">
- <img class="icon" src="examples\extensions\calendar\images/icon-128.gif">
+</div><div class="sample" id="8b0dd31216235941bdd8eb33fda915ef5cf79a82">
+ <img class="icon" src="examples/extensions/calendar/images/icon-128.gif">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#f802b3cce3b05de17dddd7ccfb3394d70f0ba1b5">Google Calendar Checker (by Google)</a>
+ <a href="#8b0dd31216235941bdd8eb33fda915ef5cf79a82">Google Calendar Checker (by Google)</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1238,31 +1238,31 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\_locales\en\messages.json?content-type=text/plain">_locales\en\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/_locales/en/messages.json?content-type=text/plain">_locales/en/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\javascript\background.js?content-type=text/plain">javascript\background.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/javascript/background.js?content-type=text/plain">javascript/background.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\javascript\options.js?content-type=text/plain">javascript\options.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/javascript/options.js?content-type=text/plain">javascript/options.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\javascript\util.js?content-type=text/plain">javascript\util.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/javascript/util.js?content-type=text/plain">javascript/util.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\views\background.html?content-type=text/plain">views\background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/views/background.html?content-type=text/plain">views/background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\views\options.html?content-type=text/plain">views\options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/views/options.html?content-type=text/plain">views/options.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\calendar\">Browse source</a>
- - <a href="examples\extensions\calendar.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/calendar/">Browse source</a>
+ - <a href="examples/extensions/calendar.zip">Download source</a>
</div>
-</div><div class="sample" id="e83ae8cea73dfe87e420a9dac5e2906d795263cc">
- <img class="icon" src="examples\extensions\gdocs\img/docs_spreadsheets-128.gif">
+</div><div class="sample" id="4e35caa9742fb82dbd628892d23a781614f6eff6">
+ <img class="icon" src="examples/extensions/gdocs/img/docs_spreadsheets-128.gif">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#e83ae8cea73dfe87e420a9dac5e2906d795263cc">Google Document List Viewer</a>
+ <a href="#4e35caa9742fb82dbd628892d23a781614f6eff6">Google Document List Viewer</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1307,33 +1307,33 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\chrome_ex_oauth.html?content-type=text/plain">chrome_ex_oauth.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/chrome_ex_oauth.html?content-type=text/plain">chrome_ex_oauth.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\chrome_ex_oauth.js?content-type=text/plain">chrome_ex_oauth.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/chrome_ex_oauth.js?content-type=text/plain">chrome_ex_oauth.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\chrome_ex_oauthsimple.js?content-type=text/plain">chrome_ex_oauthsimple.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/chrome_ex_oauthsimple.js?content-type=text/plain">chrome_ex_oauthsimple.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\js\jquery-1.4.1.min.js?content-type=text/plain">js\jquery-1.4.1.min.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/js/jquery-1.4.1.min.js?content-type=text/plain">js/jquery-1.4.1.min.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/options.html?content-type=text/plain">options.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gdocs\">Browse source</a>
- - <a href="examples\extensions\gdocs.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gdocs/">Browse source</a>
+ - <a href="examples/extensions/gdocs.zip">Download source</a>
</div>
-</div><div class="sample" id="8ad6dbf5f536e3181945cd352930da9cc159dc71">
- <img class="icon" src="examples\extensions\gmail\icon_128.png">
+</div><div class="sample" id="bb57f7a0132cbeb36ad7e7bb0ab75c21704234ca">
+ <img class="icon" src="examples/extensions/gmail/icon_128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#8ad6dbf5f536e3181945cd352930da9cc159dc71">Google Mail Checker</a>
+ <a href="#bb57f7a0132cbeb36ad7e7bb0ab75c21704234ca">Google Mail Checker</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1381,107 +1381,107 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\ar\messages.json?content-type=text/plain">_locales\ar\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/ar/messages.json?content-type=text/plain">_locales/ar/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\bg\messages.json?content-type=text/plain">_locales\bg\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/bg/messages.json?content-type=text/plain">_locales/bg/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\ca\messages.json?content-type=text/plain">_locales\ca\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/ca/messages.json?content-type=text/plain">_locales/ca/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\cs\messages.json?content-type=text/plain">_locales\cs\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/cs/messages.json?content-type=text/plain">_locales/cs/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\da\messages.json?content-type=text/plain">_locales\da\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/da/messages.json?content-type=text/plain">_locales/da/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\de\messages.json?content-type=text/plain">_locales\de\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/de/messages.json?content-type=text/plain">_locales/de/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\el\messages.json?content-type=text/plain">_locales\el\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/el/messages.json?content-type=text/plain">_locales/el/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\en\messages.json?content-type=text/plain">_locales\en\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/en/messages.json?content-type=text/plain">_locales/en/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\en_GB\messages.json?content-type=text/plain">_locales\en_GB\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/en_GB/messages.json?content-type=text/plain">_locales/en_GB/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\es\messages.json?content-type=text/plain">_locales\es\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/es/messages.json?content-type=text/plain">_locales/es/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\es_419\messages.json?content-type=text/plain">_locales\es_419\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/es_419/messages.json?content-type=text/plain">_locales/es_419/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\et\messages.json?content-type=text/plain">_locales\et\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/et/messages.json?content-type=text/plain">_locales/et/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\fi\messages.json?content-type=text/plain">_locales\fi\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/fi/messages.json?content-type=text/plain">_locales/fi/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\fil\messages.json?content-type=text/plain">_locales\fil\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/fil/messages.json?content-type=text/plain">_locales/fil/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\fr\messages.json?content-type=text/plain">_locales\fr\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/fr/messages.json?content-type=text/plain">_locales/fr/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\he\messages.json?content-type=text/plain">_locales\he\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/he/messages.json?content-type=text/plain">_locales/he/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\hi\messages.json?content-type=text/plain">_locales\hi\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/hi/messages.json?content-type=text/plain">_locales/hi/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\hr\messages.json?content-type=text/plain">_locales\hr\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/hr/messages.json?content-type=text/plain">_locales/hr/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\hu\messages.json?content-type=text/plain">_locales\hu\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/hu/messages.json?content-type=text/plain">_locales/hu/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\id\messages.json?content-type=text/plain">_locales\id\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/id/messages.json?content-type=text/plain">_locales/id/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\it\messages.json?content-type=text/plain">_locales\it\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/it/messages.json?content-type=text/plain">_locales/it/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\ja\messages.json?content-type=text/plain">_locales\ja\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/ja/messages.json?content-type=text/plain">_locales/ja/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\ko\messages.json?content-type=text/plain">_locales\ko\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/ko/messages.json?content-type=text/plain">_locales/ko/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\lt\messages.json?content-type=text/plain">_locales\lt\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/lt/messages.json?content-type=text/plain">_locales/lt/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\lv\messages.json?content-type=text/plain">_locales\lv\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/lv/messages.json?content-type=text/plain">_locales/lv/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\nb\messages.json?content-type=text/plain">_locales\nb\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/nb/messages.json?content-type=text/plain">_locales/nb/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\nl\messages.json?content-type=text/plain">_locales\nl\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/nl/messages.json?content-type=text/plain">_locales/nl/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\pl\messages.json?content-type=text/plain">_locales\pl\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/pl/messages.json?content-type=text/plain">_locales/pl/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\pt_BR\messages.json?content-type=text/plain">_locales\pt_BR\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/pt_BR/messages.json?content-type=text/plain">_locales/pt_BR/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\pt_PT\messages.json?content-type=text/plain">_locales\pt_PT\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/pt_PT/messages.json?content-type=text/plain">_locales/pt_PT/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\ro\messages.json?content-type=text/plain">_locales\ro\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/ro/messages.json?content-type=text/plain">_locales/ro/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\ru\messages.json?content-type=text/plain">_locales\ru\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/ru/messages.json?content-type=text/plain">_locales/ru/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\sk\messages.json?content-type=text/plain">_locales\sk\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/sk/messages.json?content-type=text/plain">_locales/sk/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\sl\messages.json?content-type=text/plain">_locales\sl\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/sl/messages.json?content-type=text/plain">_locales/sl/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\sr\messages.json?content-type=text/plain">_locales\sr\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/sr/messages.json?content-type=text/plain">_locales/sr/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\sv\messages.json?content-type=text/plain">_locales\sv\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/sv/messages.json?content-type=text/plain">_locales/sv/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\th\messages.json?content-type=text/plain">_locales\th\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/th/messages.json?content-type=text/plain">_locales/th/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\tr\messages.json?content-type=text/plain">_locales\tr\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/tr/messages.json?content-type=text/plain">_locales/tr/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\uk\messages.json?content-type=text/plain">_locales\uk\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/uk/messages.json?content-type=text/plain">_locales/uk/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\vi\messages.json?content-type=text/plain">_locales\vi\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/vi/messages.json?content-type=text/plain">_locales/vi/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\zh_CN\messages.json?content-type=text/plain">_locales\zh_CN\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/zh_CN/messages.json?content-type=text/plain">_locales/zh_CN/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\_locales\zh_TW\messages.json?content-type=text/plain">_locales\zh_TW\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/_locales/zh_TW/messages.json?content-type=text/plain">_locales/zh_TW/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/options.html?content-type=text/plain">options.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\gmail\">Browse source</a>
- - <a href="examples\extensions\gmail.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/gmail/">Browse source</a>
+ - <a href="examples/extensions/gmail.zip">Download source</a>
</div>
-</div><div class="sample" id="56529b7cbd67869d7fcebd6d46c3efddfe7b598f">
- <img class="icon" src="examples\extensions\wave\128.png">
+</div><div class="sample" id="1682e05ea9a1bde985123b04f6f8ac50a8a64033">
+ <img class="icon" src="examples/extensions/wave/128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#56529b7cbd67869d7fcebd6d46c3efddfe7b598f">Google Wave Notifier</a>
+ <a href="#1682e05ea9a1bde985123b04f6f8ac50a8a64033">Google Wave Notifier</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1524,33 +1524,33 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\chrome_ex_oauth.html?content-type=text/plain">chrome_ex_oauth.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/chrome_ex_oauth.html?content-type=text/plain">chrome_ex_oauth.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\chrome_ex_oauth.js?content-type=text/plain">chrome_ex_oauth.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/chrome_ex_oauth.js?content-type=text/plain">chrome_ex_oauth.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\chrome_ex_oauthsimple.js?content-type=text/plain">chrome_ex_oauthsimple.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/chrome_ex_oauthsimple.js?content-type=text/plain">chrome_ex_oauthsimple.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/options.html?content-type=text/plain">options.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/popup.html?content-type=text/plain">popup.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\prettyload.js?content-type=text/plain">prettyload.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/prettyload.js?content-type=text/plain">prettyload.js</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\wave\">Browse source</a>
- - <a href="examples\extensions\wave.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/wave/">Browse source</a>
+ - <a href="examples/extensions/wave.zip">Download source</a>
</div>
-</div><div class="sample" id="6deee0c2a7dbdd62a80deb526005814fa37e6556">
+</div><div class="sample" id="14b9651fda4e57b2a5914ba73a779812201b750a">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#6deee0c2a7dbdd62a80deb526005814fa37e6556">Hello World</a>
+ <a href="#14b9651fda4e57b2a5914ba73a779812201b750a">Hello World</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1572,21 +1572,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\getstarted\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/getstarted/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\getstarted\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/getstarted/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\tutorials\getstarted\">Browse source</a>
- - <a href="examples\tutorials\getstarted.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/getstarted/">Browse source</a>
+ - <a href="examples/tutorials/getstarted.zip">Download source</a>
</div>
-</div><div class="sample" id="f0f5a81e76c7b29f8d13543dafd728285ecc96d7">
- <img class="icon" src="examples\api\idle\idle_simple\sample-128.png">
+</div><div class="sample" id="2020d72f2577f53caf8e94e3dbac0fb849ceaa4d">
+ <img class="icon" src="examples/api/idle/idle_simple/sample-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#f0f5a81e76c7b29f8d13543dafd728285ecc96d7">Idle - Simple Example</a>
+ <a href="#2020d72f2577f53caf8e94e3dbac0fb849ceaa4d">Idle - Simple Example</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1617,23 +1617,23 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\idle\idle_simple\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/idle/idle_simple/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\idle\idle_simple\history.html?content-type=text/plain">history.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/idle/idle_simple/history.html?content-type=text/plain">history.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\idle\idle_simple\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/idle/idle_simple/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\idle\idle_simple\">Browse source</a>
- - <a href="examples\api\idle\idle_simple.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/idle/idle_simple/">Browse source</a>
+ - <a href="examples/api/idle/idle_simple.zip">Download source</a>
</div>
-</div><div class="sample" id="6e8555409ac09df65620a4f1651e9f283983eec5">
+</div><div class="sample" id="0ea1588bd07b20338fc21f725de1542a5fdf9726">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#6e8555409ac09df65620a4f1651e9f283983eec5">iGoogle new tab page</a>
+ <a href="#0ea1588bd07b20338fc21f725de1542a5fdf9726">iGoogle new tab page</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1652,21 +1652,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\override\override_igoogle\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/override/override_igoogle/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\override\override_igoogle\redirect.html?content-type=text/plain">redirect.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/override/override_igoogle/redirect.html?content-type=text/plain">redirect.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\override\override_igoogle\">Browse source</a>
- - <a href="examples\api\override\override_igoogle.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/override/override_igoogle/">Browse source</a>
+ - <a href="examples/api/override/override_igoogle.zip">Download source</a>
</div>
-</div><div class="sample" id="e08426e68f327ea625937f4668b89da16da0e467">
- <img class="icon" src="examples\extensions\imageinfo\imageinfo-128.png">
+</div><div class="sample" id="646325c25f572a1d15edc73d057f821d847a4fbe">
+ <img class="icon" src="examples/extensions/imageinfo/imageinfo-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#e08426e68f327ea625937f4668b89da16da0e467">Imageinfo</a>
+ <a href="#646325c25f572a1d15edc73d057f821d847a4fbe">Imageinfo</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1699,29 +1699,29 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\imageinfo\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/imageinfo/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\imageinfo\imageinfo\binaryajax.js?content-type=text/plain">imageinfo\binaryajax.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo/binaryajax.js?content-type=text/plain">imageinfo/binaryajax.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\imageinfo\imageinfo\exif.js?content-type=text/plain">imageinfo\exif.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo/exif.js?content-type=text/plain">imageinfo/exif.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\imageinfo\imageinfo\imageinfo.js?content-type=text/plain">imageinfo\imageinfo.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/imageinfo/imageinfo/imageinfo.js?content-type=text/plain">imageinfo/imageinfo.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\imageinfo\info.html?content-type=text/plain">info.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/imageinfo/info.html?content-type=text/plain">info.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\imageinfo\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/imageinfo/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\imageinfo\">Browse source</a>
- - <a href="examples\extensions\imageinfo.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/imageinfo/">Browse source</a>
+ - <a href="examples/extensions/imageinfo.zip">Download source</a>
</div>
-</div><div class="sample" id="5c7def7e0a26bac297128161b2bb9b2fc279985b">
- <img class="icon" src="examples\extensions\mappy\icon.png">
+</div><div class="sample" id="ec97ec20ca2f095d081e39f1565fc12af09ef067">
+ <img class="icon" src="examples/extensions/mappy/icon.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#5c7def7e0a26bac297128161b2bb9b2fc279985b">Mappy</a>
+ <a href="#ec97ec20ca2f095d081e39f1565fc12af09ef067">Mappy</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1767,25 +1767,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\mappy\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/mappy/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\mappy\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/mappy/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\mappy\mappy_content_script.js?content-type=text/plain">mappy_content_script.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/mappy/mappy_content_script.js?content-type=text/plain">mappy_content_script.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\mappy\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/mappy/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\mappy\">Browse source</a>
- - <a href="examples\extensions\mappy.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/mappy/">Browse source</a>
+ - <a href="examples/extensions/mappy.zip">Download source</a>
</div>
-</div><div class="sample" id="d72b4e8576fb00ad176957738099c930cffcfb9e">
- <img class="icon" src="examples\api\windows\merge_windows\merge_windows_128.png">
+</div><div class="sample" id="b2f5f8a790e16f091a7e4e0a39b2d0a6d32e3a6d">
+ <img class="icon" src="examples/api/windows/merge_windows/merge_windows_128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#d72b4e8576fb00ad176957738099c930cffcfb9e">Merge Windows</a>
+ <a href="#b2f5f8a790e16f091a7e4e0a39b2d0a6d32e3a6d">Merge Windows</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1822,21 +1822,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\windows\merge_windows\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/windows/merge_windows/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\windows\merge_windows\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/windows/merge_windows/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\windows\merge_windows\">Browse source</a>
- - <a href="examples\api\windows\merge_windows.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/windows/merge_windows/">Browse source</a>
+ - <a href="examples/api/windows/merge_windows.zip">Download source</a>
</div>
-</div><div class="sample" id="af975d20117c15a36dff66ef5a1ebca92f653969">
+</div><div class="sample" id="51a83d2ba3a32e3ff1bdb624d4e18ccec4c4038e">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#af975d20117c15a36dff66ef5a1ebca92f653969">Message Timer</a>
+ <a href="#51a83d2ba3a32e3ff1bdb624d4e18ccec4c4038e">Message Timer</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1871,23 +1871,23 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\messaging\timer\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/messaging/timer/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\messaging\timer\page.js?content-type=text/plain">page.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/messaging/timer/page.js?content-type=text/plain">page.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\messaging\timer\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/messaging/timer/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\messaging\timer\">Browse source</a>
- - <a href="examples\api\messaging\timer.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/messaging/timer/">Browse source</a>
+ - <a href="examples/api/messaging/timer.zip">Download source</a>
</div>
-</div><div class="sample" id="7772f091557a50889effa6e5b19e83b4cf80399b">
+</div><div class="sample" id="4f6785ec4f937add6728615682dd37c9a42d9548">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#7772f091557a50889effa6e5b19e83b4cf80399b">My Bookmarks</a>
+ <a href="#4f6785ec4f937add6728615682dd37c9a42d9548">My Bookmarks</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1925,21 +1925,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\bookmarks\basic\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/bookmarks/basic/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\bookmarks\basic\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/bookmarks/basic/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\bookmarks\basic\">Browse source</a>
- - <a href="examples\api\bookmarks\basic.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/bookmarks/basic/">Browse source</a>
+ - <a href="examples/api/bookmarks/basic.zip">Download source</a>
</div>
-</div><div class="sample" id="28c933f585b0903a56f9a16658aa26cf61f9da0f">
- <img class="icon" src="examples\extensions\news_a11y\news_icon.png">
+</div><div class="sample" id="597015d3bcce3da693b02314afd607bec4f55291">
+ <img class="icon" src="examples/extensions/news_a11y/news_icon.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#28c933f585b0903a56f9a16658aa26cf61f9da0f">News Reader</a>
+ <a href="#597015d3bcce3da693b02314afd607bec4f55291">News Reader</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -1964,21 +1964,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_a11y\feed.html?content-type=text/plain">feed.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_a11y/feed.html?content-type=text/plain">feed.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_a11y\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_a11y/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_a11y\">Browse source</a>
- - <a href="examples\extensions\news_a11y.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_a11y/">Browse source</a>
+ - <a href="examples/extensions/news_a11y.zip">Download source</a>
</div>
-</div><div class="sample" id="80e7eac29801029c81ecaabb7c7021bbd0ceea88">
- <img class="icon" src="examples\extensions\news_i18n\news_icon.png">
+</div><div class="sample" id="6444e5c8ae112a6a433909c5e770669cd16e2e5f">
+ <img class="icon" src="examples/extensions/news_i18n/news_icon.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#80e7eac29801029c81ecaabb7c7021bbd0ceea88">News Reader</a>
+ <a href="#6444e5c8ae112a6a433909c5e770669cd16e2e5f">News Reader</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2005,27 +2005,27 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_i18n\_locales\en\messages.json?content-type=text/plain">_locales\en\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/en/messages.json?content-type=text/plain">_locales/en/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_i18n\_locales\es\messages.json?content-type=text/plain">_locales\es\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/es/messages.json?content-type=text/plain">_locales/es/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_i18n\_locales\sr\messages.json?content-type=text/plain">_locales\sr\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/sr/messages.json?content-type=text/plain">_locales/sr/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_i18n\feed.html?content-type=text/plain">feed.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_i18n/feed.html?content-type=text/plain">feed.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_i18n\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_i18n/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news_i18n\">Browse source</a>
- - <a href="examples\extensions\news_i18n.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news_i18n/">Browse source</a>
+ - <a href="examples/extensions/news_i18n.zip">Download source</a>
</div>
-</div><div class="sample" id="e9e5f15da193c45aad4d49ced748dfbbd6c904b3">
- <img class="icon" src="examples\extensions\news\images/news_icon.png">
+</div><div class="sample" id="3aea027164cb9b732ba4a8c51cb93708891726ef">
+ <img class="icon" src="examples/extensions/news/images/news_icon.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#e9e5f15da193c45aad4d49ced748dfbbd6c904b3">News Reader (by Google)</a>
+ <a href="#3aea027164cb9b732ba4a8c51cb93708891726ef">News Reader (by Google)</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2060,37 +2060,37 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\_locales\en\messages.json?content-type=text/plain">_locales\en\messages.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/_locales/en/messages.json?content-type=text/plain">_locales/en/messages.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\css\feed.css?content-type=text/plain">css\feed.css</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/css/feed.css?content-type=text/plain">css/feed.css</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\css\options.css?content-type=text/plain">css\options.css</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/css/options.css?content-type=text/plain">css/options.css</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\javascript\feed.js?content-type=text/plain">javascript\feed.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/javascript/feed.js?content-type=text/plain">javascript/feed.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\javascript\options.js?content-type=text/plain">javascript\options.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/javascript/options.js?content-type=text/plain">javascript/options.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\javascript\util.js?content-type=text/plain">javascript\util.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/javascript/util.js?content-type=text/plain">javascript/util.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\views\background.html?content-type=text/plain">views\background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/views/background.html?content-type=text/plain">views/background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\views\feed.html?content-type=text/plain">views\feed.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/views/feed.html?content-type=text/plain">views/feed.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\views\options.html?content-type=text/plain">views\options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/views/options.html?content-type=text/plain">views/options.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\news\">Browse source</a>
- - <a href="examples\extensions\news.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/news/">Browse source</a>
+ - <a href="examples/extensions/news.zip">Download source</a>
</div>
-</div><div class="sample" id="324e557c216dd6edbeb0112ed53d55a05b5e6112">
- <img class="icon" src="examples\api\notifications\128.png">
+</div><div class="sample" id="f799e26ceef2367cf836f24bcb47df4398b0df58">
+ <img class="icon" src="examples/api/notifications/128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#324e557c216dd6edbeb0112ed53d55a05b5e6112">Notification Demo</a>
+ <a href="#f799e26ceef2367cf836f24bcb47df4398b0df58">Notification Demo</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2118,25 +2118,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\notifications\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/notifications/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\notifications\error.html?content-type=text/plain">error.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/notifications/error.html?content-type=text/plain">error.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\notifications\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/notifications/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\notifications\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/notifications/options.html?content-type=text/plain">options.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\notifications\">Browse source</a>
- - <a href="examples\api\notifications.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/notifications/">Browse source</a>
+ - <a href="examples/api/notifications.zip">Download source</a>
</div>
-</div><div class="sample" id="85a9f4cfd3645dfc4d1d90cc559261b689803626">
+</div><div class="sample" id="e787b322bddbc6289bb31b7d7550b1bf6456a80b">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#85a9f4cfd3645dfc4d1d90cc559261b689803626">Omnibox Example</a>
+ <a href="#e787b322bddbc6289bb31b7d7550b1bf6456a80b">Omnibox Example</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2157,21 +2157,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\omnibox\simple-example\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/omnibox/simple-example/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\omnibox\simple-example\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/omnibox/simple-example/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\omnibox\simple-example\">Browse source</a>
- - <a href="examples\api\omnibox\simple-example.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/omnibox/simple-example/">Browse source</a>
+ - <a href="examples/api/omnibox/simple-example.zip">Download source</a>
</div>
-</div><div class="sample" id="56bbb002845c9ada93807b2f83d51447adf146fd">
- <img class="icon" src="examples\api\pageAction\pageaction_by_content\sandwich-128.png">
+</div><div class="sample" id="8d0a50b57c26bb498be592e871001ffed91541b4">
+ <img class="icon" src="examples/api/pageAction/pageaction_by_content/sandwich-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#56bbb002845c9ada93807b2f83d51447adf146fd">Page action by content</a>
+ <a href="#8d0a50b57c26bb498be592e871001ffed91541b4">Page action by content</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2197,23 +2197,23 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\pageaction_by_content\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\pageaction_by_content\contentscript.js?content-type=text/plain">contentscript.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/contentscript.js?content-type=text/plain">contentscript.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\pageaction_by_content\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\pageaction_by_content\">Browse source</a>
- - <a href="examples\api\pageAction\pageaction_by_content.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/">Browse source</a>
+ - <a href="examples/api/pageAction/pageaction_by_content.zip">Download source</a>
</div>
-</div><div class="sample" id="65afad56921c30f207a30f5ecf929e06b712f552">
- <img class="icon" src="examples\api\pageAction\pageaction_by_url\icon-128.png">
+</div><div class="sample" id="80b86ccc6e8520660fa591caa565826f0ed1b12c">
+ <img class="icon" src="examples/api/pageAction/pageaction_by_url/icon-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#65afad56921c30f207a30f5ecf929e06b712f552">Page action by URL</a>
+ <a href="#80b86ccc6e8520660fa591caa565826f0ed1b12c">Page action by URL</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2240,21 +2240,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\pageaction_by_url\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\pageaction_by_url\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\pageAction\pageaction_by_url\">Browse source</a>
- - <a href="examples\api\pageAction\pageaction_by_url.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_url/">Browse source</a>
+ - <a href="examples/api/pageAction/pageaction_by_url.zip">Download source</a>
</div>
-</div><div class="sample" id="7446de67bf18dc34b5ff0fb4e1d9d7d166339bb9">
+</div><div class="sample" id="d74c3c18a1c1dd18b035149105a306f837c8823e">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#7446de67bf18dc34b5ff0fb4e1d9d7d166339bb9">Page Benchmarker</a>
+ <a href="#d74c3c18a1c1dd18b035149105a306f837c8823e">Page Benchmarker</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2316,53 +2316,53 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery-1.4.2.min.js?content-type=text/plain">jquery\jquery-1.4.2.min.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery-1.4.2.min.js?content-type=text/plain">jquery/jquery-1.4.2.min.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery-ui-1.8.4.custom.min.js?content-type=text/plain">jquery\jquery-ui-1.8.4.custom.min.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery-ui-1.8.4.custom.min.js?content-type=text/plain">jquery/jquery-ui-1.8.4.custom.min.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery.client.js?content-type=text/plain">jquery\jquery.client.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery.client.js?content-type=text/plain">jquery/jquery.client.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery.flot.dashes.js?content-type=text/plain">jquery\jquery.flot.dashes.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery.flot.dashes.js?content-type=text/plain">jquery/jquery.flot.dashes.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery.flot.js?content-type=text/plain">jquery\jquery.flot.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery.flot.js?content-type=text/plain">jquery/jquery.flot.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery.flot.min.js?content-type=text/plain">jquery\jquery.flot.min.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery.flot.min.js?content-type=text/plain">jquery/jquery.flot.min.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery.flot.navigate.js?content-type=text/plain">jquery\jquery.flot.navigate.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery.flot.navigate.js?content-type=text/plain">jquery/jquery.flot.navigate.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jquery\jquery.flot.valuelabels.js?content-type=text/plain">jquery\jquery.flot.valuelabels.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jquery/jquery.flot.valuelabels.js?content-type=text/plain">jquery/jquery.flot.valuelabels.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jst\jsevalcontext.js?content-type=text/plain">jst\jsevalcontext.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jst/jsevalcontext.js?content-type=text/plain">jst/jsevalcontext.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jst\jstemplate.js?content-type=text/plain">jst\jstemplate.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jst/jstemplate.js?content-type=text/plain">jst/jstemplate.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jst\jstemplate_test.js?content-type=text/plain">jst\jstemplate_test.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jst/jstemplate_test.js?content-type=text/plain">jst/jstemplate_test.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\jst\util.js?content-type=text/plain">jst\util.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/jst/util.js?content-type=text/plain">jst/util.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\options.html?content-type=text/plain">options.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/options.html?content-type=text/plain">options.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\script.js?content-type=text/plain">script.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/script.js?content-type=text/plain">script.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\util\sorttable.js?content-type=text/plain">util\sorttable.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/util/sorttable.js?content-type=text/plain">util/sorttable.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\util\table2CSV.js?content-type=text/plain">util\table2CSV.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/util/table2CSV.js?content-type=text/plain">util/table2CSV.js</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\benchmark\">Browse source</a>
- - <a href="examples\extensions\benchmark.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/benchmark/">Browse source</a>
+ - <a href="examples/extensions/benchmark.zip">Download source</a>
</div>
-</div><div class="sample" id="a9ea9e35b2e9990e488afeb97407655ea14fc8dc">
+</div><div class="sample" id="e6ae17ab4ccfd7e059c8c01f25760ca5d894c7fd">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#a9ea9e35b2e9990e488afeb97407655ea14fc8dc">Print this page</a>
+ <a href="#e6ae17ab4ccfd7e059c8c01f25760ca5d894c7fd">Print this page</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2389,21 +2389,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\print\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/print/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\print\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/print/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\browserAction\print\">Browse source</a>
- - <a href="examples\api\browserAction\print.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/print/">Browse source</a>
+ - <a href="examples/api/browserAction/print.zip">Download source</a>
</div>
-</div><div class="sample" id="455ec3784d8094b318eac572bc092ec07c5286b0">
+</div><div class="sample" id="beff6ecd9677dea0a7c648c5042165b48bb66f09">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#455ec3784d8094b318eac572bc092ec07c5286b0">Process Monitor</a>
+ <a href="#beff6ecd9677dea0a7c648c5042165b48bb66f09">Process Monitor</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2431,21 +2431,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\processes\process_monitor\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/processes/process_monitor/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\processes\process_monitor\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/processes/process_monitor/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\processes\process_monitor\">Browse source</a>
- - <a href="examples\api\processes\process_monitor.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/processes/process_monitor/">Browse source</a>
+ - <a href="examples/api/processes/process_monitor.zip">Download source</a>
</div>
-</div><div class="sample" id="545d6989740a0e7f57a9751c2ebc0e250053a08f">
- <img class="icon" src="examples\extensions\oauth_contacts\img/icon-128.png">
+</div><div class="sample" id="56a8d2ac24ca7bba78fd88ad57f43fc13c784497">
+ <img class="icon" src="examples/extensions/oauth_contacts/img/icon-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#545d6989740a0e7f57a9751c2ebc0e250053a08f">Sample - OAuth Contacts</a>
+ <a href="#56a8d2ac24ca7bba78fd88ad57f43fc13c784497">Sample - OAuth Contacts</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2486,29 +2486,29 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\oauth_contacts\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/oauth_contacts/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\oauth_contacts\chrome_ex_oauth.html?content-type=text/plain">chrome_ex_oauth.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/oauth_contacts/chrome_ex_oauth.html?content-type=text/plain">chrome_ex_oauth.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\oauth_contacts\chrome_ex_oauth.js?content-type=text/plain">chrome_ex_oauth.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/oauth_contacts/chrome_ex_oauth.js?content-type=text/plain">chrome_ex_oauth.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\oauth_contacts\chrome_ex_oauthsimple.js?content-type=text/plain">chrome_ex_oauthsimple.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/oauth_contacts/chrome_ex_oauthsimple.js?content-type=text/plain">chrome_ex_oauthsimple.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\oauth_contacts\contacts.html?content-type=text/plain">contacts.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/oauth_contacts/contacts.html?content-type=text/plain">contacts.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\oauth_contacts\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/oauth_contacts/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\extensions\oauth_contacts\">Browse source</a>
- - <a href="examples\extensions\oauth_contacts.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/oauth_contacts/">Browse source</a>
+ - <a href="examples/extensions/oauth_contacts.zip">Download source</a>
</div>
-</div><div class="sample" id="39a3d4c4282ee5090652938decfb6df79b626151">
- <img class="icon" src="examples\api\infobars\sandwichbar\sandwich-128.png">
+</div><div class="sample" id="38f6e1e17756ede38b1364c7114a738ca717dcbb">
+ <img class="icon" src="examples/api/infobars/sandwichbar/sandwich-128.png">
<img class="icon" src="images/sample-default-icon.png" style="display: none; ">
<h2 class="name">
- <a href="#39a3d4c4282ee5090652938decfb6df79b626151">SandwichBar</a>
+ <a href="#38f6e1e17756ede38b1364c7114a738ca717dcbb">SandwichBar</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2534,25 +2534,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\infobars\sandwichbar\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\infobars\sandwichbar\contentscript.js?content-type=text/plain">contentscript.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/contentscript.js?content-type=text/plain">contentscript.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\infobars\sandwichbar\infobar.html?content-type=text/plain">infobar.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/infobar.html?content-type=text/plain">infobar.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\infobars\sandwichbar\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/manifest.json?content-type=text/plain">manifest.json</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\infobars\sandwichbar\">Browse source</a>
- - <a href="examples\api\infobars\sandwichbar.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/">Browse source</a>
+ - <a href="examples/api/infobars/sandwichbar.zip">Download source</a>
</div>
-</div><div class="sample" id="364415e46171be6479a095b214eab9783a4648d2">
+</div><div class="sample" id="fc89b35755483af30b66cd72cefa34a43a3e8312">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#364415e46171be6479a095b214eab9783a4648d2">Show Tabs in Process</a>
+ <a href="#fc89b35755483af30b66cd72cefa34a43a3e8312">Show Tabs in Process</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2594,21 +2594,21 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\processes\show_tabs\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/processes/show_tabs/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\processes\show_tabs\popup.html?content-type=text/plain">popup.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/processes/show_tabs/popup.html?content-type=text/plain">popup.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\processes\show_tabs\">Browse source</a>
- - <a href="examples\api\processes\show_tabs.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/processes/show_tabs/">Browse source</a>
+ - <a href="examples/api/processes/show_tabs.zip">Download source</a>
</div>
-</div><div class="sample" id="ad0d399dfc6d92af6ee9b759d7792a0d0bb85370">
+</div><div class="sample" id="230463f2d5c3d4d0ca13c230e1f00f2aae0a8a64">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#ad0d399dfc6d92af6ee9b759d7792a0d0bb85370">Tab Inspector</a>
+ <a href="#230463f2d5c3d4d0ca13c230e1f00f2aae0a8a64">Tab Inspector</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2683,25 +2683,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\inspector\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/inspector/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\inspector\jstemplate_compiled.js?content-type=text/plain">jstemplate_compiled.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/inspector/jstemplate_compiled.js?content-type=text/plain">jstemplate_compiled.js</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\inspector\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/inspector/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\inspector\tabs_api.html?content-type=text/plain">tabs_api.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/inspector/tabs_api.html?content-type=text/plain">tabs_api.html</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\inspector\">Browse source</a>
- - <a href="examples\api\tabs\inspector.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/inspector/">Browse source</a>
+ - <a href="examples/api/tabs/inspector.zip">Download source</a>
</div>
-</div><div class="sample" id="1e28bcf89e80466f155ab3a01a76cf5f60cb4104">
+</div><div class="sample" id="e1697cacebad05218798bf3e8a0f724517f0e8c3">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#1e28bcf89e80466f155ab3a01a76cf5f60cb4104">Test Screenshot Extension</a>
+ <a href="#e1697cacebad05218798bf3e8a0f724517f0e8c3">Test Screenshot Extension</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2736,25 +2736,25 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\screenshot\background.html?content-type=text/plain">background.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/screenshot/background.html?content-type=text/plain">background.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\screenshot\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/screenshot/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\screenshot\screenshot.html?content-type=text/plain">screenshot.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/screenshot/screenshot.html?content-type=text/plain">screenshot.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\screenshot\screenshot.js?content-type=text/plain">screenshot.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/screenshot/screenshot.js?content-type=text/plain">screenshot.js</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\tabs\screenshot\">Browse source</a>
- - <a href="examples\api\tabs\screenshot.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/screenshot/">Browse source</a>
+ - <a href="examples/api/tabs/screenshot.zip">Download source</a>
</div>
-</div><div class="sample" id="7b375c0f2c88517b42a5a341ac77e0762b481233">
+</div><div class="sample" id="b3de91ab04b7d7a2670ca7ee9d740eb42cead0b6">
<img class="icon" style="display: none; ">
<img class="icon" src="images/sample-default-icon.png">
<h2 class="name">
- <a href="#7b375c0f2c88517b42a5a341ac77e0762b481233">Typed URL History</a>
+ <a href="#b3de91ab04b7d7a2670ca7ee9d740eb42cead0b6">Typed URL History</a>
</h2>
<p class="metadata features">Uses
<span>
@@ -2783,17 +2783,17 @@
<div class="sourcefiles"><strong>Source files:</strong>
<ul>
<li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\history\showHistory\manifest.json?content-type=text/plain">manifest.json</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/history/showHistory/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\history\showHistory\typedUrls.html?content-type=text/plain">typedUrls.html</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/history/showHistory/typedUrls.html?content-type=text/plain">typedUrls.html</a></code>
</li><li>
- <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\history\showHistory\typedUrls.js?content-type=text/plain">typedUrls.js</a></code>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/history/showHistory/typedUrls.js?content-type=text/plain">typedUrls.js</a></code>
</li>
</ul>
</div>
<div>
- <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples\api\history\showHistory\">Browse source</a>
- - <a href="examples\api\history\showHistory.zip">Download source</a>
+ <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/history/showHistory/">Browse source</a>
+ - <a href="examples/api/history/showHistory.zip">Download source</a>
</div>
</div>
diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json
index eacba16..9a62535 100644
--- a/chrome/common/extensions/docs/samples.json
+++ b/chrome/common/extensions/docs/samples.json
@@ -41,9 +41,7 @@
"chrome.experimental.infobars.show": "experimental.infobars.html#method-show",
"chrome.experimental.processes.getProcessIdForTab": "experimental.processes.html#method-getProcessIdForTab",
"chrome.experimental.processes.onUpdated": "experimental.processes.html#event-onUpdated",
- "chrome.experimental.proxy.getCurrentProxySettings": "experimental.proxy.html#method-getCurrentProxySettings",
- "chrome.experimental.proxy.removeCustomProxySettings": "experimental.proxy.html#method-removeCustomProxySettings",
- "chrome.experimental.proxy.useCustomProxySettings": "experimental.proxy.html#method-useCustomProxySettings",
+ "chrome.experimental.proxy.onProxyError": "experimental.proxy.html#event-onProxyError",
"chrome.experimental.sidebar.collapse": "experimental.sidebar.html#method-collapse",
"chrome.experimental.sidebar.expand": "experimental.sidebar.html#method-expand",
"chrome.experimental.sidebar.getState": "experimental.sidebar.html#method-getState",
@@ -163,11 +161,11 @@
"tabs"
],
"icon": null,
- "id": "4da084813a9c0f3de28821a1c8d2504f5f7bcbad",
+ "id": "0262260daf0c8f7b28feff2ef23b05e7abf9d1e0",
"name": "A browser action which changes its icon when clicked.",
- "path": "examples\\api\\browserAction\\set_icon_path\\",
+ "path": "examples/api/browserAction/set_icon_path/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "A BROWSER ACTION WHICH CHANGES ITS ICON WHEN CLICKED. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETICON",
"source_files": [
@@ -175,7 +173,7 @@
"manifest.json"
],
"source_hash": "c5752555642e89340c57657b48440b0dcd74ee99",
- "zip_path": "examples\\api\\browserAction\\set_icon_path.zip"
+ "zip_path": "examples/api/browserAction/set_icon_path.zip"
},
{
"api_calls": [
@@ -188,12 +186,12 @@
"tabs"
],
"icon": null,
- "id": "0569ec913dfd1aa4fad58fff04af99b0de7ec4b6",
+ "id": "ea2894c41cb8e80a4433a3e6c5772dadce9be90d",
"name": "A browser action with a popup that changes the page color.",
- "path": "examples\\api\\browserAction\\set_page_color\\",
+ "path": "examples/api/browserAction/set_page_color/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "A BROWSER ACTION WITH A POPUP THAT CHANGES THE PAGE COLOR. BROWSER_ACTION POPUP TABS CHROME.TABS.EXECUTESCRIPT",
"source_files": [
@@ -201,7 +199,7 @@
"popup.html"
],
"source_hash": "c8d14b6893e75a62f3bd150d5d2cc5bb785bc411",
- "zip_path": "examples\\api\\browserAction\\set_page_color.zip"
+ "zip_path": "examples/api/browserAction/set_page_color.zip"
},
{
"api_calls": [
@@ -217,11 +215,11 @@
"tabs"
],
"icon": null,
- "id": "a02f64d5e8c8f96efb45b26c11bfa2320deddd36",
+ "id": "ede3c47b7757245be42ec33fd5ca63df4b490066",
"name": "A browser action with no icon that makes the page red",
- "path": "examples\\api\\browserAction\\make_page_red\\",
+ "path": "examples/api/browserAction/make_page_red/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "A BROWSER ACTION WITH NO ICON THAT MAKES THE PAGE RED BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.TABS.EXECUTESCRIPT",
"source_files": [
@@ -229,7 +227,7 @@
"manifest.json"
],
"source_hash": "dfbb05ead54a0228a6d2f591ce1038d5c625249a",
- "zip_path": "examples\\api\\browserAction\\make_page_red.zip"
+ "zip_path": "examples/api/browserAction/make_page_red.zip"
},
{
"api_calls": [
@@ -242,20 +240,20 @@
"popup"
],
"icon": null,
- "id": "ebed3a237b5606a154cfc0e6326821154607d388",
+ "id": "fbf0aa1a09a15ff8cc4fc7de4fd176d6c663d07a",
"name": "AcceptLanguage",
- "path": "examples\\api\\i18n\\getMessage\\",
+ "path": "examples/api/i18n/getMessage/",
"protocols": [],
"search_string": "ACCEPTLANGUAGE RETURNS ACCEPT LANGUAGES OF THE BROWSER BROWSER_ACTION POPUP CHROME.I18N.GETACCEPTLANGUAGES CHROME.I18N.GETMESSAGE",
"source_files": [
- "_locales\\en_US\\messages.json",
- "_locales\\es\\messages.json",
- "_locales\\sr\\messages.json",
+ "_locales/en_US/messages.json",
+ "_locales/es/messages.json",
+ "_locales/sr/messages.json",
"manifest.json",
"popup.html"
],
"source_hash": "67f203e2773eebf401d0aa0a9709d961e506d875",
- "zip_path": "examples\\api\\i18n\\getMessage.zip"
+ "zip_path": "examples/api/i18n/getMessage.zip"
},
{
"api_calls": [
@@ -275,9 +273,9 @@
"tabs"
],
"icon": null,
- "id": "2f7777c80368bb0a8caf057dffaadd5feed7e9ee",
+ "id": "9a6e4ec46997fb92b324974afa08a3d007e2537f",
"name": "Animated Page Action",
- "path": "examples\\api\\pageAction\\set_icon\\",
+ "path": "examples/api/pageAction/set_icon/",
"protocols": [],
"search_string": "ANIMATED PAGE ACTION THIS EXTENSION ADDS AN ANIMATED BROWSER ACTION TO THE TOOLBAR. BACKGROUND_PAGE PAGE_ACTION TABS CHROME.PAGEACTION.HIDE CHROME.PAGEACTION.ONCLICKED CHROME.PAGEACTION.SETICON CHROME.PAGEACTION.SETTITLE CHROME.PAGEACTION.SHOW CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED",
"source_files": [
@@ -285,7 +283,7 @@
"manifest.json"
],
"source_hash": "9d5e9f8fd525c6d02fe03e1843041f5b0f94f690",
- "zip_path": "examples\\api\\pageAction\\set_icon.zip"
+ "zip_path": "examples/api/pageAction/set_icon.zip"
},
{
"api_calls": [
@@ -301,9 +299,9 @@
"management"
],
"icon": null,
- "id": "4da5aeb0840b36af753e694f2e81c90620494688",
+ "id": "a1f7cf79dd555b04fa8d603247a040e644996293",
"name": "App Launcher",
- "path": "examples\\extensions\\app_launcher\\",
+ "path": "examples/extensions/app_launcher/",
"protocols": [],
"search_string": "APP LAUNCHER BROWSER_ACTION MANAGEMENT CHROME.EXTENSION.GETURL CHROME.MANAGEMENT.GET CHROME.MANAGEMENT.GETALL CHROME.MANAGEMENT.LAUNCHAPP CHROME.TABS.CREATE",
"source_files": [
@@ -313,7 +311,7 @@
"popup.js"
],
"source_hash": "4cb1348cfca9c990117d52290f93eb5fc5081bc2",
- "zip_path": "examples\\extensions\\app_launcher.zip"
+ "zip_path": "examples/extensions/app_launcher.zip"
},
{
"api_calls": [],
@@ -322,9 +320,9 @@
"chrome_url_overrides"
],
"icon": null,
- "id": "63349d2a4f5ec8f315a05fc9b1cab181ad546fd2",
+ "id": "9747e3d6a3eab39bc7c17f11a80573c62d44c7e5",
"name": "Blank new tab page",
- "path": "examples\\api\\override\\blank_ntp\\",
+ "path": "examples/api/override/blank_ntp/",
"protocols": [],
"search_string": "BLANK NEW TAB PAGE CHROME_URL_OVERRIDES",
"source_files": [
@@ -332,7 +330,7 @@
"manifest.json"
],
"source_hash": "477acf6d15e3fa252e6307e156707538b61c86db",
- "zip_path": "examples\\api\\override\\blank_ntp.zip"
+ "zip_path": "examples/api/override/blank_ntp.zip"
},
{
"api_calls": [
@@ -362,12 +360,12 @@
"tabs"
],
"icon": "icon.png",
- "id": "4c45b5015d2ca5f9053514ac70ff3acc3bca1f76",
+ "id": "903e7277139e1e6caec123d3319cab295d8d1b3a",
"name": "Chrome Sounds",
- "path": "examples\\extensions\\fx\\",
+ "path": "examples/extensions/fx/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "CHROME SOUNDS ENJOY A MORE MAGICAL AND IMMERSIVE EXPERIENCE WHEN BROWSING THE WEB USING THE POWER OF SOUND. BACKGROUND_PAGE BOOKMARKS OPTIONS_PAGE TABS CHROME.BOOKMARKS.ONCREATED CHROME.BOOKMARKS.ONMOVED CHROME.BOOKMARKS.ONREMOVED CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.TABS.GET CHROME.TABS.ONATTACHED CHROME.TABS.ONCREATED CHROME.TABS.ONDETACHED CHROME.TABS.ONMOVED CHROME.TABS.ONREMOVED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.WINDOWS.ONCREATED CHROME.WINDOWS.ONFOCUSCHANGED CHROME.WINDOWS.ONREMOVED",
"source_files": [
@@ -377,8 +375,8 @@
"manifest.json",
"options.html"
],
- "source_hash": "800ec3bb17be14c24c3c287c843393211094e40d",
- "zip_path": "examples\\extensions\\fx.zip"
+ "source_hash": "4155e4e6ba7d523ba7bc3b75da352c22e534c3c3",
+ "zip_path": "examples/extensions/fx.zip"
},
{
"api_calls": [
@@ -396,12 +394,12 @@
"popup"
],
"icon": "icon.png",
- "id": "2f41f968c8b6ddfc078363e305d2b530802a11dd",
+ "id": "0e790e035a4a00b6f1def5ef9a7d7be1bce95ab5",
"name": "Chromium Buildbot Monitor",
- "path": "examples\\extensions\\buildbot\\",
+ "path": "examples/extensions/buildbot/",
"protocols": [
- "http:\/\/",
- "http:\/\/"
+ "http://",
+ "http://"
],
"search_string": "CHROMIUM BUILDBOT MONITOR DISPLAYS THE STATUS OF THE CHROMIUM BUILDBOT IN THE TOOLBAR. CLICK TO SEE MORE DETAILED STATUS IN A POPUP. BACKGROUND_PAGE BROWSER_ACTION NOTIFICATIONS OPTIONS_PAGE POPUP CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.GETURL",
"source_files": [
@@ -411,7 +409,7 @@
"popup.html"
],
"source_hash": "ad985dc5b3e2b40826042be1d7b77c07fadfcc68",
- "zip_path": "examples\\extensions\\buildbot.zip"
+ "zip_path": "examples/extensions/buildbot.zip"
},
{
"api_calls": [
@@ -430,19 +428,19 @@
"tabs"
],
"icon": null,
- "id": "32ff053c4a55b305243c83756304ca7c9d135ed0",
+ "id": "ac31228200b41a87982e386cc90d3a6eee4ad885",
"name": "Chromium Search",
- "path": "examples\\extensions\\chrome_search\\",
+ "path": "examples/extensions/chrome_search/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "CHROMIUM SEARCH ADD SUPPORT TO THE OMNIBOX TO SEARCH THE CHROMIUM SOURCE CODE. BACKGROUND_PAGE TABS CHROME.OMNIBOX.ONINPUTCANCELLED CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED CHROME.OMNIBOX.ONINPUTSTARTED CHROME.OMNIBOX.SETDEFAULTSUGGESTION CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.UPDATE",
"source_files": [
"background.html",
"manifest.json"
],
- "source_hash": "37dd43080094bbe459b0429f1a2b995c33bab7c3",
- "zip_path": "examples\\extensions\\chrome_search.zip"
+ "source_hash": "8f9a8a4bf21102b26fa626626374cb200b2bcac0",
+ "zip_path": "examples/extensions/chrome_search.zip"
},
{
"api_calls": [
@@ -460,9 +458,9 @@
"tabs"
],
"icon": null,
- "id": "6484bb796d9aef70aa1026c0edc0799bc7a48b68",
+ "id": "7d5d6cf195bc25480256618e360aa38c6e6fba82",
"name": "CLD",
- "path": "examples\\api\\i18n\\cld\\",
+ "path": "examples/api/i18n/cld/",
"protocols": [],
"search_string": "CLD DISPLAYS THE LANGUAGE OF A TAB BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.SETBADGETEXT CHROME.TABS.DETECTLANGUAGE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED",
"source_files": [
@@ -470,7 +468,7 @@
"manifest.json"
],
"source_hash": "913694d89e0b081f1ea5ad6f07b60b0141e82394",
- "zip_path": "examples\\api\\i18n\\cld.zip"
+ "zip_path": "examples/api/i18n/cld.zip"
},
{
"api_calls": [
@@ -482,9 +480,9 @@
"contextMenus"
],
"icon": null,
- "id": "8818cf9ded850b5f0ba7348127526eb00165f202",
+ "id": "5d81304a17cf7ac2887484f730fbd2b01e51e166",
"name": "Context Menus Sample",
- "path": "examples\\api\\contextMenus\\basic\\",
+ "path": "examples/api/contextMenus/basic/",
"protocols": [],
"search_string": "CONTEXT MENUS SAMPLE SHOWS SOME OF THE FEATURES OF THE CONTEXT MENUS API BACKGROUND_PAGE CONTEXTMENUS CHROME.CONTEXTMENUS.CREATE",
"source_files": [
@@ -492,8 +490,8 @@
"manifest.json",
"sample.js"
],
- "source_hash": "f7240f31b5864b3f6da99cba794b3070cbdf41ef",
- "zip_path": "examples\\api\\contextMenus\\basic.zip"
+ "source_hash": "0e35ce268b3b2cf3d9830e6411c85c5dfef2ffdf",
+ "zip_path": "examples/api/contextMenus/basic.zip"
},
{
"api_calls": [
@@ -516,12 +514,12 @@
"tabs"
],
"icon": "cookie.png",
- "id": "ba79d21d1e9a1cf5edebc246b11f667406cb001f",
+ "id": "4daa6becd0899a54776d9cf7f09613ed1a9f4d77",
"name": "Cookie API Test Extension",
- "path": "examples\\api\\cookies\\",
+ "path": "examples/api/cookies/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "COOKIE API TEST EXTENSION TESTING COOKIE API BACKGROUND_PAGE BROWSER_ACTION COOKIES TABS CHROME.BROWSERACTION.ONCLICKED CHROME.COOKIES.GET CHROME.COOKIES.GETALL CHROME.COOKIES.ONCHANGED CHROME.COOKIES.REMOVE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL",
"source_files": [
@@ -529,33 +527,33 @@
"manager.html",
"manifest.json"
],
- "source_hash": "6618d2f19b3d02fa21e3980027609a5ced23364a",
- "zip_path": "examples\\api\\cookies.zip"
+ "source_hash": "d0741a5ff0ce9ac38a1be3e6abc46065d74cb498",
+ "zip_path": "examples/api/cookies.zip"
},
{
"api_calls": [
"chrome.extension.onRequest",
"chrome.extension.sendRequest"
],
- "description": "Demonstrates a method to make a cross-domain XMLHttpRequest fetch from a content script. This extension fetches the current trending topics from Twitter and inserts them in an overlay at the top of Google News. Visit http:\/\/news.google.com to test this extension.",
+ "description": "Demonstrates a method to make a cross-domain XMLHttpRequest fetch from a content script. This extension fetches the current trending topics from Twitter and inserts them in an overlay at the top of Google News. Visit http://news.google.com to test this extension.",
"features": [
"background_page"
],
"icon": "sample-128.png",
- "id": "b6ab1c298a1c1f939b393f36868c937391502112",
+ "id": "6871d09f4a96bf9d4b6cc724d00e909cee0f3902",
"name": "Cross-domain XMLHttpRequest from a content script",
- "path": "examples\\howto\\contentscript_xhr\\",
+ "path": "examples/howto/contentscript_xhr/",
"protocols": [
- "http:\/\/"
+ "http://"
],
- "search_string": "CROSS-DOMAIN XMLHTTPREQUEST FROM A CONTENT SCRIPT DEMONSTRATES A METHOD TO MAKE A CROSS-DOMAIN XMLHTTPREQUEST FETCH FROM A CONTENT SCRIPT. THIS EXTENSION FETCHES THE CURRENT TRENDING TOPICS FROM TWITTER AND INSERTS THEM IN AN OVERLAY AT THE TOP OF GOOGLE NEWS. VISIT HTTP:\/\/NEWS.GOOGLE.COM TO TEST THIS EXTENSION. BACKGROUND_PAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST",
+ "search_string": "CROSS-DOMAIN XMLHTTPREQUEST FROM A CONTENT SCRIPT DEMONSTRATES A METHOD TO MAKE A CROSS-DOMAIN XMLHTTPREQUEST FETCH FROM A CONTENT SCRIPT. THIS EXTENSION FETCHES THE CURRENT TRENDING TOPICS FROM TWITTER AND INSERTS THEM IN AN OVERLAY AT THE TOP OF GOOGLE NEWS. VISIT HTTP://NEWS.GOOGLE.COM TO TEST THIS EXTENSION. BACKGROUND_PAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST",
"source_files": [
"background.html",
"contentscript.js",
"manifest.json"
],
"source_hash": "0fe56cea50dc18b7e5e31d47c383356a85d8b896",
- "zip_path": "examples\\howto\\contentscript_xhr.zip"
+ "zip_path": "examples/howto/contentscript_xhr.zip"
},
{
"api_calls": [
@@ -574,12 +572,12 @@
"tabs"
],
"icon": "mail_128x128.png",
- "id": "fad4ea2189bbcce1d2669a409ed296b10ec8b7c9",
+ "id": "028eb5364924344029bcbe1d527f132fc72b34e5",
"name": "Email this page (by Google)",
- "path": "examples\\extensions\\email_this_page\\",
+ "path": "examples/extensions/email_this_page/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "EMAIL THIS PAGE (BY GOOGLE) THIS EXTENSION ADDS AN EMAIL BUTTON TO THE TOOLBAR WHICH ALLOWS YOU TO EMAIL THE PAGE LINK USING YOUR DEFAULT MAIL CLIENT OR GMAIL. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.CONNECT CHROME.EXTENSION.ONCONNECT CHROME.TABS.CREATE CHROME.TABS.EXECUTESCRIPT CHROME.TABS.UPDATE",
"source_files": [
@@ -589,7 +587,7 @@
"options.html"
],
"source_hash": "54b5469031ddcb2097f39dbaae1bcd81ae650154",
- "zip_path": "examples\\extensions\\email_this_page.zip"
+ "zip_path": "examples/extensions/email_this_page.zip"
},
{
"api_calls": [],
@@ -600,9 +598,9 @@
"popup"
],
"icon": "analytics-extension-icon-128.png",
- "id": "26af638d88737474bed3837343caa13f3b924615",
+ "id": "763a08e9b06595d785568a8d392b95a2f3700258",
"name": "Event Tracking with Google Analytics",
- "path": "examples\\tutorials\\analytics\\",
+ "path": "examples/tutorials/analytics/",
"protocols": [],
"search_string": "EVENT TRACKING WITH GOOGLE ANALYTICS A SAMPLE EXTENSION WHICH USES GOOGLE ANALYTICS TO TRACK USAGE. BACKGROUND_PAGE BROWSER_ACTION POPUP",
"source_files": [
@@ -612,7 +610,7 @@
"popup.html"
],
"source_hash": "b02f040a3eb56f8a0e780549954f69172d62dcd3",
- "zip_path": "examples\\tutorials\\analytics.zip"
+ "zip_path": "examples/tutorials/analytics.zip"
},
{
"api_calls": [
@@ -629,11 +627,11 @@
"tabs"
],
"icon": "icon-128.png",
- "id": "97c797be0add2ec9ce72747b1ecdbd9b80bc73d9",
+ "id": "e3df888a89e35bdeb9c8bc8d03be5e1851b97c68",
"name": "Extension Docs Search",
- "path": "examples\\api\\omnibox\\extension-docs\\",
+ "path": "examples/api/omnibox/extension-docs/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "EXTENSION DOCS SEARCH SEARCH THE CHROME EXTENSIONS DOCUMENTATION. TO USE, TYPE CRDOC PLUS A SEARCH TERM INTO THE OMNIBOX. BACKGROUND_PAGE TABS CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.ONREMOVED CHROME.TABS.UPDATE",
"source_files": [
@@ -641,7 +639,7 @@
"manifest.json"
],
"source_hash": "0aa8ec9a2c091e227661ca5010d08f6823e643a7",
- "zip_path": "examples\\api\\omnibox\\extension-docs.zip"
+ "zip_path": "examples/api/omnibox/extension-docs.zip"
},
{
"api_calls": [
@@ -667,26 +665,26 @@
"options_page",
"tabs"
],
- "icon": "images\/icon-128.gif",
- "id": "f802b3cce3b05de17dddd7ccfb3394d70f0ba1b5",
+ "icon": "images/icon-128.gif",
+ "id": "8b0dd31216235941bdd8eb33fda915ef5cf79a82",
"name": "Google Calendar Checker (by Google)",
- "path": "examples\\extensions\\calendar\\",
+ "path": "examples/extensions/calendar/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "GOOGLE CALENDAR CHECKER (BY GOOGLE) QUICKLY SEE THE TIME UNTIL YOUR NEXT MEETING FROM ANY OF YOUR CALENDARS. CLICK ON THE BUTTON TO BE TAKEN TO YOUR CALENDAR. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETICON CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.ONUPDATED CHROME.TABS.UPDATE",
"source_files": [
- "_locales\\en\\messages.json",
- "javascript\\background.js",
- "javascript\\options.js",
- "javascript\\util.js",
+ "_locales/en/messages.json",
+ "javascript/background.js",
+ "javascript/options.js",
+ "javascript/util.js",
"manifest.json",
- "views\\background.html",
- "views\\options.html"
+ "views/background.html",
+ "views/options.html"
],
- "source_hash": "7f39521994eb05b10c222681712ee6cdbe029334",
- "zip_path": "examples\\extensions\\calendar.zip"
+ "source_hash": "3d9782a3e8315bbbca36c63297db2c8926df4521",
+ "zip_path": "examples/extensions/calendar.zip"
},
{
"api_calls": [
@@ -707,15 +705,15 @@
"popup",
"tabs"
],
- "icon": "img\/docs_spreadsheets-128.gif",
- "id": "e83ae8cea73dfe87e420a9dac5e2906d795263cc",
+ "icon": "img/docs_spreadsheets-128.gif",
+ "id": "4e35caa9742fb82dbd628892d23a781614f6eff6",
"name": "Google Document List Viewer",
- "path": "examples\\extensions\\gdocs\\",
+ "path": "examples/extensions/gdocs/",
"protocols": [
- "https:\/\/",
- "https:\/\/",
- "https:\/\/",
- "https:\/\/"
+ "https://",
+ "https://",
+ "https://",
+ "https://"
],
"search_string": "GOOGLE DOCUMENT LIST VIEWER DEMONSTRATES HOW TO USE OAUTH TO CONNECT THE GOOGLE DOCUMENTS LIST DATA API. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.BROWSERACTION.SETBADGETEXT CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE",
"source_files": [
@@ -723,13 +721,13 @@
"chrome_ex_oauth.html",
"chrome_ex_oauth.js",
"chrome_ex_oauthsimple.js",
- "js\\jquery-1.4.1.min.js",
+ "js/jquery-1.4.1.min.js",
"manifest.json",
"options.html",
"popup.html"
],
"source_hash": "284e44d603a62348dd1b7e98e593f3f4b877b124",
- "zip_path": "examples\\extensions\\gdocs.zip"
+ "zip_path": "examples/extensions/gdocs.zip"
},
{
"api_calls": [
@@ -753,63 +751,63 @@
"tabs"
],
"icon": "icon_128.png",
- "id": "8ad6dbf5f536e3181945cd352930da9cc159dc71",
+ "id": "bb57f7a0132cbeb36ad7e7bb0ab75c21704234ca",
"name": "Google Mail Checker",
- "path": "examples\\extensions\\gmail\\",
+ "path": "examples/extensions/gmail/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "GOOGLE MAIL CHECKER DISPLAYS THE NUMBER OF UNREAD MESSAGES IN YOUR GOOGLE MAIL INBOX. YOU CAN ALSO CLICK THE BUTTON TO OPEN YOUR INBOX. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.ONUPDATED CHROME.TABS.UPDATE",
"source_files": [
- "_locales\\ar\\messages.json",
- "_locales\\bg\\messages.json",
- "_locales\\ca\\messages.json",
- "_locales\\cs\\messages.json",
- "_locales\\da\\messages.json",
- "_locales\\de\\messages.json",
- "_locales\\el\\messages.json",
- "_locales\\en\\messages.json",
- "_locales\\en_GB\\messages.json",
- "_locales\\es\\messages.json",
- "_locales\\es_419\\messages.json",
- "_locales\\et\\messages.json",
- "_locales\\fi\\messages.json",
- "_locales\\fil\\messages.json",
- "_locales\\fr\\messages.json",
- "_locales\\he\\messages.json",
- "_locales\\hi\\messages.json",
- "_locales\\hr\\messages.json",
- "_locales\\hu\\messages.json",
- "_locales\\id\\messages.json",
- "_locales\\it\\messages.json",
- "_locales\\ja\\messages.json",
- "_locales\\ko\\messages.json",
- "_locales\\lt\\messages.json",
- "_locales\\lv\\messages.json",
- "_locales\\nb\\messages.json",
- "_locales\\nl\\messages.json",
- "_locales\\pl\\messages.json",
- "_locales\\pt_BR\\messages.json",
- "_locales\\pt_PT\\messages.json",
- "_locales\\ro\\messages.json",
- "_locales\\ru\\messages.json",
- "_locales\\sk\\messages.json",
- "_locales\\sl\\messages.json",
- "_locales\\sr\\messages.json",
- "_locales\\sv\\messages.json",
- "_locales\\th\\messages.json",
- "_locales\\tr\\messages.json",
- "_locales\\uk\\messages.json",
- "_locales\\vi\\messages.json",
- "_locales\\zh_CN\\messages.json",
- "_locales\\zh_TW\\messages.json",
+ "_locales/ar/messages.json",
+ "_locales/bg/messages.json",
+ "_locales/ca/messages.json",
+ "_locales/cs/messages.json",
+ "_locales/da/messages.json",
+ "_locales/de/messages.json",
+ "_locales/el/messages.json",
+ "_locales/en/messages.json",
+ "_locales/en_GB/messages.json",
+ "_locales/es/messages.json",
+ "_locales/es_419/messages.json",
+ "_locales/et/messages.json",
+ "_locales/fi/messages.json",
+ "_locales/fil/messages.json",
+ "_locales/fr/messages.json",
+ "_locales/he/messages.json",
+ "_locales/hi/messages.json",
+ "_locales/hr/messages.json",
+ "_locales/hu/messages.json",
+ "_locales/id/messages.json",
+ "_locales/it/messages.json",
+ "_locales/ja/messages.json",
+ "_locales/ko/messages.json",
+ "_locales/lt/messages.json",
+ "_locales/lv/messages.json",
+ "_locales/nb/messages.json",
+ "_locales/nl/messages.json",
+ "_locales/pl/messages.json",
+ "_locales/pt_BR/messages.json",
+ "_locales/pt_PT/messages.json",
+ "_locales/ro/messages.json",
+ "_locales/ru/messages.json",
+ "_locales/sk/messages.json",
+ "_locales/sl/messages.json",
+ "_locales/sr/messages.json",
+ "_locales/sv/messages.json",
+ "_locales/th/messages.json",
+ "_locales/tr/messages.json",
+ "_locales/uk/messages.json",
+ "_locales/vi/messages.json",
+ "_locales/zh_CN/messages.json",
+ "_locales/zh_TW/messages.json",
"background.html",
"manifest.json",
"options.html"
],
"source_hash": "030b77992ed5bbbbc18f1b717bc330b965b26aaf",
- "zip_path": "examples\\extensions\\gmail.zip"
+ "zip_path": "examples/extensions/gmail.zip"
},
{
"api_calls": [
@@ -830,12 +828,12 @@
"tabs"
],
"icon": "128.png",
- "id": "56529b7cbd67869d7fcebd6d46c3efddfe7b598f",
+ "id": "1682e05ea9a1bde985123b04f6f8ac50a8a64033",
"name": "Google Wave Notifier",
- "path": "examples\\extensions\\wave\\",
+ "path": "examples/extensions/wave/",
"protocols": [
- "https:\/\/",
- "http:\/\/"
+ "https://",
+ "http://"
],
"search_string": "GOOGLE WAVE NOTIFIER FIND OUT WHEN YOU HAVE NEW WAVES AND PREVIEW THEM FAST. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE",
"source_files": [
@@ -849,7 +847,7 @@
"prettyload.js"
],
"source_hash": "9f360bf8772e8a23862d854ea088e0bec867ba02",
- "zip_path": "examples\\extensions\\wave.zip"
+ "zip_path": "examples/extensions/wave.zip"
},
{
"api_calls": [],
@@ -859,11 +857,11 @@
"popup"
],
"icon": null,
- "id": "6deee0c2a7dbdd62a80deb526005814fa37e6556",
+ "id": "14b9651fda4e57b2a5914ba73a779812201b750a",
"name": "Hello World",
- "path": "examples\\tutorials\\getstarted\\",
+ "path": "examples/tutorials/getstarted/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "HELLO WORLD THE FIRST EXTENSION THAT I MADE. BROWSER_ACTION POPUP",
"source_files": [
@@ -871,7 +869,7 @@
"popup.html"
],
"source_hash": "1a3139dcb7f3e3499023703643e7056c61235123",
- "zip_path": "examples\\tutorials\\getstarted.zip"
+ "zip_path": "examples/tutorials/getstarted.zip"
},
{
"api_calls": [
@@ -887,9 +885,9 @@
"idle"
],
"icon": "sample-128.png",
- "id": "f0f5a81e76c7b29f8d13543dafd728285ecc96d7",
+ "id": "2020d72f2577f53caf8e94e3dbac0fb849ceaa4d",
"name": "Idle - Simple Example",
- "path": "examples\\api\\idle\\idle_simple\\",
+ "path": "examples/api/idle/idle_simple/",
"protocols": [],
"search_string": "IDLE - SIMPLE EXAMPLE DEMONSTRATES THE IDLE API BACKGROUND_PAGE BROWSER_ACTION IDLE CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.IDLE.ONSTATECHANGED CHROME.IDLE.QUERYSTATE",
"source_files": [
@@ -898,7 +896,7 @@
"manifest.json"
],
"source_hash": "1378042fee96e115d7b8003588eca369b43f772b",
- "zip_path": "examples\\api\\idle\\idle_simple.zip"
+ "zip_path": "examples/api/idle/idle_simple.zip"
},
{
"api_calls": [],
@@ -907,9 +905,9 @@
"chrome_url_overrides"
],
"icon": null,
- "id": "6e8555409ac09df65620a4f1651e9f283983eec5",
+ "id": "0ea1588bd07b20338fc21f725de1542a5fdf9726",
"name": "iGoogle new tab page",
- "path": "examples\\api\\override\\override_igoogle\\",
+ "path": "examples/api/override/override_igoogle/",
"protocols": [],
"search_string": "IGOOGLE NEW TAB PAGE CHROME_URL_OVERRIDES",
"source_files": [
@@ -917,7 +915,7 @@
"redirect.html"
],
"source_hash": "8ee76608adbf87c3260f9905e6cb1c8a45bd8e0c",
- "zip_path": "examples\\api\\override\\override_igoogle.zip"
+ "zip_path": "examples/api/override/override_igoogle.zip"
},
{
"api_calls": [
@@ -934,24 +932,24 @@
"tabs"
],
"icon": "imageinfo-128.png",
- "id": "e08426e68f327ea625937f4668b89da16da0e467",
+ "id": "646325c25f572a1d15edc73d057f821d847a4fbe",
"name": "Imageinfo",
- "path": "examples\\extensions\\imageinfo\\",
+ "path": "examples/extensions/imageinfo/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "IMAGEINFO GET IMAGE INFO FOR IMAGES, INCLUDING EXIF DATA BACKGROUND_PAGE CONTEXTMENUS TABS CHROME.CONTEXTMENUS.CREATE CHROME.TABS.GET CHROME.TABS.GETCURRENT CHROME.WINDOWS.CREATE CHROME.WINDOWS.UPDATE",
"source_files": [
"background.html",
- "imageinfo\\binaryajax.js",
- "imageinfo\\exif.js",
- "imageinfo\\imageinfo.js",
+ "imageinfo/binaryajax.js",
+ "imageinfo/exif.js",
+ "imageinfo/imageinfo.js",
"info.html",
"manifest.json"
],
- "source_hash": "672f49ed8edbe0829c7ba5a1d890b4440b157991",
- "zip_path": "examples\\extensions\\imageinfo.zip"
+ "source_hash": "c746d9114348f4b414c1ec05e988e2807feb963a",
+ "zip_path": "examples/extensions/imageinfo.zip"
},
{
"api_calls": [
@@ -974,11 +972,11 @@
"tabs"
],
"icon": "icon.png",
- "id": "5c7def7e0a26bac297128161b2bb9b2fc279985b",
+ "id": "ec97ec20ca2f095d081e39f1565fc12af09ef067",
"name": "Mappy",
- "path": "examples\\extensions\\mappy\\",
+ "path": "examples/extensions/mappy/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "MAPPY FINDS ADDRESSES IN THE WEB PAGE YOURE ON AND POPS UP A MAP WINDOW. BACKGROUND_PAGE PAGE_ACTION POPUP TABS CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.ONREQUEST CHROME.PAGEACTION.HIDE CHROME.PAGEACTION.SETTITLE CHROME.PAGEACTION.SHOW CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.TABS.SENDREQUEST",
"source_files": [
@@ -987,8 +985,8 @@
"mappy_content_script.js",
"popup.html"
],
- "source_hash": "4f9ce20e8352148b0a2c1cd91c212fd67b5e61f1",
- "zip_path": "examples\\extensions\\mappy.zip"
+ "source_hash": "81cf2d3975d7df8b58e5226c5b2b6df026446511",
+ "zip_path": "examples/extensions/mappy.zip"
},
{
"api_calls": [
@@ -1007,9 +1005,9 @@
"tabs"
],
"icon": "merge_windows_128.png",
- "id": "d72b4e8576fb00ad176957738099c930cffcfb9e",
+ "id": "b2f5f8a790e16f091a7e4e0a39b2d0a6d32e3a6d",
"name": "Merge Windows",
- "path": "examples\\api\\windows\\merge_windows\\",
+ "path": "examples/api/windows/merge_windows/",
"protocols": [],
"search_string": "MERGE WINDOWS MERGES ALL OF THE BROWSERS WINDOWS INTO THE CURRENT WINDOW BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.MOVE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT",
"source_files": [
@@ -1017,7 +1015,7 @@
"manifest.json"
],
"source_hash": "4b5fe52788e0bef2f3871b36105eb53cc760c454",
- "zip_path": "examples\\api\\windows\\merge_windows.zip"
+ "zip_path": "examples/api/windows/merge_windows.zip"
},
{
"api_calls": [
@@ -1035,9 +1033,9 @@
"tabs"
],
"icon": null,
- "id": "af975d20117c15a36dff66ef5a1ebca92f653969",
+ "id": "51a83d2ba3a32e3ff1bdb624d4e18ccec4c4038e",
"name": "Message Timer",
- "path": "examples\\api\\messaging\\timer\\",
+ "path": "examples/api/messaging/timer/",
"protocols": [],
"search_string": "MESSAGE TIMER TIMES HOW LONG IT TAKES TO SEND A MESSAGE TO A CONTENT SCRIPT AND BACK. BROWSER_ACTION POPUP TABS CHROME.EXTENSION.ONCONNECT CHROME.EXTENSION.ONREQUEST CHROME.TABS.CONNECT CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.SENDREQUEST",
"source_files": [
@@ -1046,7 +1044,7 @@
"popup.html"
],
"source_hash": "927cf398a95a665beb64f56a4bfb791b98a8ee96",
- "zip_path": "examples\\api\\messaging\\timer.zip"
+ "zip_path": "examples/api/messaging/timer.zip"
},
{
"api_calls": [
@@ -1065,9 +1063,9 @@
"tabs"
],
"icon": null,
- "id": "7772f091557a50889effa6e5b19e83b4cf80399b",
+ "id": "4f6785ec4f937add6728615682dd37c9a42d9548",
"name": "My Bookmarks",
- "path": "examples\\api\\bookmarks\\basic\\",
+ "path": "examples/api/bookmarks/basic/",
"protocols": [],
"search_string": "MY BOOKMARKS A BROWSER ACTION WITH A POPUP DUMP OF ALL BOOKMARKS, INCLUDING SEARCH, ADD, EDIT AND DELETE. BOOKMARKS BROWSER_ACTION POPUP TABS CHROME.BOOKMARKS.CREATE CHROME.BOOKMARKS.GET CHROME.BOOKMARKS.GETTREE CHROME.BOOKMARKS.REMOVE CHROME.BOOKMARKS.UPDATE CHROME.TABS.CREATE",
"source_files": [
@@ -1075,7 +1073,7 @@
"popup.html"
],
"source_hash": "5fd4c8e159a36d2462e9691db12d77a27684d6b7",
- "zip_path": "examples\\api\\bookmarks\\basic.zip"
+ "zip_path": "examples/api/bookmarks/basic.zip"
},
{
"api_calls": [
@@ -1088,11 +1086,11 @@
"tabs"
],
"icon": "news_icon.png",
- "id": "28c933f585b0903a56f9a16658aa26cf61f9da0f",
+ "id": "597015d3bcce3da693b02314afd607bec4f55291",
"name": "News Reader",
- "path": "examples\\extensions\\news_a11y\\",
+ "path": "examples/extensions/news_a11y/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "NEWS READER DISPLAYS THE FIRST 5 ITEMS FROM THE GOOGLE NEWS - TOP NEWS RSS FEED IN A POPUP. BROWSER_ACTION POPUP TABS CHROME.TABS.CREATE",
"source_files": [
@@ -1100,7 +1098,7 @@
"manifest.json"
],
"source_hash": "af7474bf0d3ef1a407f27ae0900167a1408ead35",
- "zip_path": "examples\\extensions\\news_a11y.zip"
+ "zip_path": "examples/extensions/news_a11y.zip"
},
{
"api_calls": [
@@ -1114,23 +1112,23 @@
"tabs"
],
"icon": "news_icon.png",
- "id": "80e7eac29801029c81ecaabb7c7021bbd0ceea88",
+ "id": "6444e5c8ae112a6a433909c5e770669cd16e2e5f",
"name": "News Reader",
- "path": "examples\\extensions\\news_i18n\\",
+ "path": "examples/extensions/news_i18n/",
"protocols": [
- "http:\/\/",
- "http:\/\/"
+ "http://",
+ "http://"
],
"search_string": "NEWS READER DISPLAYS THE FIRST 5 ITEMS FROM THE GOOGLE NEWS - TOP NEWS RSS FEED IN A POPUP. BROWSER_ACTION POPUP TABS CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE",
"source_files": [
- "_locales\\en\\messages.json",
- "_locales\\es\\messages.json",
- "_locales\\sr\\messages.json",
+ "_locales/en/messages.json",
+ "_locales/es/messages.json",
+ "_locales/sr/messages.json",
"feed.html",
"manifest.json"
],
"source_hash": "381268f1183beaeba8d6596e736dc2c00a55fd21",
- "zip_path": "examples\\extensions\\news_i18n.zip"
+ "zip_path": "examples/extensions/news_i18n.zip"
},
{
"api_calls": [
@@ -1146,28 +1144,28 @@
"popup",
"tabs"
],
- "icon": "images\/news_icon.png",
- "id": "e9e5f15da193c45aad4d49ced748dfbbd6c904b3",
+ "icon": "images/news_icon.png",
+ "id": "3aea027164cb9b732ba4a8c51cb93708891726ef",
"name": "News Reader (by Google)",
- "path": "examples\\extensions\\news\\",
+ "path": "examples/extensions/news/",
"protocols": [
- "http:\/\/"
+ "http://"
],
"search_string": "NEWS READER (BY GOOGLE) DISPLAYS THE LATEST STORIES FROM GOOGLE NEWS IN A POPUP. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE POPUP TABS CHROME.EXTENSION.GETURL CHROME.I18N.GETMESSAGE CHROME.TABS.CREATE",
"source_files": [
- "_locales\\en\\messages.json",
- "css\\feed.css",
- "css\\options.css",
- "javascript\\feed.js",
- "javascript\\options.js",
- "javascript\\util.js",
+ "_locales/en/messages.json",
+ "css/feed.css",
+ "css/options.css",
+ "javascript/feed.js",
+ "javascript/options.js",
+ "javascript/util.js",
"manifest.json",
- "views\\background.html",
- "views\\feed.html",
- "views\\options.html"
+ "views/background.html",
+ "views/feed.html",
+ "views/options.html"
],
"source_hash": "cc21920e101dd4d4c535f4842e3f0ab4be285166",
- "zip_path": "examples\\extensions\\news.zip"
+ "zip_path": "examples/extensions/news.zip"
},
{
"api_calls": [
@@ -1181,9 +1179,9 @@
"tabs"
],
"icon": "128.png",
- "id": "324e557c216dd6edbeb0112ed53d55a05b5e6112",
+ "id": "f799e26ceef2367cf836f24bcb47df4398b0df58",
"name": "Notification Demo",
- "path": "examples\\api\\notifications\\",
+ "path": "examples/api/notifications/",
"protocols": [],
"search_string": "NOTIFICATION DEMO SHOWS OFF DESKTOP NOTIFICATIONS, WHICH ARE TOAST WINDOWS THAT POP UP ON THE DESKTOP. BACKGROUND_PAGE NOTIFICATIONS OPTIONS_PAGE TABS CHROME.TABS.CREATE",
"source_files": [
@@ -1193,7 +1191,7 @@
"options.html"
],
"source_hash": "bc2985ef75d717779cb6e1e523a3e063067c3494",
- "zip_path": "examples\\api\\notifications.zip"
+ "zip_path": "examples/api/notifications.zip"
},
{
"api_calls": [
@@ -1205,9 +1203,9 @@
"background_page"
],
"icon": null,
- "id": "85a9f4cfd3645dfc4d1d90cc559261b689803626",
+ "id": "e787b322bddbc6289bb31b7d7550b1bf6456a80b",
"name": "Omnibox Example",
- "path": "examples\\api\\omnibox\\simple-example\\",
+ "path": "examples/api/omnibox/simple-example/",
"protocols": [],
"search_string": "OMNIBOX EXAMPLE TO USE, TYPE OMNIX PLUS A SEARCH TERM INTO THE OMNIBOX. BACKGROUND_PAGE CHROME.OMNIBOX.ONINPUTCHANGED CHROME.OMNIBOX.ONINPUTENTERED",
"source_files": [
@@ -1215,7 +1213,7 @@
"manifest.json"
],
"source_hash": "21f142aad0637086ec08923a11ce3dee70e42bc6",
- "zip_path": "examples\\api\\omnibox\\simple-example.zip"
+ "zip_path": "examples/api/omnibox/simple-example.zip"
},
{
"api_calls": [
@@ -1229,9 +1227,9 @@
"page_action"
],
"icon": "sandwich-128.png",
- "id": "56bbb002845c9ada93807b2f83d51447adf146fd",
+ "id": "8d0a50b57c26bb498be592e871001ffed91541b4",
"name": "Page action by content",
- "path": "examples\\api\\pageAction\\pageaction_by_content\\",
+ "path": "examples/api/pageAction/pageaction_by_content/",
"protocols": [],
"search_string": "PAGE ACTION BY CONTENT SHOWS A PAGE ACTION FOR HTML PAGES CONTAINING THE WORD SANDWICH BACKGROUND_PAGE PAGE_ACTION CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.PAGEACTION.SHOW",
"source_files": [
@@ -1240,7 +1238,7 @@
"manifest.json"
],
"source_hash": "0f4b881b1bc2e2fd6098fd219ca061b72a9654b7",
- "zip_path": "examples\\api\\pageAction\\pageaction_by_content.zip"
+ "zip_path": "examples/api/pageAction/pageaction_by_content.zip"
},
{
"api_calls": [
@@ -1254,9 +1252,9 @@
"tabs"
],
"icon": "icon-128.png",
- "id": "65afad56921c30f207a30f5ecf929e06b712f552",
+ "id": "80b86ccc6e8520660fa591caa565826f0ed1b12c",
"name": "Page action by URL",
- "path": "examples\\api\\pageAction\\pageaction_by_url\\",
+ "path": "examples/api/pageAction/pageaction_by_url/",
"protocols": [],
"search_string": "PAGE ACTION BY URL SHOWS A PAGE ACTION FOR URLS WHICH HAVE THE LETTER G IN THEM. BACKGROUND_PAGE PAGE_ACTION TABS CHROME.PAGEACTION.SHOW CHROME.TABS.ONUPDATED",
"source_files": [
@@ -1264,7 +1262,7 @@
"manifest.json"
],
"source_hash": "732ef0951e1d6ff4afedb884b0e63cb342bb1499",
- "zip_path": "examples\\api\\pageAction\\pageaction_by_url.zip"
+ "zip_path": "examples/api/pageAction/pageaction_by_url.zip"
},
{
"api_calls": [
@@ -1295,36 +1293,36 @@
"tabs"
],
"icon": null,
- "id": "7446de67bf18dc34b5ff0fb4e1d9d7d166339bb9",
+ "id": "d74c3c18a1c1dd18b035149105a306f837c8823e",
"name": "Page Benchmarker",
- "path": "examples\\extensions\\benchmark\\",
+ "path": "examples/extensions/benchmark/",
"protocols": [
- "https:\/\/",
- "http:\/\/"
+ "https://",
+ "http://"
],
"search_string": "PAGE BENCHMARKER CHROMIUM PAGE BENCHMARKER. BACKGROUND_PAGE BROWSER_ACTION OPTIONS_PAGE TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETBADGEBACKGROUNDCOLOR CHROME.BROWSERACTION.SETBADGETEXT CHROME.BROWSERACTION.SETTITLE CHROME.EXTENSION.CONNECT CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETEXTENSIONTABS CHROME.EXTENSION.GETURL CHROME.EXTENSION.ONCONNECT CHROME.TABS.CREATE CHROME.TABS.EXECUTESCRIPT CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.GETSELECTED CHROME.TABS.REMOVE CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETCURRENT",
"source_files": [
"background.html",
- "jquery\\jquery-1.4.2.min.js",
- "jquery\\jquery-ui-1.8.4.custom.min.js",
- "jquery\\jquery.client.js",
- "jquery\\jquery.flot.dashes.js",
- "jquery\\jquery.flot.js",
- "jquery\\jquery.flot.min.js",
- "jquery\\jquery.flot.navigate.js",
- "jquery\\jquery.flot.valuelabels.js",
- "jst\\jsevalcontext.js",
- "jst\\jstemplate.js",
- "jst\\jstemplate_test.js",
- "jst\\util.js",
+ "jquery/jquery-1.4.2.min.js",
+ "jquery/jquery-ui-1.8.4.custom.min.js",
+ "jquery/jquery.client.js",
+ "jquery/jquery.flot.dashes.js",
+ "jquery/jquery.flot.js",
+ "jquery/jquery.flot.min.js",
+ "jquery/jquery.flot.navigate.js",
+ "jquery/jquery.flot.valuelabels.js",
+ "jst/jsevalcontext.js",
+ "jst/jstemplate.js",
+ "jst/jstemplate_test.js",
+ "jst/util.js",
"manifest.json",
"options.html",
"script.js",
- "util\\sorttable.js",
- "util\\table2CSV.js"
+ "util/sorttable.js",
+ "util/table2CSV.js"
],
- "source_hash": "8a8cf6896eab009a372e9ec091a41e8e6fed4f1b",
- "zip_path": "examples\\extensions\\benchmark.zip"
+ "source_hash": "7e592dbd3446353f7d98d1760f7cd773035aaaad",
+ "zip_path": "examples/extensions/benchmark.zip"
},
{
"api_calls": [
@@ -1338,12 +1336,12 @@
"tabs"
],
"icon": null,
- "id": "a9ea9e35b2e9990e488afeb97407655ea14fc8dc",
+ "id": "e6ae17ab4ccfd7e059c8c01f25760ca5d894c7fd",
"name": "Print this page",
- "path": "examples\\api\\browserAction\\print\\",
+ "path": "examples/api/browserAction/print/",
"protocols": [
- "http:\/\/",
- "https:\/\/"
+ "http://",
+ "https://"
],
"search_string": "PRINT THIS PAGE ADDS A PRINT BUTTON TO THE BROWSER. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.TABS.UPDATE",
"source_files": [
@@ -1351,7 +1349,7 @@
"manifest.json"
],
"source_hash": "be980117222f6b041bb012c5a0793040cef747b6",
- "zip_path": "examples\\api\\browserAction\\print.zip"
+ "zip_path": "examples/api/browserAction/print.zip"
},
{
"api_calls": [
@@ -1365,9 +1363,9 @@
"tabs"
],
"icon": null,
- "id": "455ec3784d8094b318eac572bc092ec07c5286b0",
+ "id": "beff6ecd9677dea0a7c648c5042165b48bb66f09",
"name": "Process Monitor",
- "path": "examples\\api\\processes\\process_monitor\\",
+ "path": "examples/api/processes/process_monitor/",
"protocols": [],
"search_string": "PROCESS MONITOR ADDS A BROWSER ACTION THAT MONITORS RESOURCE USAGE OF ALL BROWSER PROCESSES. BROWSER_ACTION EXPERIMENTAL POPUP TABS CHROME.EXPERIMENTAL.PROCESSES.ONUPDATED",
"source_files": [
@@ -1375,7 +1373,7 @@
"popup.html"
],
"source_hash": "a4d002a65d5ec54ef4495f8b5552a260119df739",
- "zip_path": "examples\\api\\processes\\process_monitor.zip"
+ "zip_path": "examples/api/processes/process_monitor.zip"
},
{
"api_calls": [
@@ -1395,15 +1393,15 @@
"browser_action",
"tabs"
],
- "icon": "img\/icon-128.png",
- "id": "545d6989740a0e7f57a9751c2ebc0e250053a08f",
+ "icon": "img/icon-128.png",
+ "id": "56a8d2ac24ca7bba78fd88ad57f43fc13c784497",
"name": "Sample - OAuth Contacts",
- "path": "examples\\extensions\\oauth_contacts\\",
+ "path": "examples/extensions/oauth_contacts/",
"protocols": [
- "http:\/\/",
- "https:\/\/",
- "https:\/\/",
- "https:\/\/"
+ "http://",
+ "https://",
+ "https://",
+ "https://"
],
"search_string": "SAMPLE - OAUTH CONTACTS USES OAUTH TO CONNECT TO GOOGLES CONTACTS SERVICE AND DISPLAY A LIST OF YOUR CONTACTS. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.GETBACKGROUNDPAGE CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE",
"source_files": [
@@ -1415,7 +1413,7 @@
"manifest.json"
],
"source_hash": "e9afbd588b1593c9d3e9b9612ac242c781871f34",
- "zip_path": "examples\\extensions\\oauth_contacts.zip"
+ "zip_path": "examples/extensions/oauth_contacts.zip"
},
{
"api_calls": [
@@ -1429,9 +1427,9 @@
"experimental"
],
"icon": "sandwich-128.png",
- "id": "39a3d4c4282ee5090652938decfb6df79b626151",
+ "id": "38f6e1e17756ede38b1364c7114a738ca717dcbb",
"name": "SandwichBar",
- "path": "examples\\api\\infobars\\sandwichbar\\",
+ "path": "examples/api/infobars/sandwichbar/",
"protocols": [],
"search_string": "SANDWICHBAR SHOWS AN INFOBAR ON PAGES WHICH CONTAIN THE WORD SANDWICH BACKGROUND_PAGE EXPERIMENTAL CHROME.EXPERIMENTAL.INFOBARS.SHOW CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST",
"source_files": [
@@ -1441,7 +1439,7 @@
"manifest.json"
],
"source_hash": "890d698634e5228ef7da8ffca3008f843b9a7cab",
- "zip_path": "examples\\api\\infobars\\sandwichbar.zip"
+ "zip_path": "examples/api/infobars/sandwichbar.zip"
},
{
"api_calls": [
@@ -1462,9 +1460,9 @@
"tabs"
],
"icon": null,
- "id": "364415e46171be6479a095b214eab9783a4648d2",
+ "id": "fc89b35755483af30b66cd72cefa34a43a3e8312",
"name": "Show Tabs in Process",
- "path": "examples\\api\\processes\\show_tabs\\",
+ "path": "examples/api/processes/show_tabs/",
"protocols": [],
"search_string": "SHOW TABS IN PROCESS ADDS A BROWSER ACTION SHOWING WHICH TABS SHARE THE CURRENT TABS PROCESS. BROWSER_ACTION EXPERIMENTAL POPUP TABS CHROME.EXPERIMENTAL.PROCESSES.GETPROCESSIDFORTAB CHROME.TABS.GET CHROME.TABS.GETSELECTED CHROME.TABS.UPDATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT CHROME.WINDOWS.UPDATE",
"source_files": [
@@ -1472,7 +1470,7 @@
"popup.html"
],
"source_hash": "c9818c3c4c2e4fae0a7cc29588514e050356fd52",
- "zip_path": "examples\\api\\processes\\show_tabs.zip"
+ "zip_path": "examples/api/processes/show_tabs.zip"
},
{
"api_calls": [
@@ -1510,9 +1508,9 @@
"tabs"
],
"icon": null,
- "id": "ad0d399dfc6d92af6ee9b759d7792a0d0bb85370",
+ "id": "230463f2d5c3d4d0ca13c230e1f00f2aae0a8a64",
"name": "Tab Inspector",
- "path": "examples\\api\\tabs\\inspector\\",
+ "path": "examples/api/tabs/inspector/",
"protocols": [],
"search_string": "TAB INSPECTOR UTILITY FOR WORKING WITH THE EXTENSION TABS API BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.TABS.CREATE CHROME.TABS.GET CHROME.TABS.GETALLINWINDOW CHROME.TABS.GETSELECTED CHROME.TABS.MOVE CHROME.TABS.ONATTACHED CHROME.TABS.ONCREATED CHROME.TABS.ONDETACHED CHROME.TABS.ONMOVED CHROME.TABS.ONREMOVED CHROME.TABS.ONSELECTIONCHANGED CHROME.TABS.ONUPDATED CHROME.TABS.REMOVE CHROME.TABS.UPDATE CHROME.WINDOWS.CREATE CHROME.WINDOWS.GET CHROME.WINDOWS.GETALL CHROME.WINDOWS.GETCURRENT CHROME.WINDOWS.GETLASTFOCUSED CHROME.WINDOWS.ONCREATED CHROME.WINDOWS.ONFOCUSCHANGED CHROME.WINDOWS.ONREMOVED CHROME.WINDOWS.REMOVE CHROME.WINDOWS.UPDATE",
"source_files": [
@@ -1522,7 +1520,7 @@
"tabs_api.html"
],
"source_hash": "3076b39a4302d8e86f456e6d7367129187cce0c0",
- "zip_path": "examples\\api\\tabs\\inspector.zip"
+ "zip_path": "examples/api/tabs/inspector.zip"
},
{
"api_calls": [
@@ -1540,9 +1538,9 @@
"tabs"
],
"icon": null,
- "id": "1e28bcf89e80466f155ab3a01a76cf5f60cb4104",
+ "id": "e1697cacebad05218798bf3e8a0f724517f0e8c3",
"name": "Test Screenshot Extension",
- "path": "examples\\api\\tabs\\screenshot\\",
+ "path": "examples/api/tabs/screenshot/",
"protocols": [],
"search_string": "TEST SCREENSHOT EXTENSION DEMONSTRATE SCREENSHOT FUNCTIONALITY IN THE CHROME.TABS API. BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.EXTENSION.GETVIEWS CHROME.TABS.CAPTUREVISIBLETAB CHROME.TABS.CREATE CHROME.TABS.ONUPDATED",
"source_files": [
@@ -1552,7 +1550,7 @@
"screenshot.js"
],
"source_hash": "6be9b92850e86ce311cc12a2cf0cda3b47ab5d58",
- "zip_path": "examples\\api\\tabs\\screenshot.zip"
+ "zip_path": "examples/api/tabs/screenshot.zip"
},
{
"api_calls": [
@@ -1567,9 +1565,9 @@
"tabs"
],
"icon": null,
- "id": "7b375c0f2c88517b42a5a341ac77e0762b481233",
+ "id": "b3de91ab04b7d7a2670ca7ee9d740eb42cead0b6",
"name": "Typed URL History",
- "path": "examples\\api\\history\\showHistory\\",
+ "path": "examples/api/history/showHistory/",
"protocols": [],
"search_string": "TYPED URL HISTORY READS YOUR HISTORY, AND SHOWS THE TOP TEN PAGES YOU GO TO BY TYPING THE URL. BROWSER_ACTION HISTORY TABS CHROME.HISTORY.GETVISITS CHROME.HISTORY.SEARCH CHROME.TABS.CREATE",
"source_files": [
@@ -1578,7 +1576,7 @@
"typedUrls.js"
],
"source_hash": "72d5c3586feefc692c63039ce8bdb5f9d366c0e2",
- "zip_path": "examples\\api\\history\\showHistory.zip"
+ "zip_path": "examples/api/history/showHistory.zip"
}
]
} \ No newline at end of file
diff --git a/chrome/common/extensions/docs/static/background_pages.html b/chrome/common/extensions/docs/static/background_pages.html
index 2fd8a83..f4689be 100644
--- a/chrome/common/extensions/docs/static/background_pages.html
+++ b/chrome/common/extensions/docs/static/background_pages.html
@@ -41,6 +41,14 @@ like this:
...
}</pre>
+<p>
+If you need the browser to start up early&mdash;so
+you can display notifications, for example&mdash;then
+you might also want to specify the
+<a href="manifest.html#permissions">"background" permission</a>.
+</p>
+
+
<h2>Details</h2>
<p>
diff --git a/chrome/common/extensions/docs/static/experimental.html b/chrome/common/extensions/docs/static/experimental.html
index ac54045..87ee397 100644
--- a/chrome/common/extensions/docs/static/experimental.html
+++ b/chrome/common/extensions/docs/static/experimental.html
@@ -47,14 +47,27 @@ upload extensions that use experimental APIs.
</pre>
</li>
<li>
- Specify the <b>--enable-experimental-extension-apis</b> flag
- when you launch the browser.
- On Windows, you can do this by modifying
- the properties of the shortcut that you use to launch Google Chrome.
- For example:
+ Enable the experimental API in your browser.
+ You can do this in either of two ways:
+ <ul>
+ <li> Go to <b>chrome://flags</b>,
+ find "Experimental Extension APIs",
+ click its "Enable" link,
+ and restart Chrome.
+ From now on,
+ unless you return to that page and disable experimental APIs,
+ you'll be able to run extensions that use experimental APIs.
+ </li>
+ <li> Specify the <b>--enable-experimental-extension-apis</b> flag
+ each time you launch the browser.
+ On Windows, you can do this by modifying
+ the properties of the shortcut that you use to launch Google Chrome.
+ For example:
<pre>
<em>path_to_chrome.exe</em> <b>--enable-experimental-extension-apis</b></pre>
+ </li>
+ </ul>
</li>
<li>
diff --git a/chrome/common/extensions/docs/static/experimental.proxy.html b/chrome/common/extensions/docs/static/experimental.proxy.html
new file mode 100644
index 0000000..4e7f066
--- /dev/null
+++ b/chrome/common/extensions/docs/static/experimental.proxy.html
@@ -0,0 +1,262 @@
+<div id="pageData-name" class="pageData">Proxy Settings</div>
+
+<!-- BEGIN AUTHORED CONTENT -->
+<p id="classSummary">
+Use the <code>chrome.experimental.proxysettings</code> module to manage Chrome's
+proxy settings. This module is still experimental. For information on how to use
+experimental APIs, see the <a href="experimental.html">chrome.experimental.*
+ APIs</a> page.
+</p>
+
+<h2 id="manifest">Manifest</h2>
+<p>You must declare the "proxy" permission
+in the <a href="manifest.html">extension manifest</a>
+to use the proxy settings API.
+For example:</p>
+<pre>{
+ "name": "My extension",
+ ...
+ <b>"permissions": [
+ "experimental", "proxy"
+ ]</b>,
+ ...
+}</pre>
+
+<h2 id="description">Objects and properties</h2>
+
+<p>
+Proxy settings are defined in a
+<a href="#type-ProxyConfig"><code>ProxyConfig</code></a> object. Depending on
+Chrome's proxy settings, the settings may contain
+<a href="#type-ProxyRules"><code>ProxyRules</code></a> or a <a
+ href="#type-PacScript"><code>PacScript</code></a>.
+</p>
+
+<h3 id="proxy_modes">Proxy modes</h3>
+
+<p>
+A ProxyConfig object's <code>mode</code> attribute determines the overall
+behavior of Chrome with regards to proxy usage. It can take the following
+values:
+<dl>
+ <dt><code>direct</code></dt>
+ <dd>In <code>direct</code> mode all connections are created directly, without
+ any proxy involved. This mode allows no further parameters in the
+ <code>ProxyConfig</code> object.</dd>
+
+ <dt><code>auto_detect</code></dt>
+ <dd>In <code>auto_detect</code> mode the proxy configuration is determined by
+ a PAC script that can be downloaded at
+ <a href="http://wpad/wpad.dat">http://wpad/wpad.dat</a>.
+ This mode allows no further parameters in the <code>ProxyConfig</code>
+ object.</dd>
+
+ <dt><code>pac_script</code></dt>
+ <dd>In <code>pac_script</code> mode the proxy configuration is determined by
+ a PAC script that is either retrieved from the URL specified in the
+ <a href="#type-PacScript"><code>PacScript</code></a> object or
+ taken literally from the <code>data</code> element specified in the
+ <a href="#type-PacScript"><code>PacScript</code></a> object.
+ Besides this, this mode allows no further parameters in the
+ <code>ProxyConfig</code> object.</dd>
+
+ <dt><code>fixed_servers</code></dt>
+ <dd>In <code>fixed_servers</code> mode the proxy configuration is codified in
+ a <a href="#type-ProxyRules><code>ProxyRules"><code>ProxyRules</code></a>
+ object. Its structure is described in <a href="#proxy_rules">Proxy rules</a>.
+ Besides this, the <code>fixed_servers</code> mode allows no further parameters
+ in the <code>ProxyConfig</code> object.</dd>
+
+ <dt><code>system</code></dt>
+ <dd>In <code>system</code> mode the proxy configuration is taken from the
+ operating system. This mode allows no further parameters in the
+ <code>ProxyConfig</code> object. Note that the <code>system</code> mode is
+ different from setting no proxy configuration. In the latter case, Chrome
+ falls back to the system settings only if no command-line options influence
+ the proxy configuration.</dd>
+</dl>
+</p>
+
+<h3 id="proxy_rules">Proxy rules</h3>
+
+<p>
+The <a href="#type-ProxyRules"><code>ProxyRules</code></a> object can contain
+either a <code>singleProxy</code> attribute or a subset of
+<code>proxyForHttp</code>, <code>proxyForHttps</code>, <code>proxyForFtp</code>,
+and <code>fallbackProxy</code>.
+</p>
+
+<p>
+In the first case, HTTP, HTTPS and FTP traffic is proxied through the specified
+proxy server. Other traffic is sent directly. In the latter case the behavior is
+slightly more subtle: If a proxy server is configured for the HTTP, HTTPS or FTP
+protocol, the respective traffic is proxied through the specified server. If no
+such proxy server is specified or traffic uses a different protocol than HTTP,
+HTTPS or FTP, the <code>fallbackProxy</code> is used. If no
+<code>fallbackProxy</code> is specified, traffic is sent directly without a
+proxy server.
+</p>
+
+<h3 id="proxy_server_objects">Proxy server objects</h3>
+
+<p>
+A proxy server is configured in a
+<a href="#type-ProxyServer"><code>ProxyServer</code></a> object. The connection
+to the proxy server (defined by the <code>host</code> attribute) uses the
+protocol defined in the <code>scheme</code> attribute. If no <code>scheme</code>
+is specified, the proxy connection defaults to <code>http</code>.
+</p>
+
+<p>
+If no <code>port</code> is defined in a
+<a href="#type-ProxyServer"><code>ProxyServer</code></a> object, the port is
+derived from the scheme. The default ports are:
+<table>
+ <tr><th>Scheme</th><th>Port</th></tr>
+ <tr><td>http</td><td>80</td></tr>
+ <tr><td>https</td><td>443</td></tr>
+ <tr><td>socks4</td><td>1080</td></tr>
+ <tr><td>socks5</td><td>1080</td></tr>
+</table>
+</p>
+
+<h3 id="bypass_list">Bypass list</h3>
+
+<p>
+Individual servers may be excluded from being proxied with the
+<code>bypassList</code>. This list may contain the following entries:
+<dl>
+ <dt><code>[<em>&lt;scheme&gt;</em>://]<em>&lt;host-pattern&gt;</em>[:<em>&lt;port&gt;</em>]</code></dt>
+ <dd>Match all hostnames that match the pattern <em>&lt;host-pattern&gt;</em>.<br>
+ Examples: <code>"foobar.com", "*foobar.com", "*.foobar.com", "*foobar.com:99",
+ "https://x.*.y.com:99"</code></dd>
+
+ <dt><code>[<em>&lt;scheme&gt;</em>://]<em>&lt;ip-literal&gt;</em>[:<em>&lt;port&gt;</em>]</code></dt>
+ <dd>Match URLs that are IP address literals.<br>
+ Conceptually this is the similar to the first case, but with special cases
+ to handle IP literal canonicalization. For example, matching
+ on "[0:0:0::1]" is the same as matching on "[::1]" because
+ the IPv6 canonicalization is done internally.<br>
+ Examples: <code>"127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99"</code></dd>
+
+ <dt><code><em>&lt;ip-literal&gt;</em>/<em>&lt;prefix-length-in-bits&gt;</em></code></dt>
+ <dd>Match any URL containing an IP literal within the given range. The IP
+ range is specified using CIDR notation.<br>
+ Examples: <code>"192.168.1.1/16", "fefe:13::abc/33"</code></dd>
+
+ <dt><code>&lt;local&gt;</code></dt>
+ <dd>Match local addresses. An address is local if the host is "127.0.0.1",
+ "::1", or "localhost".<br>
+ Example: <code>"&lt;local&gt;"</code></dd>
+</dl>
+
+
+<h2 id="precedence">Precedence</h2>
+
+<p>
+Chrome manages settings on different layers. The following list describes the
+layers that may influence the effective proxy settings, in increasing order of
+precedence.
+<ol>
+ <li>System settings provided by the operating system</li>
+ <li>Command line parameters</li>
+ <li>Preferences set by extensions</li>
+ <li>Policies</li>
+</ol>
+</p>
+
+<p>
+As the list implies, policies might overrule any changes that you specify with
+the proxy settings API.
+</p>
+
+<p>
+Chrome allows using different proxy settings for regular windows and incognito
+windows. The following example illustrates the behavior. Assume that no policy
+overrides the proxy settings and that an extension can set proxy settings for
+regular windows <b>(R)</b> and proxy settings for incognito windows <b>(I)</b>.
+</p>
+
+<p>
+<ul>
+ <li>If only <b>(R)</b> is set, these settings are effective for both regular
+ and incognito windows.</li>
+ <li>If only <b>(I)</b> is set, these settings are effective for only incognito
+ windows. Regular windows use the proxy settings determined by the lower layers
+ (command-line options and system settings).</li>
+ <li>If both <b>(R)</b> and <b>(I)</b> are set, the respective settings are
+ used for regular and incognito windows.</li>
+</ul>
+</p>
+
+<p>
+If two extensions want to set proxy settings, the extension installed last takes
+precedence over the other extensions. If the extension installed last sets only
+<b>(I)</b>, the settings of regular windows can be defined by more recently
+installed extensions.
+</p>
+
+
+
+<h2 id="overview-examples">Examples</h2>
+
+<p>
+The following code sets a SOCKS 5 proxy for HTTP connections to all servers but
+foobar.com and uses direct connections for all other protocols. The settings
+apply to regular and incognito windows.
+</p>
+
+<pre>
+var config = {
+ mode: "fixed_servers",
+ rules: {
+ httpProxy: {
+ scheme: "socks5",
+ host: "1.2.3.4"
+ },
+ bypassList: ["foobar.com"]
+ }
+};
+chrome.experimental.proxy.settings.set(
+ {'value': config, 'incognito': false},
+ function() {});
+</pre>
+
+<p>
+The following code sets a custom pac script.
+</p>
+
+<pre>
+var config = {
+ mode: "pac_script",
+ pacScript: {
+ data: "function FindProxyForURL(url, host) {\n" +
+ " if (host == 'foobar.com')\n" +
+ " return 'PROXY blackhole:80';\n" +
+ " return 'DIRECT';\n" +
+ "}"
+ }
+};
+chrome.experimental.proxy.settings.set(
+ {'value': config, 'incognito': false},
+ function() {});
+</pre>
+
+<p>
+The next snippet queries the current proxy settings.
+</p>
+
+<pre>
+chrome.experimental.proxy.settings.get(
+ {'incognito': false},
+ function(config) {console.log(JSON.stringify(config));});
+</pre>
+
+<p>
+Note that the <code>value</code> object passed to <code>set()</code> is not
+identical to the <code>value</code> object passed to callback function of
+<code>get()</code>. The latter will contain a <code>rules.httpProxy.port</code>
+element.
+</p>
+
+<!-- END AUTHORED CONTENT -->
diff --git a/chrome/common/extensions/docs/static/faq.html b/chrome/common/extensions/docs/static/faq.html
index 482cff2..48fedef 100644
--- a/chrome/common/extensions/docs/static/faq.html
+++ b/chrome/common/extensions/docs/static/faq.html
@@ -16,27 +16,37 @@ try the
<h4>General</h4>
<ul>
<li><a href="#faq-gen-01">What are Google Chrome Extensions?</a></li>
+ <li><a href="#faq-dev-01">How can I set up Chrome for extension development?</a></li>
<li><a href="#faq-gen-02">What technologies are used to write extensions for Chrome?</a></li>
<li><a href="#faq-gen-03">Are extensions fetched from the web every time the browser is loaded?</a></li>
+ <li><a href="#faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</a></li>
</ul>
- <h4>Development</h4>
+ <h4>Capabilities</h4>
<ul>
- <li><a href="#faq-dev-01">How can I set up Chrome for extension development?</a></li>
- <li><a href="#faq-dev-02">Can I make cross-domain Ajax requests in an extension?</a></li>
- <li><a href="#faq-dev-03">Can I use 3rd party web services in my extension?</a></li>
- <li><a href="#faq-dev-04">Can I use OAuth in my extensions?</a></li>
- <li><a href="#faq-dev-05">What UI controls can I create for my extension?</a></li>
- <li><a href="#faq-dev-06">Can I load DLLs in my extension?</a></li>
+ <li><a href="#faq-dev-02">Can extensions make cross-domain Ajax requests?</a></li>
+ <li><a href="#faq-dev-03">Can extensions use 3rd party web services?</a></li>
<li><a href="#faq-dev-07">Can extensions encode/decode JSON data?</a></li>
- <li><a href="#faq-dev-08">Can I store data locally in my extension?</a></li>
- <li><a href="#faq-dev-09">How much data can I store in localStorage?</a></li>
- <li><a href="#faq-dev-10">Can I create an options menu for my application?</a></li>
+ <li><a href="#faq-dev-08">Can extensions store data locally?</a></li>
+ <li><a href="#faq-dev-04">Can extensions use OAuth?</a></li>
+ <li><a href="#faq-dev-06">Can extensions load DLLs?</a></li>
+ <li><a href="#faq-dev-05">Can extensions create UI outside of the rendered web page?</a></li>
+ <li><a href="#faq-interact-chrome">Can extensions listen to clicks on Chrome tabs and navigation buttons?</a>
<li><a href="#faq-dev-11">Can two extensions communicate with each other?</a></li>
- <li><a href="#faq-dev-12">What debugging tools are available to extension developers?</a></li>
<li><a href="#faq-dev-13">Can extensions use Google Analytics?</a></li>
- <li><a href="#faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</a></li>
- <li><a href="#faq-dev-15">Can I add a content script to chrome:// URLs?</a></li>
+ <li><a href="#faq-dev-15">Can extensions modify chrome:// URLs?</a></li>
+ <li><a href="#faq-open-popups">Can extensions open browser/page action popups without user interaction?</a></li>
+ <li><a href="#faq-persist-popups">Can extensions keep popups open after the user clicks away from them?</a></li>
+ <li><a href="#faq-lifecycle-events">Can extensions be notified when they are installed/uninstalled?</a></li>
+ </ul>
+ <h4>Development</h4>
+ <ul>
+ <li><a href="#faq-building-ui">How do I build a UI for my extension?</a>
+ <li><a href="#faq-dev-09">How much data can I store in localStorage?</a></li>
+ <li><a href="#faq-dev-10">How do I create an options menu for my application?</a></li>
+ <li><a href="#faq-dev-12">What debugging tools are available to extension developers?</a></li>
<li><a href="#faq-dev-16">Why do wildcard matches not work for top level domains (TLDs)?</a></li>
+ <li><a href="#faq-management">Why does the management API not fire events when my extension is installed/uninstalled?</a></li>
+ <li><a href="#faq-firstrun">How can an extension determine whether it is running for the first time?</a></li>
</ul>
<h4>Features and bugs</h4>
<ul>
@@ -54,6 +64,27 @@ try the
party websites or services, and customized browsing experiences.
</p>
+<h3 id="faq-dev-01">How can I set up Chrome for extension development?</h3>
+<p>
+ As long as you are using a version of Chrome that supports
+ extensions, you already have everything you need to start writing an
+ extension of your own.
+ You can start by turning on Developer mode.
+ </p>
+
+ <p>
+ Click the wrench icon
+ <img src="images/toolsmenu.gif" height="29" width="29" alt=""
+ class="nomargin" />
+ and select <b>Extensions</b> from the <b>Tools</b> menu.
+ If there's a "+" next to "Developer mode",
+ click the "+" so it turns into a "-".
+ Now you can reload extensions,
+ load an unpacked directory of files as if it were a packaged extension,
+ and more. For a complete tutorial, see
+ <a href="http://code.google.com/chrome/extensions/getstarted.html">Getting Started</a>.
+</p>
+
<h3 id="faq-gen-02">What technologies are used to write extensions for Chrome?</h3>
<p>
Extensions are written using the same standard web
@@ -79,74 +110,61 @@ try the
content from the web.
</p>
+<h3 id="faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</h3>
+<p>
+ To determine which version of Chrome is currently available on each
+ of the different platforms, visit
+ <a href="http://omahaproxy.appspot.com">omahaproxy.appspot.com</a>. On that
+ site you will see data in a format similar to:
+</p>
-<h2>Development</h2>
-
+<pre>cf,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cf,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cf,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+linux,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+linux,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+linux,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+mac,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+mac,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+mac,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,canary,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+win,stable,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cros,dev,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####
+cros,beta,#.#.###.#,#.#.###.#,mm/dd/yy,mm/dd/yy,#####,#####,#####</pre>
-<h3 id="faq-dev-01">How can I set up Chrome for extension development?</h3>
<p>
- As long as you are using a version of Chrome that supports
- extensions, you already have everything you need to start writing an
- extension of your own.
- You can start by turning on Developer mode.
- </p>
-
- <p>
- Click the wrench icon
- <img src="images/toolsmenu.gif" height="29" width="29" alt=""
- class="nomargin" />
- and select <b>Extensions</b> from the <b>Tools</b> menu.
- If there's a "+" next to "Developer mode",
- click the "+" so it turns into a "-".
- Now you can reload extensions,
- load an unpacked directory of files as if it were a packaged extension,
- and more. For a complete tutorial, see
- <a href="http://code.google.com/chrome/extensions/getstarted.html">Getting Started</a>.
+ Each line represents information about a different platform and channel
+ combination. The
+ listed platforms are <code>cf</code> (Google Chrome Frame),
+ <code>linux</code>, <code>mac</code>, <code>win</code>, and
+ <code>cros</code> (Google Chrome OS). The listed
+ channels are <code>canary</code>, <code>dev</code>, <code>beta</code>,
+ and <code>stable</code>.
+ The two four-part numbers after the channel represent the current and previous
+ versions of Chrome deployed to that platform-channel
+ combination. The rest of the information is metadata about when the releases
+ were first pushed, as well as revision numbers associated with each build.
</p>
-<h3 id="faq-dev-02">Can I make cross-domain Ajax requests in an extension?</h3>
+
+<h2>Capabilities</h2>
+
+<h3 id="faq-dev-02">Can extensions make cross-domain Ajax requests?</h3>
<p>
Yes. Extensions can make cross-domain requests. See
<a href="http://code.google.com/chrome/extensions/xhr.html">this page</a>
for more information.
</p>
-<h3 id="faq-dev-03">Can I use 3rd party web services in my extension?</h3>
+<h3 id="faq-dev-03">Can extensions use 3rd party web services?</h3>
<p>
Yes. Extensions are capable of making cross-domain Ajax
requests, so they can call remote APIs directly. APIs that provide data
in JSON format are particularly easy to use.
</p>
-<h3 id="faq-dev-04">Can I use OAuth in my extensions?</h3>
-<p>
- Absolutely, there are extensions that use OAuth to access remote data
- APIs. Most developers find it convenient to use a
- <a href="http://unitedheroes.net/OAuthSimple/js/OAuthSimple.js">JavaScript OAuth library</a>
- in order to simplify the process of signing OAuth requests.
-</p>
-
-<h3 id="faq-dev-05">What UI controls can I create for my extension?</h3>
-<p>
- Extensions use HTML and CSS to define their user interfaces, so you can use
- standard form controls to build your UI, or style the interface with CSS,
- as you would a web page. Additionally, your extension may add buttons
- to the Chrome browser itself. See
- <a href="http://code.google.com/chrome/extensions/browserAction.html">browser actions</a>
- and
- <a href="http://code.google.com/chrome/extensions/pageAction.html">page actions</a>
- for more information.
-</p>
-
-<h3 id="faq-dev-06">Can I load DLLs in my extension?</h3>
-<p>
- Yes, using the
- <a href="http://code.google.com/chrome/extensions/trunk/npapi.html">NPAPI interface</a>.
- Because of the possibility for abuse, though, we will review your extension
- before hosting it in the Google Chrome Extensions Gallery
- or Chrome Web Store.
-</p>
-
<h3 id="faq-dev-07">Can extensions encode/decode JSON data?</h3>
<p>
Yes, because V8 (Chrome's JavaScript engine) supports
@@ -156,7 +174,7 @@ try the
any additional JSON libraries in your code.
</p>
-<h3 id="faq-dev-08">Can I store data locally in my extension?</h3>
+<h3 id="faq-dev-08">Can extensions store data locally?</h3>
<p>
Yes, extensions can use <a href="http://dev.w3.org/html5/webstorage/">localStorage</a>
to store string data permanently. Using Chrome's built-in JSON
@@ -167,33 +185,45 @@ try the
which may be used as well.
</p>
-<h3 id="faq-dev-09">How much data can I store in localStorage?</h3>
+<h3 id="faq-dev-04">Can extensions use OAuth?</h3>
<p>
- Extensions can store up to 5MB of data in localStorage.
+ Yes, there are extensions that use OAuth to access remote data
+ APIs. Most developers find it convenient to use a
+ <a href="http://unitedheroes.net/OAuthSimple/js/OAuthSimple.js">JavaScript OAuth library</a>
+ in order to simplify the process of signing OAuth requests.
</p>
-<h3 id="faq-dev-10">Can I create an options menu for my application?</h3>
+<h3 id="faq-dev-06">Can extensions load DLLs?</h3>
<p>
- You can let users set options for your extension by creating an
- <a href="http://code.google.com/chrome/extensions/trunk/options.html">options page</a>,
- which is a simple HTML page that will be loaded when a user clicks the
- "options" button for your extension. This page can read and write settings
- to localStorage, or even send options to a web server so that they can be
- persisted across browsers.
+ Yes, using the <a href="npapi.html">NPAPI interface</a>.
+ Because of the possibility for abuse, though, we will review your extension
+ before hosting it in the Google Chrome Extensions Gallery
+ or Chrome Web Store.
</p>
-<h3 id="faq-dev-11">Can two extensions communicate with each other?</h3>
+<h3 id="faq-dev-05">Can extensions create UI outside of the rendered web page?</h3>
<p>
- Extensions may pass messages to other extensions. See the
- <a href="http://code.google.com/chrome/extensions/trunk/messaging.html#external">message passing documentation</a>
- for more information.
+ Yes, your extension may add buttons to the Chrome browser's user interface.
+ See <a href="browserAction.html">browser actions</a> and
+ <a href="pageAction.html">page actions</a> for more information.
+</p>
+<p>
+ An extension may also create popup notifications, which exist outside of the
+ browser window. See the <a href="notifications.html">desktop
+ notifications</a> documentation for more details.
</p>
-<h3 id="faq-dev-12">What debugging tools are available to extension developers?</h3>
+<h3 id="faq-interact-chrome">Can extensions listen to clicks on Chrome tabs and
+ navigation buttons?</h3>
<p>
- Chrome's built-in developer tools can be used to debug extensions
- as well as web pages. See this
- <a href="http://code.google.com/chrome/extensions/tut_debugging.html ">tutorial on debugging extensions</a>
+ No. Extensions are limited to listening to the events described in the <a
+ href="api_index.html">API documentation</a>.
+</p>
+
+<h3 id="faq-dev-11">Can two extensions communicate with each other?</h3>
+<p>
+ Yes, extensions may pass messages to other extensions. See the
+ <a href="messaging.html#external">message passing documentation</a>
for more information.
</p>
@@ -207,39 +237,7 @@ try the
this.
</p>
-<h3 id="faq-dev-14">How do I determine which version of Chrome is deployed to which channel?</h3>
-<p>
- To determine which version of Chrome is currently available on each
- of the different platforms, visit
- <a href="http://omahaproxy.appspot.com">omahaproxy.appspot.com</a>. On that
- site you will see data in a format similar to:
-</p>
-<pre>cf,dev,#.#.###.#,#.#.###.#
-cf,beta,#.#.###.#,#.#.###.#
-cf,stable,#.#.###.#,#.#.###.#
-linux,dev,#.#.###.#,#.#.###.#
-linux,beta,#.#.###.#,#.#.###.#
-linux,stable,#.#.###.#,#.#.###.#
-mac,dev,#.#.###.#,#.#.###.#
-mac,beta,#.#.###.#,#.#.###.#
-mac,stable,#.#.###.#,#.#.###.#
-win,canary,#.#.###.#,#.#.###.#
-win,dev,#.#.###.#,#.#.###.#
-win,beta,#.#.###.#,#.#.###.#
-win,stable,#.#.###.#,#.#.###.#</pre>
-
-<p>
- Each line represents a different platform and channel combination. The
- listed platforms are <code>cf</code> (Google Chrome Frame),
- <code>linux</code>, <code>mac</code>, and <code>win</code>. The listed
- channels are <code>canary</code>, <code>dev</code>, <code>beta</code>,
- and <code>stable</code>.
- The two four-part numbers at the end of each line represent the range of
- versions of Chrome currently deployed to that platform-channel
- combination.
-</p>
-
-<h3 id="faq-dev-15">Can I add a content script to chrome:// URLs?</h3>
+<h3 id="faq-dev-15">Can extensions modify chrome:// URLs?</h3>
<p>
No. The extensions APIs have been designed to minimize backwards
compatibility issues that can arise when new versions of the browser are
@@ -260,6 +258,65 @@ win,stable,#.#.###.#,#.#.###.#</pre>
to stay the same.
</p>
+<h3 id="faq-open-popups">Can extensions open browser/page action popups without
+ user interaction?</h3>
+<p>
+ No, popups can only be opened if the user clicks on the corresponding page or
+ browser action. An extension cannot open its popup programatically.
+</p>
+
+<h3 id="faq-persist-popups">Can extensions keep popups open after the user
+ clicks away from them?</h3>
+<p>
+ No, popups automatically close when the user focuses on some portion of the
+ browser outside of the popup. There is no way to keep the popup open after
+ the user has clicked away.
+</p>
+
+<h3 id="faq-lifecycle-events">Can extensions be notified when they are
+ installed/uninstalled?</h3>
+<p>
+ No, there are no events an extension can listen to in order to determine
+ whether it has been installed or uninstalled. However, an extension can
+ determine when it has been run for the first time. See <a
+ href="#faq-firstrun">this FAQ entry</a> for information.
+</p>
+
+
+<h2>Development</h2>
+
+
+<h3 id="faq-building-ui">How do I build a UI for my extension?</h3>
+<p>
+ Extensions use HTML and CSS to define their user interfaces, so you can use
+ standard form controls to build your UI, or style the interface with CSS,
+ as you would a web page. Additionally, extensions can add
+ <a href="#faq-dev-05">some limited UI elements to Chrome itself.</a>
+</p>
+
+<h3 id="faq-dev-09">How much data can I store in localStorage?</h3>
+<p>
+ Extensions can store up to 5MB of data in localStorage.
+</p>
+
+<h3 id="faq-dev-10">How do I create an options menu for my application?</h3>
+<p>
+ You can let users set options for your extension by creating an
+ <a href="http://code.google.com/chrome/extensions/trunk/options.html">options page</a>,
+ which is a simple HTML page that will be loaded when a user clicks the
+ "options" button for your extension. This page can read and write settings
+ to localStorage, or even send options to a web server so that they can be
+ persisted across browsers.
+</p>
+
+<h3 id="faq-dev-12">What debugging tools are available to extension developers?</h3>
+<p>
+ Chrome's built-in developer tools can be used to debug extensions
+ as well as web pages. See this
+ <a href="http://code.google.com/chrome/extensions/tut_debugging.html ">tutorial on debugging extensions</a>
+ for more information.
+</p>
+
<h3 id="faq-dev-16">Why do wildcard matches not work for top level domains
(TLDs)?</h3>
<p>
@@ -284,8 +341,35 @@ win,stable,#.#.###.#,#.#.###.#</pre>
your extension on.
</p>
+<h3 id="faq-management">Why does the management API not fire events when my
+ extension is installed/uninstalled?</h3>
+<p>
+ The <a href="management.html">management API</a> was intended to help create
+ new tab page replacement extensions. It was not intended to fire
+ install/uninstall events for the current extension.
+</p>
+
+<h3 id="faq-firstrun">How can an extension determine whether it is running for
+ the first time?</h3>
+<p>
+ An extension can check to see whether it is running for the first time by
+ checking for the presence of a value in localStorage, and writing the value if
+ it does not exist. For example:
+</p>
+
+<pre>var firstRun = (localStorage['firstRun'] == 'true');
+if (!firstRun) {
+ localStorage['firstRun'] = 'true';
+}</pre>
+
+<p>
+ Note that this check should be run in a background page, not a content script.
+</p>
+
+
<h2>Features and bugs</h2>
+
<h3 id="faq-fea-01">I think I've found a bug! How do I make sure it gets
fixed?</h3>
<p>
diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html
index aed4953..878ed38 100644
--- a/chrome/common/extensions/docs/static/manifest.html
+++ b/chrome/common/extensions/docs/static/manifest.html
@@ -297,7 +297,7 @@ or packaged app can use.
<p class="note">
<strong>Note:</strong>
Hosted apps can use the
-"geolocation", "notifications", and "unlimitedStorage" permissions,
+"background", "geolocation", "notifications", and "unlimitedStorage" permissions,
but not any other permissions listed in this table.
</p>
@@ -318,6 +318,37 @@ but not any other permissions listed in this table.
<a href="match_patterns.html">Match Patterns</a>.
</td>
</tr>
+<tr id="bg">
+ <td> "background" </td>
+ <td> <p>
+ Makes Chrome start up early and and shut down late,
+ so that apps and extensions can have a longer life.
+ </p>
+
+ <p>
+ When any installed hosted app, packaged app, or extension
+ has "background" permission, Chrome runs (invisibly)
+ as soon as the user logs into their computer&mdash;before
+ the user launches Chrome.
+ The "background" permission also makes Chrome continue running
+ (even after its last window is closed)
+ until the user explicitly quits Chrome.
+ </p>
+
+ <p class="note">
+ <b>Note:</b>
+ Disabled apps and extensions
+ are treated as if they aren't installed.
+ </p>
+
+ <p>
+ You typically use the "background" permission with a
+ <a href="background_pages.html">background page</a>
+ or (for hosted apps) a
+ <a href="http://code.google.com/chrome/apps/docs/background.html">background window</a>.
+ </p>
+ </td>
+</tr>
<tr>
<td> "bookmarks" </td>
<td> Required if the extension uses the
diff --git a/chrome/common/extensions/docs/static/match_patterns.html b/chrome/common/extensions/docs/static/match_patterns.html
index f0dc41b..24a8c89 100644
--- a/chrome/common/extensions/docs/static/match_patterns.html
+++ b/chrome/common/extensions/docs/static/match_patterns.html
@@ -26,6 +26,12 @@ Each match pattern has 3 parts:</p>
<li> <em>scheme</em> &mdash;
for example, <code>http</code> or <code>file</code>
or <code>*</code>
+ <p class="note">
+ <b>Note:</b>
+ Access to <code>file</code> URLs isn't automatic.
+ The user must visit the extensions management page
+ and opt in to <code>file</code> access for each extension that requests it.
+ </p>
</li>
<li> <em>host</em> &mdash;
for example, <code>www.google.com</code>
@@ -136,7 +142,8 @@ The following table shows some valid patterns.
<code>file:///foo*</code>
</td>
- <td>Matches any local file whose path starts with <code>/foo</code></td>
+ <td>Matches any local file whose path starts with <code>/foo</code>
+ </td>
<td>
file:///foo/bar.html<br>
diff --git a/chrome/common/extensions/docs/static/messaging.html b/chrome/common/extensions/docs/static/messaging.html
index 8d9cd3f..1391e7e 100644
--- a/chrome/common/extensions/docs/static/messaging.html
+++ b/chrome/common/extensions/docs/static/messaging.html
@@ -122,7 +122,7 @@ port.onMessage.addListener(function(msg) {
if (msg.question == "Who's there?")
port.postMessage({answer: "Madame"});
else if (msg.question == "Madame who?")
- port.postMessage({answer: "Madame... Bovary");
+ port.postMessage({answer: "Madame... Bovary"});
});
</pre>
diff --git a/chrome/common/extensions/docs/static/whats_new.html b/chrome/common/extensions/docs/static/whats_new.html
index 9bf0393..438896e 100644
--- a/chrome/common/extensions/docs/static/whats_new.html
+++ b/chrome/common/extensions/docs/static/whats_new.html
@@ -7,6 +7,7 @@ made in recent releases.
</p>
<ul>
+ <li> <a href="#10">Google Chrome 10</a> </li>
<li> <a href="#9">Google Chrome 9</a> </li>
<li> <a href="#8">Google Chrome 8</a> </li>
<li> <a href="#7">Google Chrome 7</a> </li>
@@ -14,6 +15,29 @@ made in recent releases.
</ul>
+<h2 id="10"> Google Chrome 10 </h2>
+
+<h4> Manifest changes </h4>
+ <ul>
+ <li>The new <a href="manifest.html#bg">background</a> permission
+ extends the life of Chrome,
+ allowing your extension or app
+ to run even when Chrome has no windows open.
+ </li>
+ </ul>
+
+<h4> Additions to existing APIs </h4>
+ <ul>
+ <li> The <a href="windows.html#method-create">chrome.windows.create()</a>
+ method now has a <code>tabId</code> parameter.
+ You can use it to move a tab or panel into a new window.
+ <p class="note">
+ <b>Note:</b>
+ This change was incorrectly attributed to Chrome 9
+ in previous versions of this page.
+ </li>
+ </ul>
+
<h2 id="9"> Google Chrome 9 </h2>
<h4> New APIs </h4>
@@ -40,11 +64,8 @@ made in recent releases.
you can <a href="tabs.html#method-create">create</a>
a pinned tab. </li>
<li> The <a href="windows.html#method-create">chrome.windows.create()</a>
- method's first parameter can now be an array of strings,
- letting you create an array of tabs. </li>
- <li> The <a href="windows.html#method-create">chrome.windows.create()</a>
- method now has a <code>tabId</code> parameter.
- You can use it to move a tab or panel into a new window. </li>
+ method can now take a list of URLs,
+ letting you create multiple tabs in the new window. </li>
<li> The new
<a href="management.html#method-get">chrome.management.get()</a> method
lets you get information about the specified extension or app. </li>
diff --git a/chrome/common/extensions/docs/whats_new.html b/chrome/common/extensions/docs/whats_new.html
index 31f2485..ac4b0f6 100644
--- a/chrome/common/extensions/docs/whats_new.html
+++ b/chrome/common/extensions/docs/whats_new.html
@@ -321,6 +321,7 @@ made in recent releases.
</p>
<ul>
+ <li> <a href="#10">Google Chrome 10</a> </li>
<li> <a href="#9">Google Chrome 9</a> </li>
<li> <a href="#8">Google Chrome 8</a> </li>
<li> <a href="#7">Google Chrome 7</a> </li>
@@ -328,6 +329,29 @@ made in recent releases.
</ul>
+<h2 id="10"> Google Chrome 10 </h2>
+
+<h4> Manifest changes </h4>
+ <ul>
+ <li>The new <a href="manifest.html#bg">background</a> permission
+ extends the life of Chrome,
+ allowing your extension or app
+ to run even when Chrome has no windows open.
+ </li>
+ </ul>
+
+<h4> Additions to existing APIs </h4>
+ <ul>
+ <li> The <a href="windows.html#method-create">chrome.windows.create()</a>
+ method now has a <code>tabId</code> parameter.
+ You can use it to move a tab or panel into a new window.
+ <p class="note">
+ <b>Note:</b>
+ This change was incorrectly attributed to Chrome 9
+ in previous versions of this page.
+ </p></li>
+ </ul>
+
<h2 id="9"> Google Chrome 9 </h2>
<h4> New APIs </h4>
@@ -354,11 +378,8 @@ made in recent releases.
you can <a href="tabs.html#method-create">create</a>
a pinned tab. </li>
<li> The <a href="windows.html#method-create">chrome.windows.create()</a>
- method's first parameter can now be an array of strings,
- letting you create an array of tabs. </li>
- <li> The <a href="windows.html#method-create">chrome.windows.create()</a>
- method now has a <code>tabId</code> parameter.
- You can use it to move a tab or panel into a new window. </li>
+ method can now take a list of URLs,
+ letting you create multiple tabs in the new window. </li>
<li> The new
<a href="management.html#method-get">chrome.management.get()</a> method
lets you get information about the specified extension or app. </li>
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index fb96f92..ce77fa3 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -201,8 +201,9 @@ const int Extension::kSidebarIconMaxSize = 16;
// Explicit permissions -- permission declaration required.
const char Extension::kBackgroundPermission[] = "background";
-const char Extension::kContextMenusPermission[] = "contextMenus";
const char Extension::kBookmarkPermission[] = "bookmarks";
+const char Extension::kContextMenusPermission[] = "contextMenus";
+const char Extension::kContentSettingsPermission[] = "contentSettings";
const char Extension::kCookiePermission[] = "cookies";
const char Extension::kExperimentalPermission[] = "experimental";
const char Extension::kGeolocationPermission[] = "geolocation";
@@ -221,6 +222,7 @@ const char Extension::kWebstorePrivatePermission[] = "webstorePrivate";
const Extension::Permission Extension::kPermissions[] = {
{ kBackgroundPermission, 0 },
{ kBookmarkPermission, IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS },
+ { kContentSettingsPermission, 0 },
{ kContextMenusPermission, 0 },
{ kCookiePermission, 0 },
{ kExperimentalPermission, 0 },
@@ -266,9 +268,11 @@ scoped_refptr<Extension> Extension::Create(const FilePath& path,
Location location,
const DictionaryValue& value,
bool require_key,
+ bool strict_error_checks,
std::string* error) {
scoped_refptr<Extension> extension = new Extension(path, location);
- if (!extension->InitFromValue(value, require_key, error))
+
+ if (!extension->InitFromValue(value, require_key, strict_error_checks, error))
return NULL;
return extension;
}
@@ -347,7 +351,7 @@ bool Extension::IsElevatedHostList(
old_hosts_set.begin(), old_hosts_set.end(),
std::inserter(new_hosts_only, new_hosts_only.begin()));
- return new_hosts_only.size() > 0;
+ return !new_hosts_only.empty();
}
// static
@@ -513,7 +517,9 @@ bool Extension::GenerateId(const std::string& input, std::string* output) {
// Helper method that loads a UserScript object from a dictionary in the
// content_script list of the manifest.
bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script,
- int definition_index, std::string* error,
+ int definition_index,
+ URLPattern::ParseOption parse_strictness,
+ std::string* error,
UserScript* result) {
// run_at
if (content_script->HasKey(keys::kRunAt)) {
@@ -564,8 +570,11 @@ bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script,
for (size_t j = 0; j < matches->GetSize(); ++j) {
std::string match_str;
if (!matches->GetString(j, &match_str)) {
- *error = ExtensionErrorUtils::FormatErrorMessage(errors::kInvalidMatch,
- base::IntToString(definition_index), base::IntToString(j));
+ *error = ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidMatch,
+ base::IntToString(definition_index),
+ base::IntToString(j),
+ errors::kExpectString);
return false;
}
@@ -573,9 +582,14 @@ bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script,
if (CanExecuteScriptEverywhere())
pattern.set_valid_schemes(URLPattern::SCHEME_ALL);
- if (URLPattern::PARSE_SUCCESS != pattern.Parse(match_str)) {
- *error = ExtensionErrorUtils::FormatErrorMessage(errors::kInvalidMatch,
- base::IntToString(definition_index), base::IntToString(j));
+ URLPattern::ParseResult parse_result = pattern.Parse(match_str,
+ parse_strictness);
+ if (parse_result != URLPattern::PARSE_SUCCESS) {
+ *error = ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidMatch,
+ base::IntToString(definition_index),
+ base::IntToString(j),
+ URLPattern::GetParseResultString(parse_result));
return false;
}
@@ -876,6 +890,7 @@ bool Extension::LoadExtent(const DictionaryValue* manifest,
ExtensionExtent* extent,
const char* list_error,
const char* value_error,
+ URLPattern::ParseOption parse_strictness,
std::string* error) {
Value* temp = NULL;
if (!manifest->Get(key, &temp))
@@ -891,37 +906,55 @@ bool Extension::LoadExtent(const DictionaryValue* manifest,
std::string pattern_string;
if (!pattern_list->GetString(i, &pattern_string)) {
*error = ExtensionErrorUtils::FormatErrorMessage(value_error,
- base::UintToString(i));
+ base::UintToString(i),
+ errors::kExpectString);
return false;
}
URLPattern pattern(kValidWebExtentSchemes);
- URLPattern::ParseResult result = pattern.Parse(pattern_string);
- if (result == URLPattern::PARSE_ERROR_EMPTY_PATH) {
+ URLPattern::ParseResult parse_result = pattern.Parse(pattern_string,
+ parse_strictness);
+ if (parse_result == URLPattern::PARSE_ERROR_EMPTY_PATH) {
pattern_string += "/";
- result = pattern.Parse(pattern_string);
+ parse_result = pattern.Parse(pattern_string, parse_strictness);
}
- if (URLPattern::PARSE_SUCCESS != result) {
- *error = ExtensionErrorUtils::FormatErrorMessage(value_error,
- base::UintToString(i));
+
+ if (parse_result != URLPattern::PARSE_SUCCESS) {
+ *error = ExtensionErrorUtils::FormatErrorMessage(
+ value_error,
+ base::UintToString(i),
+ URLPattern::GetParseResultString(parse_result));
return false;
}
- // Do not allow authors to claim "<all_urls>". That would make no sense.
+ // Do not allow authors to claim "<all_urls>".
if (pattern.match_all_urls()) {
- *error = ExtensionErrorUtils::FormatErrorMessage(value_error,
- base::UintToString(i));
+ *error = ExtensionErrorUtils::FormatErrorMessage(
+ value_error,
+ base::UintToString(i),
+ errors::kCannotClaimAllURLsInExtent);
+ return false;
+ }
+
+ // Do not allow authors to claim "*" for host.
+ if (pattern.host().empty()) {
+ *error = ExtensionErrorUtils::FormatErrorMessage(
+ value_error,
+ base::UintToString(i),
+ errors::kCannotClaimAllHostsInExtent);
return false;
}
// We do not allow authors to put wildcards in their paths. Instead, we
// imply one at the end.
if (pattern.path().find('*') != std::string::npos) {
- *error = ExtensionErrorUtils::FormatErrorMessage(value_error,
- base::UintToString(i));
+ *error = ExtensionErrorUtils::FormatErrorMessage(
+ value_error,
+ base::UintToString(i),
+ errors::kNoWildCardsInPaths);
return false;
}
- pattern.set_path(pattern.path() + '*');
+ pattern.SetPath(pattern.path() + '*');
extent->AddPattern(pattern);
}
@@ -983,7 +1016,7 @@ bool Extension::LoadLaunchURL(const DictionaryValue* manifest,
return false;
}
pattern.set_host(launch_url.host());
- pattern.set_path("/*");
+ pattern.SetPath("/*");
extent_.AddPattern(pattern);
}
@@ -991,15 +1024,32 @@ bool Extension::LoadLaunchURL(const DictionaryValue* manifest,
// process isolation, we must insert any provided value into the component
// app's launch url and web extent.
if (id() == extension_misc::kWebStoreAppId) {
- GURL gallery_url(CommandLine::ForCurrentProcess()->
- GetSwitchValueASCII(switches::kAppsGalleryURL));
- if (gallery_url.is_valid()) {
- launch_web_url_ = gallery_url.spec();
+ std::string gallery_url_str = CommandLine::ForCurrentProcess()->
+ GetSwitchValueASCII(switches::kAppsGalleryURL);
+
+ // Empty string means option was not used.
+ if (!gallery_url_str.empty()) {
+ GURL gallery_url(gallery_url_str);
+ if (!gallery_url.is_valid()) {
+ LOG(WARNING) << "Invalid url given in switch "
+ << switches::kAppsGalleryURL;
+ } else {
+ if (gallery_url.has_port()) {
+ LOG(WARNING) << "URLs passed to switch " << switches::kAppsGalleryURL
+ << " should not contain a port. Removing it.";
- URLPattern pattern(URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS);
- pattern.Parse(gallery_url.spec());
- pattern.set_path(pattern.path() + '*');
- extent_.AddPattern(pattern);
+ GURL::Replacements remove_port;
+ remove_port.ClearPort();
+ gallery_url = gallery_url.ReplaceComponents(remove_port);
+ }
+
+ launch_web_url_ = gallery_url.spec();
+
+ URLPattern pattern(kValidWebExtentSchemes);
+ pattern.Parse(gallery_url.spec(), URLPattern::PARSE_STRICT);
+ pattern.SetPath(pattern.path() + '*');
+ extent_.AddPattern(pattern);
+ }
}
}
@@ -1276,7 +1326,12 @@ GURL Extension::GetBaseURLFromExtensionId(const std::string& extension_id) {
}
bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
- std::string* error) {
+ bool strict_error_checks, std::string* error) {
+ // When strict error checks are enabled, make URL pattern parsing strict.
+ URLPattern::ParseOption parse_strictness =
+ (strict_error_checks ? URLPattern::PARSE_STRICT
+ : URLPattern::PARSE_LENIENT);
+
if (source.HasKey(keys::kPublicKey)) {
std::string public_key_bytes;
if (!source.GetString(keys::kPublicKey,
@@ -1305,8 +1360,7 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
manifest_value_.reset(source.DeepCopy());
// Initialize the URL.
- extension_url_ =
- Extension::GetBaseURLFromExtensionId(id());
+ extension_url_ = Extension::GetBaseURLFromExtensionId(id());
// Initialize version.
std::string version_str;
@@ -1433,7 +1487,7 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
return false;
}
- if (icon_path.size() > 0 && icon_path[0] == '/')
+ if (!icon_path.empty() && icon_path[0] == '/')
icon_path = icon_path.substr(1);
if (icon_path.empty()) {
@@ -1645,7 +1699,8 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
}
UserScript script;
- if (!LoadUserScriptHelper(content_script, i, error, &script))
+ if (!LoadUserScriptHelper(content_script, i, parse_strictness, error,
+ &script))
return false; // Failed to parse script context definition.
script.set_extension_id(id());
if (converted_from_user_script_) {
@@ -1713,7 +1768,8 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
if (!LoadIsApp(manifest_value_.get(), error) ||
!LoadExtent(manifest_value_.get(), keys::kWebURLs,
&extent_,
- errors::kInvalidWebURLs, errors::kInvalidWebURL, error) ||
+ errors::kInvalidWebURLs, errors::kInvalidWebURL,
+ parse_strictness, error) ||
!EnsureNotHybridApp(manifest_value_.get(), error) ||
!LoadLaunchURL(manifest_value_.get(), error) ||
!LoadLaunchContainer(manifest_value_.get(), error)) {
@@ -1809,8 +1865,9 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
URLPattern pattern = URLPattern(CanExecuteScriptEverywhere() ?
URLPattern::SCHEME_ALL : kValidHostPermissionSchemes);
-
- if (URLPattern::PARSE_SUCCESS == pattern.Parse(permission_str)) {
+ URLPattern::ParseResult parse_result = pattern.Parse(permission_str,
+ parse_strictness);
+ if (parse_result == URLPattern::PARSE_SUCCESS) {
if (!CanSpecifyHostPermission(pattern)) {
*error = ExtensionErrorUtils::FormatErrorMessage(
errors::kInvalidPermissionScheme, base::IntToString(i));
@@ -1819,7 +1876,7 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
// The path component is not used for host permissions, so we force it
// to match all paths.
- pattern.set_path("/*");
+ pattern.SetPath("/*");
host_permissions_.push_back(pattern);
}
@@ -1829,6 +1886,10 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
// backwards compatability (http://crbug.com/42742).
// TODO(jstritar): We can improve error messages by adding better
// validation of API permissions here.
+ // TODO(skerner): Consider showing the reason |permission_str| is not
+ // a valid URL pattern if it is almost valid. For example, if it has
+ // a valid scheme, and failed to parse because it has a port, show an
+ // error.
}
}
@@ -2318,7 +2379,7 @@ bool Extension::HasEffectiveAccessToAllHosts() const {
}
bool Extension::HasFullPermissions() const {
- return plugins().size() > 0;
+ return !plugins().empty();
}
bool Extension::ShowConfigureContextMenus() const {
@@ -2355,11 +2416,43 @@ bool Extension::CanExecuteScriptEverywhere() const {
return false;
}
+bool Extension::CanCaptureVisiblePage(const GURL& page_url,
+ std::string *error) const {
+ if (HasHostPermission(page_url) || page_url.GetOrigin() == url())
+ return true;
+
+ if (error) {
+ *error = ExtensionErrorUtils::FormatErrorMessage(errors::kCannotAccessPage,
+ page_url.spec());
+ }
+ return false;
+}
+
bool Extension::UpdatesFromGallery() const {
return update_url() == GalleryUpdateUrl(false) ||
update_url() == GalleryUpdateUrl(true);
}
+bool Extension::OverlapsWithOrigin(const GURL& origin) const {
+ if (url() == origin)
+ return true;
+
+ if (web_extent().is_empty())
+ return false;
+
+ // Note: patterns and extents ignore port numbers.
+ URLPattern origin_only_pattern(kValidWebExtentSchemes);
+ if (!origin_only_pattern.SetScheme(origin.scheme()))
+ return false;
+ origin_only_pattern.set_host(origin.host());
+ origin_only_pattern.SetPath("/*");
+
+ ExtensionExtent origin_only_pattern_list;
+ origin_only_pattern_list.AddPattern(origin_only_pattern);
+
+ return web_extent().OverlapsWith(origin_only_pattern_list);
+}
+
ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest,
const std::string& id,
const FilePath& path,
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 0edb6e2..49850aa 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -114,10 +114,21 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
const int message_id;
};
+ // |strict_error_checks| enables extra error checking, such as
+ // checks that URL patterns do not contain ports. This error
+ // checking may find an error that a previous version of
+ // chrome did not flag. To avoid errors in installed extensions
+ // when chrome is upgraded, strict error checking is only enabled
+ // when loading extensions as a developer would (such as loading
+ // an unpacked extension), or when loading an extension that is
+ // tied to a specific version of chrome (such as a component
+ // extension). Most callers will set |strict_error_checks| to
+ // Extension::ShouldDoStrictErrorChecking(location).
static scoped_refptr<Extension> Create(const FilePath& path,
Location location,
const DictionaryValue& value,
bool require_key,
+ bool strict_error_checks,
std::string* error);
// Return the update url used by gallery/webstore extensions.
@@ -160,6 +171,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Extension::kPermissions.
static const char kBackgroundPermission[];
static const char kBookmarkPermission[];
+ static const char kContentSettingsPermission[];
static const char kContextMenusPermission[];
static const char kCookiePermission[];
static const char kExperimentalPermission[];
@@ -235,6 +247,17 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
IsExternalLocation(location);
}
+ // Whether extensions with |location| should be loaded with strict
+ // error checking. Strict error checks may flag errors older versions
+ // of chrome did not detect. To avoid breaking installed extensions,
+ // strict checks are disabled unless the location indicates that the
+ // developer is loading the extension, or the extension is a component
+ // of chrome.
+ static inline bool ShouldDoStrictErrorChecking(Location location) {
+ return location == Extension::LOAD ||
+ location == Extension::COMPONENT;
+ }
+
// See Type definition above.
Type GetType() const;
@@ -398,10 +421,19 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// on the whitelist of extensions that can script all pages.
bool CanExecuteScriptEverywhere() const;
+ // Returns true if this extension is allowed to obtain the contents of a
+ // page as an image. Since a page may contain sensitive information, this
+ // is restricted to the extension's host permissions as well as the
+ // extension page itself.
+ bool CanCaptureVisiblePage(const GURL& page_url, std::string* error) const;
+
// Returns true if this extension updates itself using the extension
// gallery.
bool UpdatesFromGallery() const;
+ // Returns true if this extension or app includes areas within |origin|.
+ bool OverlapsWithOrigin(const GURL& origin) const;
+
// Accessors:
const FilePath& path() const { return path_; }
@@ -503,7 +535,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// its manifest, but if |require_key| is |false|, a temporary ID will be
// generated based on the path.
bool InitFromValue(const DictionaryValue& value, bool require_key,
- std::string* error);
+ bool strict_error_checks, std::string* error);
// Helper function for implementing HasCachedImage/GetCachedImage. A return
// value of NULL means there is no matching image cached (we allow caching an
@@ -515,6 +547,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// dictionary in the content_script list of the manifest.
bool LoadUserScriptHelper(const DictionaryValue* content_script,
int definition_index,
+ URLPattern::ParseOption parse_strictness,
std::string* error,
UserScript* result);
@@ -529,9 +562,13 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Helpers to load various chunks of the manifest.
bool LoadIsApp(const DictionaryValue* manifest, std::string* error);
- bool LoadExtent(const DictionaryValue* manifest, const char* key,
- ExtensionExtent* extent, const char* list_error,
- const char* value_error, std::string* error);
+ bool LoadExtent(const DictionaryValue* manifest,
+ const char* key,
+ ExtensionExtent* extent,
+ const char* list_error,
+ const char* value_error,
+ URLPattern::ParseOption parse_strictness,
+ std::string* error);
bool LoadLaunchContainer(const DictionaryValue* manifest, std::string* error);
bool LoadLaunchURL(const DictionaryValue* manifest, std::string* error);
bool EnsureNotHybridApp(const DictionaryValue* manifest, std::string* error);
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
index dbde37b..96fd349 100644
--- a/chrome/common/extensions/extension_constants.cc
+++ b/chrome/common/extensions/extension_constants.cc
@@ -100,6 +100,10 @@ const char* kAppsNotEnabled =
const char* kCannotAccessPage =
"Cannot access contents of url \"*\". "
"Extension manifest must request permission to access this host.";
+const char* kCannotClaimAllHostsInExtent =
+ "Cannot claim all hosts ('*') in an extent.";
+const char* kCannotClaimAllURLsInExtent =
+ "Cannot claim all URLs in an extent.";
const char* kCannotScriptGallery =
"The extensions gallery cannot be scripted.";
const char* kChromeVersionTooLow =
@@ -109,6 +113,7 @@ const char* kDisabledByPolicy =
const char* kDevToolsExperimental =
"You must request the 'experimental' permission in order to use the"
" DevTools API.";
+const char* kExpectString = "Expect string value.";
const char* kExperimentalFlagRequired =
"Loading extensions with 'experimental' permission requires"
" --enable-experimental-extension-apis command line flag.";
@@ -171,7 +176,7 @@ const char* kInvalidLaunchWidthContainer =
const char* kInvalidManifest =
"Manifest file is invalid.";
const char* kInvalidMatch =
- "Invalid value for 'content_scripts[*].matches[*]'.";
+ "Invalid value for 'content_scripts[*].matches[*]': *";
const char* kInvalidMatchCount =
"Invalid value for 'content_scripts[*].matches'. There must be at least"
"one match specified.";
@@ -269,7 +274,7 @@ const char* kInvalidVersion =
"Required value 'version' is missing or invalid. It must be between 1-4 "
"dot-separated integers each between 0 and 65536.";
const char* kInvalidWebURL =
- "Invalid value for 'app.urls[*]'.";
+ "Invalid value for 'app.urls[*]': *";
const char* kInvalidWebURLs =
"Invalid value for 'app.urls'.";
const char* kInvalidZipHash =
@@ -296,6 +301,8 @@ const char* kMissingFile =
"At least one js or css file is required for 'content_scripts[*]'.";
const char* kMultipleOverrides =
"An extension cannot override more than one page.";
+const char* kNoWildCardsInPaths =
+ "Wildcards are not allowed in extent URL pattern paths.";
const char* kOneUISurfaceOnly =
"Only one of 'browser_action', 'page_action', and 'app' can be specified.";
const char* kReservedMessageFound =
@@ -332,6 +339,7 @@ namespace extension_misc {
const char* kBookmarkManagerId = "eemcgdkfndhakfknompkggombfjjjeno";
const char* kWebStoreAppId = "ahfgeienlihckogmohjhadlkjgocpleb";
const char* kAppsPromoHistogram = "Extensions.AppsPromo";
+const char* kAppLaunchHistogram = "Extensions.AppLaunch";
#if defined(OS_CHROMEOS)
const char* kAccessExtensionPath =
"/usr/share/chromeos-assets/accessibility/extensions";
diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h
index 6d91451..bad2a5b 100644
--- a/chrome/common/extensions/extension_constants.h
+++ b/chrome/common/extensions/extension_constants.h
@@ -100,11 +100,14 @@ namespace extension_manifest_values {
namespace extension_manifest_errors {
extern const char* kAppsNotEnabled;
extern const char* kCannotAccessPage;
+ extern const char* kCannotClaimAllHostsInExtent;
+ extern const char* kCannotClaimAllURLsInExtent;
extern const char* kCannotScriptGallery;
extern const char* kChromeVersionTooLow;
extern const char* kDevToolsExperimental;
extern const char* kDisabledByPolicy;
extern const char* kExperimentalFlagRequired;
+ extern const char* kExpectString;
extern const char* kHostedAppsCannotIncludeExtensionFeatures;
extern const char* kInvalidAllFrames;
extern const char* kInvalidBackground;
@@ -197,6 +200,7 @@ namespace extension_manifest_errors {
extern const char* kManifestUnreadable;
extern const char* kMissingFile;
extern const char* kMultipleOverrides;
+ extern const char* kNoWildCardsInPaths;
extern const char* kOneUISurfaceOnly;
extern const char* kReservedMessageFound;
extern const char* kSidebarExperimental;
@@ -269,6 +273,66 @@ namespace extension_misc {
PROMO_BUCKET_BOUNDARY
};
+ // The name of the app launch histogram.
+ extern const char* kAppLaunchHistogram;
+
+ // The buckets used for app launches.
+ enum AppLaunchBucket {
+ // Launch from NTP apps section while maximized.
+ APP_LAUNCH_NTP_APPS_MAXIMIZED,
+
+ // Launch from NTP apps section while collapsed.
+ APP_LAUNCH_NTP_APPS_COLLAPSED,
+
+ // Launch from NTP apps section while in menu mode.
+ APP_LAUNCH_NTP_APPS_MENU,
+
+ // Launch from NTP most visited section in any mode.
+ APP_LAUNCH_NTP_MOST_VISITED,
+
+ // Launch from NTP recently closed section in any mode.
+ APP_LAUNCH_NTP_RECENTLY_CLOSED,
+
+ // App link clicked from bookmark bar.
+ APP_LAUNCH_BOOKMARK_BAR,
+
+ // Nvigated to an app from within a web page (like by clicking a link).
+ APP_LAUNCH_CONTENT_NAVIGATION,
+
+ // Launch from session restore.
+ APP_LAUNCH_SESSION_RESTORE,
+
+ // Autolaunched at startup, like for pinned tabs.
+ APP_LAUNCH_AUTOLAUNCH,
+
+ // Launched from omnibox app links (not implemented yet).
+ APP_LAUNCH_OMNIBOX_APP,
+
+ // App URL typed directly into the omnibox (w/ instant turned off).
+ APP_LAUNCH_OMNIBOX_LOCATION,
+
+ // Navigate to an app URL via instant.
+ APP_LAUNCH_OMNIBOX_INSTANT,
+
+ // Launch via chrome.management.launchApp.
+ APP_LAUNCH_EXTENSION_API,
+
+ // Launch using the --app or --app-id cmd line options.
+ APP_LAUNCH_CMD_LINE_APP,
+
+ // App launch by passing the URL on the cmd line (not using app switches).
+ APP_LAUNCH_CMD_LINE_URL,
+
+ // User clicked web store launcher on NTP.
+ APP_LAUNCH_NTP_WEBSTORE,
+
+ // App launched after the user re-enabled it on the NTP.
+ APP_LAUNCH_NTP_APP_RE_ENABLE,
+
+ APP_LAUNCH_BUCKET_BOUNDARY,
+ APP_LAUNCH_BUCKET_INVALID
+ };
+
#if defined(OS_CHROMEOS)
// The directory path on a ChromeOS device where accessibility extensions are
// stored.
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 7aef372..6e9a4eb 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -89,6 +89,7 @@ void UninstallExtension(const FilePath& extensions_dir,
scoped_refptr<Extension> LoadExtension(const FilePath& extension_path,
Extension::Location location,
bool require_key,
+ bool strict_error_checks,
std::string* error) {
FilePath manifest_path =
extension_path.Append(Extension::kManifestFilename);
@@ -124,7 +125,12 @@ scoped_refptr<Extension> LoadExtension(const FilePath& extension_path,
return NULL;
scoped_refptr<Extension> extension(Extension::Create(
- extension_path, location, *manifest, require_key, error));
+ extension_path,
+ location,
+ *manifest,
+ require_key,
+ strict_error_checks,
+ error));
if (!extension.get())
return NULL;
@@ -609,4 +615,8 @@ FilePath GetUserDataTempDir() {
return FilePath();
}
+void DeleteFile(const FilePath& path, bool recursive) {
+ file_util::Delete(path, recursive);
+}
+
} // namespace extension_file_util
diff --git a/chrome/common/extensions/extension_file_util.h b/chrome/common/extensions/extension_file_util.h
index b26b564..066ee80 100644
--- a/chrome/common/extensions/extension_file_util.h
+++ b/chrome/common/extensions/extension_file_util.h
@@ -40,6 +40,7 @@ void UninstallExtension(const FilePath& extensions_dir,
scoped_refptr<Extension> LoadExtension(const FilePath& extension_root,
Extension::Location location,
bool require_key,
+ bool strict_error_checks,
std::string* error);
// Returns true if the given extension object is valid and consistent.
@@ -82,6 +83,11 @@ FilePath ExtensionURLToRelativeFilePath(const GURL& url);
// Return an empty file path on failure.
FilePath GetUserDataTempDir();
+// Helper function to delete files. This is used to avoid ugly casts which
+// would be necessary with PostMessage since file_util::Delete is overloaded.
+// TODO(skerner): Make a version of Delete that is not overloaded in file_util.
+void DeleteFile(const FilePath& path, bool recursive);
+
} // namespace extension_file_util
#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_
diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc
index 3f59da6..d3cabff 100644
--- a/chrome/common/extensions/extension_file_util_unittest.cc
+++ b/chrome/common/extensions/extension_file_util_unittest.cc
@@ -79,7 +79,7 @@ TEST(ExtensionFileUtil, LoadExtensionWithValidLocales) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
- install_dir, Extension::LOAD, false, &error));
+ install_dir, Extension::LOAD, false, true, &error));
ASSERT_TRUE(extension != NULL);
EXPECT_EQ("The first extension that I made.", extension->description());
}
@@ -95,7 +95,7 @@ TEST(ExtensionFileUtil, LoadExtensionWithoutLocalesFolder) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
- install_dir, Extension::LOAD, false, &error));
+ install_dir, Extension::LOAD, false, true, &error));
ASSERT_FALSE(extension == NULL);
EXPECT_TRUE(error.empty());
}
@@ -153,7 +153,7 @@ TEST(ExtensionFileUtil, LoadExtensionGivesHelpfullErrorOnMissingManifest) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
- install_dir, Extension::LOAD, false, &error));
+ install_dir, Extension::LOAD, false, true, &error));
ASSERT_TRUE(extension == NULL);
ASSERT_FALSE(error.empty());
ASSERT_STREQ("Manifest file is missing or unreadable.", error.c_str());
@@ -170,7 +170,7 @@ TEST(ExtensionFileUtil, LoadExtensionGivesHelpfullErrorOnBadManifest) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
- install_dir, Extension::LOAD, false, &error));
+ install_dir, Extension::LOAD, false, true, &error));
ASSERT_TRUE(extension == NULL);
ASSERT_FALSE(error.empty());
ASSERT_STREQ("Manifest is not valid JSON. "
@@ -186,7 +186,7 @@ TEST(ExtensionFileUtil, FailLoadingNonUTF8Scripts) {
std::string error;
scoped_refptr<Extension> extension(extension_file_util::LoadExtension(
- install_dir, Extension::LOAD, false, &error));
+ install_dir, Extension::LOAD, false, true, &error));
ASSERT_TRUE(extension == NULL);
ASSERT_STREQ("Could not load file 'bad_encoding.js' for content script. "
"It isn't UTF-8 encoded.", error.c_str());
diff --git a/chrome/common/extensions/extension_icon_set.cc b/chrome/common/extensions/extension_icon_set.cc
index fc1ac58..9b47c7d 100644
--- a/chrome/common/extensions/extension_icon_set.cc
+++ b/chrome/common/extensions/extension_icon_set.cc
@@ -15,7 +15,7 @@ void ExtensionIconSet::Clear() {
}
void ExtensionIconSet::Add(int size, const std::string& path) {
- CHECK(path.size() > 0 && path[0] != '/');
+ CHECK(!path.empty() && path[0] != '/');
map_[size] = path;
}
diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc
index dff8f5e..0874046 100644
--- a/chrome/common/extensions/extension_l10n_util.cc
+++ b/chrome/common/extensions/extension_l10n_util.cc
@@ -199,8 +199,11 @@ bool GetValidLocales(const FilePath& locale_path,
file_util::FileEnumerator::DIRECTORIES);
FilePath locale_folder;
while (!(locale_folder = locales.Next()).empty()) {
- std::string locale_name =
- WideToASCII(locale_folder.BaseName().ToWStringHack());
+ std::string locale_name = locale_folder.BaseName().MaybeAsASCII();
+ if (locale_name.empty()) {
+ NOTREACHED();
+ continue; // Not ASCII.
+ }
if (!AddLocale(chrome_locales,
locale_folder,
locale_name,
@@ -277,13 +280,18 @@ bool ShouldSkipValidation(const FilePath& locales_path,
// skipping any strings with '.'. This happens sometimes, for example with
// '.svn' directories.
FilePath relative_path;
- if (!locales_path.AppendRelativePath(locale_path, &relative_path))
+ if (!locales_path.AppendRelativePath(locale_path, &relative_path)) {
NOTREACHED();
- std::wstring subdir(relative_path.ToWStringHack());
- if (std::find(subdir.begin(), subdir.end(), L'.') != subdir.end())
+ return true;
+ }
+ std::string subdir = relative_path.MaybeAsASCII();
+ if (subdir.empty())
+ return true; // Non-ASCII.
+
+ if (std::find(subdir.begin(), subdir.end(), '.') != subdir.end())
return true;
- if (all_locales.find(WideToASCII(subdir)) == all_locales.end())
+ if (all_locales.find(subdir) == all_locales.end())
return true;
return false;
diff --git a/chrome/common/extensions/extension_localization_peer.cc b/chrome/common/extensions/extension_localization_peer.cc
index a01b601..f76ba38 100644
--- a/chrome/common/extensions/extension_localization_peer.cc
+++ b/chrome/common/extensions/extension_localization_peer.cc
@@ -10,7 +10,6 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
-#include "grit/renderer_resources.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
#include "webkit/glue/webkit_glue.h"
@@ -56,8 +55,7 @@ bool ExtensionLocalizationPeer::OnReceivedRedirect(
}
void ExtensionLocalizationPeer::OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered) {
+ const webkit_glue::ResourceResponseInfo& info) {
response_info_ = info;
}
@@ -75,7 +73,7 @@ void ExtensionLocalizationPeer::OnCompletedRequest(
// Give sub-classes a chance at altering the data.
if (status.status() != net::URLRequestStatus::SUCCESS) {
// We failed to load the resource.
- original_peer_->OnReceivedResponse(response_info_, true);
+ original_peer_->OnReceivedResponse(response_info_);
net::URLRequestStatus status(net::URLRequestStatus::CANCELED,
net::ERR_ABORTED);
original_peer_->OnCompletedRequest(status, security_info, completion_time);
@@ -84,7 +82,7 @@ void ExtensionLocalizationPeer::OnCompletedRequest(
ReplaceMessages();
- original_peer_->OnReceivedResponse(response_info_, true);
+ original_peer_->OnReceivedResponse(response_info_);
if (!data_.empty())
original_peer_->OnReceivedData(data_.data(),
static_cast<int>(data_.size()));
diff --git a/chrome/common/extensions/extension_localization_peer.h b/chrome/common/extensions/extension_localization_peer.h
index 49881f2..c633933 100644
--- a/chrome/common/extensions/extension_localization_peer.h
+++ b/chrome/common/extensions/extension_localization_peer.h
@@ -37,8 +37,7 @@ class ExtensionLocalizationPeer
bool* has_new_first_party_for_cookies,
GURL* new_first_party_for_cookies);
virtual void OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered);
+ const webkit_glue::ResourceResponseInfo& info);
virtual void OnDownloadedData(int len) {}
virtual void OnReceivedData(const char* data, int len);
virtual void OnCompletedRequest(const net::URLRequestStatus& status,
diff --git a/chrome/common/extensions/extension_localization_peer_unittest.cc b/chrome/common/extensions/extension_localization_peer_unittest.cc
index 87cea6b..a0205d5 100644
--- a/chrome/common/extensions/extension_localization_peer_unittest.cc
+++ b/chrome/common/extensions/extension_localization_peer_unittest.cc
@@ -63,9 +63,8 @@ class MockResourceLoaderBridgePeer
const webkit_glue::ResourceResponseInfo& info,
bool* has_new_first_party_for_cookies,
GURL* new_first_party_for_cookies));
- MOCK_METHOD2(OnReceivedResponse, void(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered));
+ MOCK_METHOD1(OnReceivedResponse, void(
+ const webkit_glue::ResourceResponseInfo& info));
MOCK_METHOD1(OnDownloadedData, void(int len));
MOCK_METHOD2(OnReceivedData, void(const char* data, int len));
MOCK_METHOD3(OnCompletedRequest, void(
@@ -139,7 +138,7 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestBadURLRequestStatus) {
// It will self-delete once it exits OnCompletedRequest.
ExtensionLocalizationPeer* filter_peer = filter_peer_.release();
- EXPECT_CALL(*original_peer_, OnReceivedResponse(_, true));
+ EXPECT_CALL(*original_peer_, OnReceivedResponse(_));
EXPECT_CALL(*original_peer_, OnCompletedRequest(
IsURLRequestEqual(net::URLRequestStatus::CANCELED), "", base::Time()));
@@ -155,7 +154,7 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestEmptyData) {
EXPECT_CALL(*original_peer_, OnReceivedData(_, _)).Times(0);
EXPECT_CALL(*sender_, Send(_)).Times(0);
- EXPECT_CALL(*original_peer_, OnReceivedResponse(_, true));
+ EXPECT_CALL(*original_peer_, OnReceivedResponse(_));
EXPECT_CALL(*original_peer_, OnCompletedRequest(
IsURLRequestEqual(net::URLRequestStatus::SUCCESS), "", base::Time()));
@@ -176,7 +175,7 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestNoCatalogs) {
EXPECT_CALL(*original_peer_,
OnReceivedData(StrEq(data.data()), data.length())).Times(2);
- EXPECT_CALL(*original_peer_, OnReceivedResponse(_, true)).Times(2);
+ EXPECT_CALL(*original_peer_, OnReceivedResponse(_)).Times(2);
EXPECT_CALL(*original_peer_, OnCompletedRequest(
IsURLRequestEqual(
net::URLRequestStatus::SUCCESS), "", base::Time())).Times(2);
@@ -214,7 +213,7 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestWithCatalogs) {
EXPECT_CALL(*original_peer_,
OnReceivedData(StrEq(data.data()), data.length()));
- EXPECT_CALL(*original_peer_, OnReceivedResponse(_, true));
+ EXPECT_CALL(*original_peer_, OnReceivedResponse(_));
EXPECT_CALL(*original_peer_, OnCompletedRequest(
IsURLRequestEqual(net::URLRequestStatus::SUCCESS), "", base::Time()));
@@ -244,7 +243,7 @@ TEST_F(ExtensionLocalizationPeerTest, OnCompletedRequestReplaceMessagesFails) {
EXPECT_CALL(*original_peer_,
OnReceivedData(StrEq(message.data()), message.length()));
- EXPECT_CALL(*original_peer_, OnReceivedResponse(_, true));
+ EXPECT_CALL(*original_peer_, OnReceivedResponse(_));
EXPECT_CALL(*original_peer_, OnCompletedRequest(
IsURLRequestEqual(net::URLRequestStatus::SUCCESS), "", base::Time()));
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index a6bc71f..63172a9 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -7,6 +7,7 @@
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/scoped_ptr.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_paths.h"
@@ -42,31 +43,41 @@ class ExtensionManifestTest : public testing::Test {
scoped_refptr<Extension> LoadExtensionWithLocation(
DictionaryValue* value,
Extension::Location location,
+ bool strict_error_checks,
std::string* error) {
FilePath path;
PathService::Get(chrome::DIR_TEST_DATA, &path);
path = path.AppendASCII("extensions").AppendASCII("manifest_tests");
- return Extension::Create(path.DirName(), location, *value, false, error);
+ return Extension::Create(path.DirName(), location, *value, false,
+ strict_error_checks, error);
}
scoped_refptr<Extension> LoadExtension(const std::string& name,
std::string* error) {
- return LoadExtensionWithLocation(name, Extension::INTERNAL, error);
+ return LoadExtensionWithLocation(name, Extension::INTERNAL, false, error);
+ }
+
+ scoped_refptr<Extension> LoadExtensionStrict(const std::string& name,
+ std::string* error) {
+ return LoadExtensionWithLocation(name, Extension::INTERNAL, true, error);
}
scoped_refptr<Extension> LoadExtension(DictionaryValue* value,
std::string* error) {
- return LoadExtensionWithLocation(value, Extension::INTERNAL, error);
+ // Loading as an installed extension disables strict error checks.
+ return LoadExtensionWithLocation(value, Extension::INTERNAL, false, error);
}
scoped_refptr<Extension> LoadExtensionWithLocation(
const std::string& name,
Extension::Location location,
+ bool strict_error_checks,
std::string* error) {
scoped_ptr<DictionaryValue> value(LoadManifestFile(name, error));
if (!value.get())
return NULL;
- return LoadExtensionWithLocation(value.get(), location, error);
+ return LoadExtensionWithLocation(value.get(), location,
+ strict_error_checks, error);
}
scoped_refptr<Extension> LoadAndExpectSuccess(const std::string& name) {
@@ -77,6 +88,14 @@ class ExtensionManifestTest : public testing::Test {
return extension;
}
+ scoped_refptr<Extension> LoadStrictAndExpectSuccess(const std::string& name) {
+ std::string error;
+ scoped_refptr<Extension> extension = LoadExtensionStrict(name, &error);
+ EXPECT_TRUE(extension) << name;
+ EXPECT_EQ("", error) << name;
+ return extension;
+ }
+
scoped_refptr<Extension> LoadAndExpectSuccess(DictionaryValue* manifest,
const std::string& name) {
std::string error;
@@ -104,6 +123,13 @@ class ExtensionManifestTest : public testing::Test {
VerifyExpectedError(extension.get(), name, error, expected_error);
}
+ void LoadAndExpectErrorStrict(const std::string& name,
+ const std::string& expected_error) {
+ std::string error;
+ scoped_refptr<Extension> extension(LoadExtensionStrict(name, &error));
+ VerifyExpectedError(extension.get(), name, error, expected_error);
+ }
+
void LoadAndExpectError(DictionaryValue* manifest,
const std::string& name,
const std::string& expected_error) {
@@ -129,18 +155,52 @@ TEST_F(ExtensionManifestTest, ValidApp) {
TEST_F(ExtensionManifestTest, AppWebUrls) {
LoadAndExpectError("web_urls_wrong_type.json",
errors::kInvalidWebURLs);
- LoadAndExpectError("web_urls_invalid_1.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidWebURL, "0"));
- LoadAndExpectError("web_urls_invalid_2.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidWebURL, "0"));
- LoadAndExpectError("web_urls_invalid_3.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidWebURL, "0"));
- LoadAndExpectError("web_urls_invalid_4.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidWebURL, "0"));
+ LoadAndExpectError(
+ "web_urls_invalid_1.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidWebURL,
+ base::IntToString(0),
+ errors::kExpectString));
+
+ LoadAndExpectError(
+ "web_urls_invalid_2.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidWebURL,
+ base::IntToString(0),
+ URLPattern::GetParseResultString(
+ URLPattern::PARSE_ERROR_MISSING_SCHEME_SEPARATOR)));
+
+ LoadAndExpectError(
+ "web_urls_invalid_3.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidWebURL,
+ base::IntToString(0),
+ errors::kNoWildCardsInPaths));
+
+ LoadAndExpectError(
+ "web_urls_invalid_4.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidWebURL,
+ base::IntToString(0),
+ errors::kCannotClaimAllURLsInExtent));
+
+ LoadAndExpectError(
+ "web_urls_invalid_5.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidWebURL,
+ base::IntToString(1),
+ errors::kCannotClaimAllHostsInExtent));
+
+ // Ports in app.urls only raise an error when loading as a
+ // developer would.
+ LoadAndExpectSuccess("web_urls_invalid_has_port.json");
+ LoadAndExpectErrorStrict(
+ "web_urls_invalid_has_port.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidWebURL,
+ base::IntToString(1),
+ URLPattern::GetParseResultString(URLPattern::PARSE_ERROR_HAS_COLON)));
+
scoped_refptr<Extension> extension(
LoadAndExpectSuccess("web_urls_default.json"));
@@ -238,13 +298,45 @@ TEST_F(ExtensionManifestTest, ChromeResourcesPermissionValidOnlyForComponents) {
extension = LoadExtensionWithLocation(
"permission_chrome_resources_url.json",
Extension::COMPONENT,
+ true, // Strict error checking
&error);
EXPECT_EQ("", error);
}
-TEST_F(ExtensionManifestTest, ChromeURLContentScriptInvalid) {
- LoadAndExpectError("content_script_chrome_url_invalid.json",
- errors::kInvalidMatch);
+TEST_F(ExtensionManifestTest, InvalidContentScriptMatchPattern) {
+
+ // chrome:// urls are not allowed.
+ LoadAndExpectError(
+ "content_script_chrome_url_invalid.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidMatch,
+ base::IntToString(0),
+ base::IntToString(0),
+ URLPattern::GetParseResultString(
+ URLPattern::PARSE_ERROR_INVALID_SCHEME)));
+
+ // Match paterns must be strings.
+ LoadAndExpectError(
+ "content_script_match_pattern_not_string.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidMatch,
+ base::IntToString(0),
+ base::IntToString(0),
+ errors::kExpectString));
+
+ // Ports in match patterns cause an error, but only when loading
+ // in developer mode.
+ LoadAndExpectSuccess("forbid_ports_in_content_scripts.json");
+
+ // Loading as a developer would should give an error.
+ LoadAndExpectErrorStrict(
+ "forbid_ports_in_content_scripts.json",
+ ExtensionErrorUtils::FormatErrorMessage(
+ errors::kInvalidMatch,
+ base::IntToString(1),
+ base::IntToString(0),
+ URLPattern::GetParseResultString(
+ URLPattern::PARSE_ERROR_HAS_COLON)));
}
TEST_F(ExtensionManifestTest, ExperimentalPermission) {
@@ -444,3 +536,14 @@ TEST_F(ExtensionManifestTest, TtsProvider) {
EXPECT_EQ("en-US", extension->tts_voices()[0].locale);
EXPECT_EQ("female", extension->tts_voices()[0].gender);
}
+
+TEST_F(ExtensionManifestTest, ForbidPortsInPermissions) {
+ // Loading as a user would shoud not trigger an error.
+ LoadAndExpectSuccess("forbid_ports_in_permissions.json");
+
+ // Ideally, loading as a developer would give an error.
+ // To ensure that we do not error out on a valid permission
+ // in a future version of chrome, validation is to loose
+ // to flag this case.
+ LoadStrictAndExpectSuccess("forbid_ports_in_permissions.json");
+}
diff --git a/chrome/common/extensions/extension_set_unittest.cc b/chrome/common/extensions/extension_set_unittest.cc
index 1b85ac5..a68e1d7 100644
--- a/chrome/common/extensions/extension_set_unittest.cc
+++ b/chrome/common/extensions/extension_set_unittest.cc
@@ -37,10 +37,11 @@ scoped_refptr<Extension> CreateTestExtension(const std::string& name,
}
const bool kRequireKey = false;
+ const bool kStrictErrorChecks = true;
std::string error;
scoped_refptr<Extension> extension(
Extension::Create(path, Extension::INTERNAL, manifest, kRequireKey,
- &error));
+ kStrictErrorChecks, &error));
EXPECT_TRUE(extension.get()) << error;
return extension;
}
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index 817062c..ab3c3a2 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -105,7 +105,7 @@ TEST(ExtensionTest, InitFromValueInvalid) {
EXPECT_EQ("", error);
EXPECT_EQ(0, error_code);
ASSERT_TRUE(valid_value.get());
- ASSERT_TRUE(extension.InitFromValue(*valid_value, true, &error));
+ ASSERT_TRUE(extension.InitFromValue(*valid_value, true, false, &error));
ASSERT_EQ("", error);
EXPECT_EQ("en_US", extension.default_locale());
@@ -114,33 +114,33 @@ TEST(ExtensionTest, InitFromValueInvalid) {
// Test missing and invalid versions
input_value.reset(valid_value->DeepCopy());
input_value->Remove(keys::kVersion, NULL);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_EQ(errors::kInvalidVersion, error);
input_value->SetInteger(keys::kVersion, 42);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_EQ(errors::kInvalidVersion, error);
// Test missing and invalid names.
input_value.reset(valid_value->DeepCopy());
input_value->Remove(keys::kName, NULL);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_EQ(errors::kInvalidName, error);
input_value->SetInteger(keys::kName, 42);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_EQ(errors::kInvalidName, error);
// Test invalid description
input_value.reset(valid_value->DeepCopy());
input_value->SetInteger(keys::kDescription, 42);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_EQ(errors::kInvalidDescription, error);
// Test invalid icons
input_value.reset(valid_value->DeepCopy());
input_value->SetInteger(keys::kIcons, 42);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_EQ(errors::kInvalidIcons, error);
// Test invalid icon paths
@@ -149,13 +149,13 @@ TEST(ExtensionTest, InitFromValueInvalid) {
input_value->GetDictionary(keys::kIcons, &icons);
ASSERT_FALSE(NULL == icons);
icons->SetInteger(base::IntToString(128), 42);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidIconPath));
// Test invalid user scripts list
input_value.reset(valid_value->DeepCopy());
input_value->SetInteger(keys::kContentScripts, 42);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_EQ(errors::kInvalidContentScriptsList, error);
// Test invalid user script item
@@ -164,7 +164,7 @@ TEST(ExtensionTest, InitFromValueInvalid) {
input_value->GetList(keys::kContentScripts, &content_scripts);
ASSERT_FALSE(NULL == content_scripts);
content_scripts->Set(0, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidContentScript));
// Test missing and invalid matches array
@@ -173,25 +173,25 @@ TEST(ExtensionTest, InitFromValueInvalid) {
DictionaryValue* user_script = NULL;
content_scripts->GetDictionary(0, &user_script);
user_script->Remove(keys::kMatches, NULL);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidMatches));
user_script->Set(keys::kMatches, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidMatches));
ListValue* matches = new ListValue;
user_script->Set(keys::kMatches, matches);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidMatchCount));
// Test invalid match element
matches->Set(0, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidMatch));
matches->Set(0, Value::CreateStringValue("chrome://*/*"));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidMatch));
// Test missing and invalid files array
@@ -200,67 +200,68 @@ TEST(ExtensionTest, InitFromValueInvalid) {
content_scripts->GetDictionary(0, &user_script);
user_script->Remove(keys::kJs, NULL);
user_script->Remove(keys::kCss, NULL);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kMissingFile));
user_script->Set(keys::kJs, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidJsList));
user_script->Set(keys::kCss, new ListValue);
user_script->Set(keys::kJs, new ListValue);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kMissingFile));
user_script->Remove(keys::kCss, NULL);
ListValue* files = new ListValue;
user_script->Set(keys::kJs, files);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kMissingFile));
// Test invalid file element
files->Set(0, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidJs));
user_script->Remove(keys::kJs, NULL);
// Test the css element
user_script->Set(keys::kCss, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidCssList));
// Test invalid file element
ListValue* css_files = new ListValue;
user_script->Set(keys::kCss, css_files);
css_files->Set(0, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidCss));
// Test missing and invalid permissions array
input_value.reset(valid_value->DeepCopy());
- EXPECT_TRUE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_TRUE(extension.InitFromValue(*input_value, true, false, &error));
+
ListValue* permissions = NULL;
input_value->GetList(keys::kPermissions, &permissions);
ASSERT_FALSE(NULL == permissions);
permissions = new ListValue;
input_value->Set(keys::kPermissions, permissions);
- EXPECT_TRUE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_TRUE(extension.InitFromValue(*input_value, true, false, &error));
input_value->Set(keys::kPermissions, Value::CreateIntegerValue(9));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidPermissions));
input_value.reset(valid_value->DeepCopy());
input_value->GetList(keys::kPermissions, &permissions);
permissions->Set(0, Value::CreateIntegerValue(24));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidPermission));
// We allow unknown API permissions, so this will be valid until we better
// distinguish between API and host permissions.
permissions->Set(0, Value::CreateStringValue("www.google.com"));
- EXPECT_TRUE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_TRUE(extension.InitFromValue(*input_value, true, false, &error));
// Multiple page actions are not allowed.
input_value.reset(valid_value->DeepCopy());
@@ -271,36 +272,36 @@ TEST(ExtensionTest, InitFromValueInvalid) {
action_list->Append(action->DeepCopy());
action_list->Append(action);
input_value->Set(keys::kPageActions, action_list);
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_STREQ(errors::kInvalidPageActionsListSize, error.c_str());
// Test invalid options page url.
input_value.reset(valid_value->DeepCopy());
input_value->Set(keys::kOptionsPage, Value::CreateNullValue());
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidOptionsPage));
// Test invalid/empty default locale.
input_value.reset(valid_value->DeepCopy());
input_value->Set(keys::kDefaultLocale, Value::CreateIntegerValue(5));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidDefaultLocale));
input_value->Set(keys::kDefaultLocale, Value::CreateStringValue(""));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidDefaultLocale));
// Test invalid minimum_chrome_version.
input_value.reset(valid_value->DeepCopy());
input_value->Set(keys::kMinimumChromeVersion, Value::CreateIntegerValue(42));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kInvalidMinimumChromeVersion));
#if !defined(OS_MACOSX)
// TODO(aa): The version isn't stamped into the unit test binary on mac.
input_value->Set(keys::kMinimumChromeVersion,
Value::CreateStringValue("88.8"));
- EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error));
+ EXPECT_FALSE(extension.InitFromValue(*input_value, true, false, &error));
EXPECT_TRUE(MatchPattern(error, errors::kChromeVersionTooLow));
#endif
}
@@ -321,7 +322,7 @@ TEST(ExtensionTest, InitFromValueValid) {
input_value.SetString(keys::kVersion, "1.0.0.0");
input_value.SetString(keys::kName, "my extension");
- EXPECT_TRUE(extension.InitFromValue(input_value, false, &error));
+ EXPECT_TRUE(extension.InitFromValue(input_value, false, false, &error));
EXPECT_EQ("", error);
EXPECT_TRUE(Extension::IdIsValid(extension.id()));
EXPECT_EQ("1.0.0.0", extension.VersionString());
@@ -336,12 +337,12 @@ TEST(ExtensionTest, InitFromValueValid) {
// We allow unknown API permissions, so this will be valid until we better
// distinguish between API and host permissions.
- EXPECT_TRUE(extension.InitFromValue(input_value, false, &error));
+ EXPECT_TRUE(extension.InitFromValue(input_value, false, false, &error));
input_value.Remove(keys::kPermissions, NULL);
// Test with an options page.
input_value.SetString(keys::kOptionsPage, "options.html");
- EXPECT_TRUE(extension.InitFromValue(input_value, false, &error));
+ EXPECT_TRUE(extension.InitFromValue(input_value, false, false, &error));
EXPECT_EQ("", error);
EXPECT_EQ("chrome-extension", extension.options_url().scheme());
EXPECT_EQ("/options.html", extension.options_url().path());
@@ -350,14 +351,14 @@ TEST(ExtensionTest, InitFromValueValid) {
// from being loaded.
ListValue* empty_list = new ListValue;
input_value.Set(keys::kPageActions, empty_list);
- EXPECT_TRUE(extension.InitFromValue(input_value, false, &error));
+ EXPECT_TRUE(extension.InitFromValue(input_value, false, false, &error));
EXPECT_EQ("", error);
#if !defined(OS_MACOSX)
// TODO(aa): The version isn't stamped into the unit test binary on mac.
// Test with a minimum_chrome_version.
input_value.SetString(keys::kMinimumChromeVersion, "1.0");
- EXPECT_TRUE(extension.InitFromValue(input_value, false, &error));
+ EXPECT_TRUE(extension.InitFromValue(input_value, false, false, &error));
EXPECT_EQ("", error);
// The minimum chrome version is not stored in the Extension object.
#endif
@@ -387,7 +388,7 @@ TEST(ExtensionTest, InitFromValueValidNameInRTL) {
// No strong RTL characters in name.
std::wstring name(L"Dictionary (by Google)");
input_value.SetString(keys::kName, WideToUTF16Hack(name));
- EXPECT_TRUE(extension.InitFromValue(input_value, false, &error));
+ EXPECT_TRUE(extension.InitFromValue(input_value, false, false, &error));
EXPECT_EQ("", error);
std::wstring localized_name(name);
base::i18n::AdjustStringForLocaleDirection(&localized_name);
@@ -396,7 +397,7 @@ TEST(ExtensionTest, InitFromValueValidNameInRTL) {
// Strong RTL characters in name.
name = L"Dictionary (\x05D1\x05D2"L" Google)";
input_value.SetString(keys::kName, WideToUTF16Hack(name));
- EXPECT_TRUE(extension.InitFromValue(input_value, false, &error));
+ EXPECT_TRUE(extension.InitFromValue(input_value, false, false, &error));
EXPECT_EQ("", error);
localized_name = name;
base::i18n::AdjustStringForLocaleDirection(&localized_name);
@@ -420,7 +421,7 @@ TEST(ExtensionTest, GetResourceURLAndPath) {
input_value.SetString(keys::kVersion, "1.0.0.0");
input_value.SetString(keys::kName, "my extension");
scoped_refptr<Extension> extension(Extension::Create(
- path, Extension::INVALID, input_value, false, NULL));
+ path, Extension::INVALID, input_value, false, true, NULL));
EXPECT_TRUE(extension.get());
EXPECT_EQ(extension->url().spec() + "bar/baz.js",
@@ -679,7 +680,7 @@ TEST(ExtensionTest, UpdateUrls) {
input_value.SetString(keys::kUpdateURL, url.spec());
scoped_refptr<Extension> extension(Extension::Create(
- path, Extension::INVALID, input_value, false, &error));
+ path, Extension::INVALID, input_value, false, true, &error));
EXPECT_TRUE(extension.get()) << error;
}
@@ -703,7 +704,7 @@ TEST(ExtensionTest, UpdateUrls) {
input_value.SetString(keys::kUpdateURL, invalid[i]);
scoped_refptr<Extension> extension(Extension::Create(
- path, Extension::INVALID, input_value, false, &error));
+ path, Extension::INVALID, input_value, false, true, &error));
EXPECT_FALSE(extension.get());
EXPECT_TRUE(MatchPattern(error, errors::kInvalidUpdateURL));
}
@@ -751,7 +752,7 @@ static scoped_refptr<Extension> LoadManifest(const std::string& dir,
scoped_refptr<Extension> extension = Extension::Create(
path.DirName(), Extension::INVALID,
- *static_cast<DictionaryValue*>(result.get()), false, &error);
+ *static_cast<DictionaryValue*>(result.get()), false, true, &error);
EXPECT_TRUE(extension) << error;
return extension;
}
@@ -920,6 +921,7 @@ TEST(ExtensionTest, PermissionMessages) {
skip.insert(Extension::kIdlePermission);
skip.insert(Extension::kNotificationPermission);
skip.insert(Extension::kUnlimitedStoragePermission);
+ skip.insert(Extension::kContentSettingsPermission);
// TODO(erikkay) add a string for this permission.
skip.insert(Extension::kBackgroundPermission);
@@ -971,7 +973,7 @@ TEST(ExtensionTest, ImageCaching) {
values.SetString(keys::kName, "test");
values.SetString(keys::kVersion, "0.1");
scoped_refptr<Extension> extension(Extension::Create(
- path, Extension::INVALID, values, false, &errors));
+ path, Extension::INVALID, values, false, true, &errors));
ASSERT_TRUE(extension.get());
// Create an ExtensionResource pointing at an icon.
@@ -1055,7 +1057,7 @@ TEST(ExtensionTest, OldUnlimitedStoragePermission) {
// is present.
std::string errors;
scoped_refptr<Extension> extension(Extension::Create(
- extension_path, Extension::INVALID, dictionary, false, &errors));
+ extension_path, Extension::INVALID, dictionary, false, true, &errors));
EXPECT_TRUE(extension.get());
EXPECT_TRUE(extension->HasApiPermission(
Extension::kUnlimitedStoragePermission));
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index e001911..fee4b54 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -177,7 +177,12 @@ bool ExtensionUnpacker::Run() {
// EXTENSION.
std::string error;
scoped_refptr<Extension> extension(Extension::Create(
- temp_install_dir_, Extension::INVALID, *parsed_manifest_, false, &error));
+ temp_install_dir_,
+ Extension::INVALID,
+ *parsed_manifest_,
+ false, // Do not require a key
+ false, // Do not enable strict error checks
+ &error));
if (!extension.get()) {
SetError(error);
return false;
@@ -286,13 +291,14 @@ bool ExtensionUnpacker::ReadMessageCatalog(const FilePath& message_path) {
scoped_ptr<DictionaryValue> root(
static_cast<DictionaryValue*>(serializer.Deserialize(NULL, &error)));
if (!root.get()) {
- std::string messages_file = WideToASCII(message_path.ToWStringHack());
+ string16 messages_file = message_path.LossyDisplayName();
if (error.empty()) {
// If file is missing, Deserialize will fail with empty error.
SetError(base::StringPrintf("%s %s", errors::kLocalesMessagesFileMissing,
- messages_file.c_str()));
+ UTF16ToUTF8(messages_file).c_str()));
} else {
- SetError(base::StringPrintf("%s: %s", messages_file.c_str(),
+ SetError(base::StringPrintf("%s: %s",
+ UTF16ToUTF8(messages_file).c_str(),
error.c_str()));
}
return false;
@@ -300,11 +306,17 @@ bool ExtensionUnpacker::ReadMessageCatalog(const FilePath& message_path) {
FilePath relative_path;
// message_path was created from temp_install_dir. This should never fail.
- if (!temp_install_dir_.AppendRelativePath(message_path, &relative_path))
+ if (!temp_install_dir_.AppendRelativePath(message_path, &relative_path)) {
NOTREACHED();
+ return false;
+ }
- parsed_catalogs_->Set(WideToUTF8(relative_path.DirName().ToWStringHack()),
- root.release());
+ std::string dir_name = relative_path.DirName().MaybeAsASCII();
+ if (dir_name.empty()) {
+ NOTREACHED();
+ return false;
+ }
+ parsed_catalogs_->Set(dir_name, root.release());
return true;
}
diff --git a/chrome/common/extensions/update_manifest.cc b/chrome/common/extensions/update_manifest.cc
index d2ceda7..8970aa5 100644
--- a/chrome/common/extensions/update_manifest.cc
+++ b/chrome/common/extensions/update_manifest.cc
@@ -140,7 +140,7 @@ static bool ParseSingleAppTag(xmlNode* app_node, xmlNs* xml_namespace,
*error_detail = "Too many updatecheck tags on app (expecting only 1).";
return false;
}
- if (updates.size() == 0) {
+ if (updates.empty()) {
*error_detail = "Missing updatecheck on app.";
return false;
}
@@ -242,7 +242,7 @@ bool UpdateManifest::Parse(const std::string& manifest_xml) {
// Parse the first <daystart> if it's present.
std::vector<xmlNode*> daystarts = GetChildren(root, gupdate_ns, "daystart");
- if (daystarts.size() > 0) {
+ if (!daystarts.empty()) {
xmlNode* first = daystarts[0];
std::string elapsed_seconds = GetAttribute(first, "elapsed_seconds");
int parsed_elapsed = kNoDaystart;
diff --git a/chrome/common/extensions/url_pattern.cc b/chrome/common/extensions/url_pattern.cc
index b6e09b7..5eb0beb 100644
--- a/chrome/common/extensions/url_pattern.cc
+++ b/chrome/common/extensions/url_pattern.cc
@@ -11,10 +11,14 @@
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_util.h"
+const char URLPattern::kAllUrlsPattern[] = "<all_urls>";
+
+namespace {
+
// TODO(aa): Consider adding chrome-extension? What about more obscure ones
// like data: and javascript: ?
// Note: keep this array in sync with kValidSchemeMasks.
-static const char* kValidSchemes[] = {
+const char* kValidSchemes[] = {
chrome::kHttpScheme,
chrome::kHttpsScheme,
chrome::kFileScheme,
@@ -22,7 +26,7 @@ static const char* kValidSchemes[] = {
chrome::kChromeUIScheme,
};
-static const int kValidSchemeMasks[] = {
+const int kValidSchemeMasks[] = {
URLPattern::SCHEME_HTTP,
URLPattern::SCHEME_HTTPS,
URLPattern::SCHEME_FILE,
@@ -33,11 +37,34 @@ static const int kValidSchemeMasks[] = {
COMPILE_ASSERT(arraysize(kValidSchemes) == arraysize(kValidSchemeMasks),
must_keep_these_arrays_in_sync);
-static const char kPathSeparator[] = "/";
+const char* kParseSuccess = "Success.";
+const char* kParseErrorMissingSchemeSeparator = "Missing scheme separator.";
+const char* kParseErrorInvalidScheme = "Invalid scheme.";
+const char* kParseErrorWrongSchemeType = "Wrong scheme type.";
+const char* kParseErrorEmptyHost = "Host can not be empty.";
+const char* kParseErrorInvalidHostWildcard = "Invalid host wildcard.";
+const char* kParseErrorEmptyPath = "Empty path.";
+const char* kParseErrorHasColon =
+ "Ports are not supported in URL patterns. ':' may not be used in a host.";
+
+// Message explaining each URLPattern::ParseResult.
+const char* kParseResultMessages[] = {
+ kParseSuccess,
+ kParseErrorMissingSchemeSeparator,
+ kParseErrorInvalidScheme,
+ kParseErrorWrongSchemeType,
+ kParseErrorEmptyHost,
+ kParseErrorInvalidHostWildcard,
+ kParseErrorEmptyPath,
+ kParseErrorHasColon
+};
+
+COMPILE_ASSERT(URLPattern::NUM_PARSE_RESULTS == arraysize(kParseResultMessages),
+ must_add_message_for_each_parse_result);
-const char URLPattern::kAllUrlsPattern[] = "<all_urls>";
+const char kPathSeparator[] = "/";
-static bool IsStandardScheme(const std::string& scheme) {
+bool IsStandardScheme(const std::string& scheme) {
// "*" gets the same treatment as a standard scheme.
if (scheme == "*")
return true;
@@ -46,6 +73,8 @@ static bool IsStandardScheme(const std::string& scheme) {
url_parse::Component(0, static_cast<int>(scheme.length())));
}
+} // namespace
+
URLPattern::URLPattern()
: valid_schemes_(SCHEME_NONE),
match_all_urls_(false),
@@ -58,21 +87,28 @@ URLPattern::URLPattern(int valid_schemes)
URLPattern::URLPattern(int valid_schemes, const std::string& pattern)
: valid_schemes_(valid_schemes), match_all_urls_(false),
match_subdomains_(false) {
- if (PARSE_SUCCESS != Parse(pattern))
+
+ // Strict error checking is used, because this constructor is only
+ // appropriate when we know |pattern| is valid.
+ if (PARSE_SUCCESS != Parse(pattern, PARSE_STRICT))
NOTREACHED() << "URLPattern is invalid: " << pattern;
}
URLPattern::~URLPattern() {
}
-URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) {
+URLPattern::ParseResult URLPattern::Parse(const std::string& pattern,
+ ParseOption strictness) {
+ CHECK(strictness == PARSE_LENIENT ||
+ strictness == PARSE_STRICT);
+
// Special case pattern to match every valid URL.
if (pattern == kAllUrlsPattern) {
match_all_urls_ = true;
match_subdomains_ = true;
scheme_ = "*";
host_.clear();
- path_ = "/*";
+ SetPath("/*");
return PARSE_SUCCESS;
}
@@ -140,7 +176,10 @@ URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) {
path_start_pos = host_end_pos;
}
- path_ = pattern.substr(path_start_pos);
+ SetPath(pattern.substr(path_start_pos));
+
+ if (strictness == PARSE_STRICT && host_.find(':') != std::string::npos)
+ return PARSE_ERROR_HAS_COLON;
return PARSE_SUCCESS;
}
@@ -167,6 +206,13 @@ bool URLPattern::IsValidScheme(const std::string& scheme) const {
return false;
}
+void URLPattern::SetPath(const std::string& path) {
+ path_ = path;
+ path_escaped_ = path_;
+ ReplaceSubstringsAfterOffset(&path_escaped_, 0, "\\", "\\\\");
+ ReplaceSubstringsAfterOffset(&path_escaped_, 0, "?", "\\?");
+}
+
bool URLPattern::MatchesUrl(const GURL &test) const {
if (!MatchesScheme(test.scheme()))
return false;
@@ -230,12 +276,6 @@ bool URLPattern::MatchesHost(const GURL& test) const {
}
bool URLPattern::MatchesPath(const std::string& test) const {
- if (path_escaped_.empty()) {
- path_escaped_ = path_;
- ReplaceSubstringsAfterOffset(&path_escaped_, 0, "\\", "\\\\");
- ReplaceSubstringsAfterOffset(&path_escaped_, 0, "?", "\\?");
- }
-
if (!MatchPattern(test, path_escaped_))
return false;
@@ -309,3 +349,9 @@ std::vector<URLPattern> URLPattern::ConvertToExplicitSchemes() const {
return result;
}
+
+// static
+const char* URLPattern::GetParseResultString(
+ URLPattern::ParseResult parse_result) {
+ return kParseResultMessages[parse_result];
+}
diff --git a/chrome/common/extensions/url_pattern.h b/chrome/common/extensions/url_pattern.h
index 56deed5..edd92d4 100644
--- a/chrome/common/extensions/url_pattern.h
+++ b/chrome/common/extensions/url_pattern.h
@@ -91,15 +91,23 @@ class URLPattern {
SCHEME_ALL = -1,
};
+ // Options for URLPattern::Parse().
+ enum ParseOption {
+ PARSE_LENIENT,
+ PARSE_STRICT
+ };
+
// Error codes returned from Parse().
enum ParseResult {
- PARSE_SUCCESS,
+ PARSE_SUCCESS = 0,
PARSE_ERROR_MISSING_SCHEME_SEPARATOR,
PARSE_ERROR_INVALID_SCHEME,
PARSE_ERROR_WRONG_SCHEME_SEPARATOR,
PARSE_ERROR_EMPTY_HOST,
PARSE_ERROR_INVALID_HOST_WILDCARD,
PARSE_ERROR_EMPTY_PATH,
+ PARSE_ERROR_HAS_COLON, // Only checked when strict checks are enabled.
+ NUM_PARSE_RESULTS
};
// The <all_urls> string pattern.
@@ -140,10 +148,7 @@ class URLPattern {
// Gets the path the pattern matches with the leading slash. This can have
// embedded asterisks which are interpreted using glob rules.
const std::string& path() const { return path_; }
- void set_path(const std::string& path) {
- path_ = path;
- path_escaped_ = "";
- }
+ void SetPath(const std::string& path);
// Returns true if this pattern matches all urls.
bool match_all_urls() const { return match_all_urls_; }
@@ -152,8 +157,16 @@ class URLPattern {
// Initializes this instance by parsing the provided string. Returns
// URLPattern::PARSE_SUCCESS on success, or an error code otherwise. On
// failure, this instance will have some intermediate values and is in an
- // invalid state.
- ParseResult Parse(const std::string& pattern_str);
+ // invalid state. Adding error checks to URLPattern::Parse() can cause
+ // patterns in installed extensions to fail. If an installed extension
+ // uses a pattern that was valid but fails a new error check, the
+ // extension will fail to load when chrome is auto-updated. To avoid
+ // this, new parse checks are enabled only when |strictness| is
+ // OPTION_STRICT. OPTION_STRICT should be used when loading in developer
+ // mode, or when an extension's patterns are controlled by chrome (such
+ // as component extensions).
+ ParseResult Parse(const std::string& pattern_str,
+ ParseOption strictness);
// Sets the scheme for pattern matches. This can be a single '*' if the
// pattern matches all valid schemes (as defined by the valid_schemes_
@@ -208,6 +221,9 @@ class URLPattern {
};
};
+ // Get an error string for a ParseResult.
+ static const char* GetParseResultString(URLPattern::ParseResult parse_result);
+
private:
#if !(defined(_MSC_VER) && _MSC_VER >= 1600)
friend class std::vector<URLPattern>;
@@ -241,9 +257,8 @@ class URLPattern {
std::string path_;
// The path with "?" and "\" characters escaped for use with the
- // MatchPattern() function. This is populated lazily, the first time it is
- // needed.
- mutable std::string path_escaped_;
+ // MatchPattern() function.
+ std::string path_escaped_;
};
typedef std::vector<URLPattern> URLPatternList;
diff --git a/chrome/common/extensions/url_pattern_unittest.cc b/chrome/common/extensions/url_pattern_unittest.cc
index 33bf8a0..cc9c605 100644
--- a/chrome/common/extensions/url_pattern_unittest.cc
+++ b/chrome/common/extensions/url_pattern_unittest.cc
@@ -29,6 +29,7 @@ TEST(ExtensionURLPatternTest, ParseInvalid) {
{ "http:///", URLPattern::PARSE_ERROR_EMPTY_HOST },
{ "http://*foo/bar", URLPattern::PARSE_ERROR_INVALID_HOST_WILDCARD },
{ "http://foo.*.bar/baz", URLPattern::PARSE_ERROR_INVALID_HOST_WILDCARD },
+ { "http://fo.*.ba:123/baz", URLPattern::PARSE_ERROR_INVALID_HOST_WILDCARD },
{ "http:/bar", URLPattern::PARSE_ERROR_WRONG_SCHEME_SEPARATOR },
{ "http://bar", URLPattern::PARSE_ERROR_EMPTY_PATH },
};
@@ -36,15 +37,55 @@ TEST(ExtensionURLPatternTest, ParseInvalid) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kInvalidPatterns); ++i) {
URLPattern pattern(URLPattern::SCHEME_ALL);
EXPECT_EQ(kInvalidPatterns[i].expected_result,
- pattern.Parse(kInvalidPatterns[i].pattern))
+ pattern.Parse(kInvalidPatterns[i].pattern,
+ URLPattern::PARSE_LENIENT))
<< kInvalidPatterns[i].pattern;
}
};
+TEST(ExtensionURLPatternTest, Colons) {
+ const struct {
+ const char* pattern;
+ URLPattern::ParseResult expected_result;
+ } kTestPatterns[] = {
+ { "http://foo:1234/", URLPattern::PARSE_ERROR_HAS_COLON },
+ { "http://foo:1234/bar", URLPattern::PARSE_ERROR_HAS_COLON },
+ { "http://*.foo:1234/", URLPattern::PARSE_ERROR_HAS_COLON },
+ { "http://*.foo:1234/bar", URLPattern::PARSE_ERROR_HAS_COLON },
+ { "http://:1234/", URLPattern::PARSE_ERROR_HAS_COLON },
+ { "http://foo:/", URLPattern::PARSE_ERROR_HAS_COLON },
+ { "http://*.foo:/", URLPattern::PARSE_ERROR_HAS_COLON },
+ { "http://foo:com/", URLPattern::PARSE_ERROR_HAS_COLON },
+
+ // Port-like strings in the path should not trigger a warning.
+ { "http://*/:1234", URLPattern::PARSE_SUCCESS },
+ { "http://*.foo/bar:1234", URLPattern::PARSE_SUCCESS },
+ { "http://foo/bar:1234/path", URLPattern::PARSE_SUCCESS },
+ };
+
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestPatterns); ++i) {
+ URLPattern pattern(URLPattern::SCHEME_ALL);
+
+ // Without |strict_error_checks|, expect success.
+ EXPECT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse(kTestPatterns[i].pattern,
+ URLPattern::PARSE_LENIENT))
+ << "Got unexpected error for URL pattern: "
+ << kTestPatterns[i].pattern;
+
+ EXPECT_EQ(kTestPatterns[i].expected_result,
+ pattern.Parse(kTestPatterns[i].pattern,
+ URLPattern::PARSE_STRICT))
+ << "Got unexpected result for URL pattern: "
+ << kTestPatterns[i].pattern;
+ }
+};
+
// all pages for a given scheme
TEST(ExtensionURLPatternTest, Match1) {
URLPattern pattern(kAllSchemes);
- EXPECT_EQ(URLPattern::PARSE_SUCCESS, pattern.Parse("http://*/*"));
+ EXPECT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse("http://*/*", URLPattern::PARSE_STRICT));
EXPECT_EQ("http", pattern.scheme());
EXPECT_EQ("", pattern.host());
EXPECT_TRUE(pattern.match_subdomains());
@@ -60,7 +101,8 @@ TEST(ExtensionURLPatternTest, Match1) {
// all domains
TEST(ExtensionURLPatternTest, Match2) {
URLPattern pattern(kAllSchemes);
- EXPECT_EQ(URLPattern::PARSE_SUCCESS, pattern.Parse("https://*/foo*"));
+ EXPECT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse("https://*/foo*", URLPattern::PARSE_STRICT));
EXPECT_EQ("https", pattern.scheme());
EXPECT_EQ("", pattern.host());
EXPECT_TRUE(pattern.match_subdomains());
@@ -76,7 +118,8 @@ TEST(ExtensionURLPatternTest, Match2) {
TEST(URLPatternTest, Match3) {
URLPattern pattern(kAllSchemes);
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse("http://*.google.com/foo*bar"));
+ pattern.Parse("http://*.google.com/foo*bar",
+ URLPattern::PARSE_STRICT));
EXPECT_EQ("http", pattern.scheme());
EXPECT_EQ("google.com", pattern.host());
EXPECT_TRUE(pattern.match_subdomains());
@@ -93,7 +136,7 @@ TEST(URLPatternTest, Match3) {
TEST(ExtensionURLPatternTest, Match5) {
URLPattern pattern(kAllSchemes);
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse("file:///foo?bar\\*baz"));
+ pattern.Parse("file:///foo?bar\\*baz", URLPattern::PARSE_STRICT));
EXPECT_EQ("file", pattern.scheme());
EXPECT_EQ("", pattern.host());
EXPECT_FALSE(pattern.match_subdomains());
@@ -107,7 +150,7 @@ TEST(ExtensionURLPatternTest, Match5) {
TEST(ExtensionURLPatternTest, Match6) {
URLPattern pattern(kAllSchemes);
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse("http://127.0.0.1/*"));
+ pattern.Parse("http://127.0.0.1/*", URLPattern::PARSE_STRICT));
EXPECT_EQ("http", pattern.scheme());
EXPECT_EQ("127.0.0.1", pattern.host());
EXPECT_FALSE(pattern.match_subdomains());
@@ -120,7 +163,8 @@ TEST(ExtensionURLPatternTest, Match6) {
TEST(ExtensionURLPatternTest, Match7) {
URLPattern pattern(kAllSchemes);
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse("http://*.0.0.1/*")); // allowed, but useless
+ pattern.Parse("http://*.0.0.1/*",
+ URLPattern::PARSE_STRICT)); // allowed, but useless
EXPECT_EQ("http", pattern.scheme());
EXPECT_EQ("0.0.1", pattern.host());
EXPECT_TRUE(pattern.match_subdomains());
@@ -136,7 +180,8 @@ TEST(ExtensionURLPatternTest, Match8) {
// The below is the ASCII encoding of the following URL:
// http://*.\xe1\x80\xbf/a\xc2\x81\xe1*
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse("http://*.xn--gkd/a%C2%81%E1*"));
+ pattern.Parse("http://*.xn--gkd/a%C2%81%E1*",
+ URLPattern::PARSE_STRICT));
EXPECT_EQ("http", pattern.scheme());
EXPECT_EQ("xn--gkd", pattern.host());
EXPECT_TRUE(pattern.match_subdomains());
@@ -152,7 +197,7 @@ TEST(ExtensionURLPatternTest, Match8) {
TEST(ExtensionURLPatternTest, Match9) {
URLPattern pattern(kAllSchemes);
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse("chrome://favicon/*"));
+ pattern.Parse("chrome://favicon/*", URLPattern::PARSE_STRICT));
EXPECT_EQ("chrome", pattern.scheme());
EXPECT_EQ("favicon", pattern.host());
EXPECT_FALSE(pattern.match_subdomains());
@@ -166,7 +211,8 @@ TEST(ExtensionURLPatternTest, Match9) {
// *://
TEST(ExtensionURLPatternTest, Match10) {
URLPattern pattern(kAllSchemes);
- EXPECT_EQ(URLPattern::PARSE_SUCCESS, pattern.Parse("*://*/*"));
+ EXPECT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse("*://*/*", URLPattern::PARSE_STRICT));
EXPECT_TRUE(pattern.MatchesScheme("http"));
EXPECT_TRUE(pattern.MatchesScheme("https"));
EXPECT_FALSE(pattern.MatchesScheme("chrome"));
@@ -183,7 +229,8 @@ TEST(ExtensionURLPatternTest, Match10) {
// <all_urls>
TEST(ExtensionURLPatternTest, Match11) {
URLPattern pattern(kAllSchemes);
- EXPECT_EQ(URLPattern::PARSE_SUCCESS, pattern.Parse("<all_urls>"));
+ EXPECT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse("<all_urls>", URLPattern::PARSE_STRICT));
EXPECT_TRUE(pattern.MatchesScheme("chrome"));
EXPECT_TRUE(pattern.MatchesScheme("http"));
EXPECT_TRUE(pattern.MatchesScheme("https"));
@@ -199,7 +246,8 @@ TEST(ExtensionURLPatternTest, Match11) {
// SCHEME_ALL matches all schemes.
TEST(ExtensionURLPatternTest, Match12) {
URLPattern pattern(URLPattern::SCHEME_ALL);
- EXPECT_EQ(URLPattern::PARSE_SUCCESS, pattern.Parse("<all_urls>"));
+ EXPECT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse("<all_urls>", URLPattern::PARSE_STRICT));
EXPECT_TRUE(pattern.MatchesScheme("chrome"));
EXPECT_TRUE(pattern.MatchesScheme("http"));
EXPECT_TRUE(pattern.MatchesScheme("https"));
@@ -238,7 +286,8 @@ TEST(ExtensionURLPatternTest, Match13) {
for (size_t i = 0; i < arraysize(kMatch13UrlPatternTestCases); ++i) {
URLPattern pattern(URLPattern::SCHEME_ALL);
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse(kMatch13UrlPatternTestCases[i].pattern))
+ pattern.Parse(kMatch13UrlPatternTestCases[i].pattern,
+ URLPattern::PARSE_STRICT))
<< " while parsing " << kMatch13UrlPatternTestCases[i].pattern;
EXPECT_TRUE(pattern.MatchesUrl(
GURL(kMatch13UrlPatternTestCases[i].matches)))
@@ -247,7 +296,8 @@ TEST(ExtensionURLPatternTest, Match13) {
// Negative test.
URLPattern pattern(URLPattern::SCHEME_ALL);
- EXPECT_EQ(URLPattern::PARSE_SUCCESS, pattern.Parse("data:*"));
+ EXPECT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse("data:*", URLPattern::PARSE_STRICT));
EXPECT_FALSE(pattern.MatchesUrl(GURL("about:blank")));
};
@@ -272,7 +322,8 @@ TEST(ExtensionURLPatternTest, GetAsString) {
for (size_t i = 0; i < arraysize(kGetAsStringTestCases); ++i) {
URLPattern pattern(URLPattern::SCHEME_ALL);
EXPECT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse(kGetAsStringTestCases[i].pattern));
+ pattern.Parse(kGetAsStringTestCases[i].pattern,
+ URLPattern::PARSE_STRICT));
EXPECT_STREQ(kGetAsStringTestCases[i].pattern,
pattern.GetAsString().c_str());
}
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc
index f71de5c..a73b65b 100644
--- a/chrome/common/extensions/user_script.cc
+++ b/chrome/common/extensions/user_script.cc
@@ -41,16 +41,12 @@ const int UserScript::kValidUserScriptSchemes =
URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS |
URLPattern::SCHEME_FILE | URLPattern::SCHEME_FTP;
-bool UserScript::HasUserScriptFileExtension(const GURL& url) {
- return EndsWith(url.ExtractFileName(), kFileExtension, false);
+bool UserScript::IsURLUserScript(const GURL& url,
+ const std::string& mime_type) {
+ return EndsWith(url.ExtractFileName(), kFileExtension, false) &&
+ mime_type != "text/html";
}
-bool UserScript::HasUserScriptFileExtension(const FilePath& path) {
- static FilePath extension(FilePath().AppendASCII(kFileExtension));
- return EndsWith(path.BaseName().value(), extension.value(), false);
-}
-
-
UserScript::File::File(const FilePath& extension_root,
const FilePath& relative_path,
const GURL& url)
@@ -79,17 +75,17 @@ void UserScript::add_url_pattern(const URLPattern& pattern) {
void UserScript::clear_url_patterns() { url_patterns_.clear(); }
bool UserScript::MatchesUrl(const GURL& url) const {
- if (url_patterns_.size() > 0) {
+ if (!url_patterns_.empty()) {
if (!UrlMatchesPatterns(&url_patterns_, url))
return false;
}
- if (globs_.size() > 0) {
+ if (!globs_.empty()) {
if (!UrlMatchesGlobs(&globs_, url))
return false;
}
- if (exclude_globs_.size() > 0) {
+ if (!exclude_globs_.empty()) {
if (UrlMatchesGlobs(&exclude_globs_, url))
return false;
}
@@ -195,7 +191,8 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) {
std::string pattern_str;
URLPattern pattern(valid_schemes);
CHECK(pickle.ReadString(iter, &pattern_str));
- CHECK(URLPattern::PARSE_SUCCESS == pattern.Parse(pattern_str));
+ CHECK(URLPattern::PARSE_SUCCESS ==
+ pattern.Parse(pattern_str, URLPattern::PARSE_LENIENT));
url_patterns_.push_back(pattern);
}
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h
index 203fb62..3be2f11 100644
--- a/chrome/common/extensions/user_script.h
+++ b/chrome/common/extensions/user_script.h
@@ -29,9 +29,9 @@ class UserScript {
// The bitmask for valid user script injectable schemes used by URLPattern.
static const int kValidUserScriptSchemes;
- // Check if a file or URL has the user script file extension.
- static bool HasUserScriptFileExtension(const GURL& url);
- static bool HasUserScriptFileExtension(const FilePath& path);
+ // Check if a URL should be treated as a user script and converted to an
+ // extension.
+ static bool IsURLUserScript(const GURL& url, const std::string& mime_type);
// Locations that user scripts can be run inside the document.
enum RunLocation {
diff --git a/chrome/common/extensions/user_script_unittest.cc b/chrome/common/extensions/user_script_unittest.cc
index 297de7b..bec6436 100644
--- a/chrome/common/extensions/user_script_unittest.cc
+++ b/chrome/common/extensions/user_script_unittest.cc
@@ -71,7 +71,8 @@ TEST(ExtensionUserScriptTest, Match5) {
TEST(ExtensionUserScriptTest, Match6) {
URLPattern pattern(kAllSchemes);
- ASSERT_EQ(URLPattern::PARSE_SUCCESS, pattern.Parse("http://*/foo*"));
+ ASSERT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern.Parse("http://*/foo*", URLPattern::PARSE_STRICT));
UserScript script;
script.add_url_pattern(pattern);
@@ -87,7 +88,8 @@ TEST(ExtensionUserScriptTest, UrlPatternGlobInteraction) {
URLPattern pattern(kAllSchemes);
ASSERT_EQ(URLPattern::PARSE_SUCCESS,
- pattern.Parse("http://www.google.com/*"));
+ pattern.Parse("http://www.google.com/*",
+ URLPattern::PARSE_STRICT));
script.add_url_pattern(pattern);
script.add_glob("*bar*");
@@ -115,8 +117,10 @@ TEST(ExtensionUserScriptTest, UrlPatternGlobInteraction) {
TEST(ExtensionUserScriptTest, Pickle) {
URLPattern pattern1(kAllSchemes);
URLPattern pattern2(kAllSchemes);
- ASSERT_EQ(URLPattern::PARSE_SUCCESS, pattern1.Parse("http://*/foo*"));
- ASSERT_EQ(URLPattern::PARSE_SUCCESS, pattern2.Parse("http://bar/baz*"));
+ ASSERT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern1.Parse("http://*/foo*", URLPattern::PARSE_STRICT));
+ ASSERT_EQ(URLPattern::PARSE_SUCCESS,
+ pattern2.Parse("http://bar/baz*", URLPattern::PARSE_STRICT));
UserScript script1;
script1.js_scripts().push_back(UserScript::File(
diff --git a/chrome/common/file_system/file_system_dispatcher.cc b/chrome/common/file_system/file_system_dispatcher.cc
deleted file mode 100644
index 352deb3..0000000
--- a/chrome/common/file_system/file_system_dispatcher.cc
+++ /dev/null
@@ -1,277 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/file_system/file_system_dispatcher.h"
-
-#include "base/file_util.h"
-#include "chrome/common/child_thread.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
-
-FileSystemDispatcher::FileSystemDispatcher() {
-}
-
-FileSystemDispatcher::~FileSystemDispatcher() {
- // Make sure we fire all the remaining callbacks.
- for (IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer>::iterator
- iter(&dispatchers_); !iter.IsAtEnd(); iter.Advance()) {
- int request_id = iter.GetCurrentKey();
- fileapi::FileSystemCallbackDispatcher* dispatcher = iter.GetCurrentValue();
- DCHECK(dispatcher);
- dispatcher->DidFail(base::PLATFORM_FILE_ERROR_ABORT);
- dispatchers_.Remove(request_id);
- }
-}
-
-bool FileSystemDispatcher::OnMessageReceived(const IPC::Message& msg) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(FileSystemDispatcher, msg)
- IPC_MESSAGE_HANDLER(ViewMsg_OpenFileSystemRequest_Complete,
- OnOpenFileSystemRequestComplete)
- IPC_MESSAGE_HANDLER(ViewMsg_FileSystem_DidSucceed, DidSucceed)
- IPC_MESSAGE_HANDLER(ViewMsg_FileSystem_DidReadDirectory, DidReadDirectory)
- IPC_MESSAGE_HANDLER(ViewMsg_FileSystem_DidReadMetadata, DidReadMetadata)
- IPC_MESSAGE_HANDLER(ViewMsg_FileSystem_DidFail, DidFail)
- IPC_MESSAGE_HANDLER(ViewMsg_FileSystem_DidWrite, DidWrite)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-bool FileSystemDispatcher::OpenFileSystem(
- const GURL& origin_url, fileapi::FileSystemType type,
- long long size, bool create,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(new ViewHostMsg_OpenFileSystemRequest(
- request_id, origin_url, type, size, create))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::Move(
- const FilePath& src_path,
- const FilePath& dest_path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(new ViewHostMsg_FileSystem_Move(
- request_id, src_path, dest_path))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::Copy(
- const FilePath& src_path,
- const FilePath& dest_path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(new ViewHostMsg_FileSystem_Copy(
- request_id, src_path, dest_path))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::Remove(
- const FilePath& path,
- bool recursive,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(
- new ViewHostMsg_FileSystem_Remove(request_id, path, recursive))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::ReadMetadata(
- const FilePath& path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(
- new ViewHostMsg_FileSystem_ReadMetadata(request_id, path))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::Create(
- const FilePath& path,
- bool exclusive,
- bool is_directory,
- bool recursive,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(new ViewHostMsg_FileSystem_Create(
- request_id, path, exclusive, is_directory, recursive))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::Exists(
- const FilePath& path,
- bool is_directory,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(
- new ViewHostMsg_FileSystem_Exists(request_id, path, is_directory))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::ReadDirectory(
- const FilePath& path,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(
- new ViewHostMsg_FileSystem_ReadDirectory(request_id, path))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::Truncate(
- const FilePath& path,
- int64 offset,
- int* request_id_out,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(
- new ViewHostMsg_FileSystem_Truncate(request_id, path, offset))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- if (request_id_out)
- *request_id_out = request_id;
- return true;
-}
-
-bool FileSystemDispatcher::Write(
- const FilePath& path,
- const GURL& blob_url,
- int64 offset,
- int* request_id_out,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(
- new ViewHostMsg_FileSystem_Write(
- request_id, path, blob_url, offset))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- if (request_id_out)
- *request_id_out = request_id;
- return true;
-}
-
-bool FileSystemDispatcher::Cancel(
- int request_id_to_cancel,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(new ViewHostMsg_FileSystem_CancelWrite(
- request_id, request_id_to_cancel))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-bool FileSystemDispatcher::TouchFile(
- const FilePath& path,
- const base::Time& last_access_time,
- const base::Time& last_modified_time,
- fileapi::FileSystemCallbackDispatcher* dispatcher) {
- int request_id = dispatchers_.Add(dispatcher);
- if (!ChildThread::current()->Send(
- new ViewHostMsg_FileSystem_TouchFile(
- request_id, path, last_access_time, last_modified_time))) {
- dispatchers_.Remove(request_id); // destroys |dispatcher|
- return false;
- }
-
- return true;
-}
-
-void FileSystemDispatcher::OnOpenFileSystemRequestComplete(
- int request_id, bool accepted, const std::string& name,
- const FilePath& root_path) {
- fileapi::FileSystemCallbackDispatcher* dispatcher =
- dispatchers_.Lookup(request_id);
- DCHECK(dispatcher);
- if (accepted)
- dispatcher->DidOpenFileSystem(name, root_path);
- else
- dispatcher->DidFail(base::PLATFORM_FILE_ERROR_SECURITY);
- dispatchers_.Remove(request_id);
-}
-
-void FileSystemDispatcher::DidSucceed(int request_id) {
- fileapi::FileSystemCallbackDispatcher* dispatcher =
- dispatchers_.Lookup(request_id);
- DCHECK(dispatcher);
- dispatcher->DidSucceed();
- dispatchers_.Remove(request_id);
-}
-
-void FileSystemDispatcher::DidReadMetadata(
- int request_id, const base::PlatformFileInfo& file_info) {
- fileapi::FileSystemCallbackDispatcher* dispatcher =
- dispatchers_.Lookup(request_id);
- DCHECK(dispatcher);
- dispatcher->DidReadMetadata(file_info);
- dispatchers_.Remove(request_id);
-}
-
-void FileSystemDispatcher::DidReadDirectory(
- int request_id,
- const std::vector<base::FileUtilProxy::Entry>& entries,
- bool has_more) {
- fileapi::FileSystemCallbackDispatcher* dispatcher =
- dispatchers_.Lookup(request_id);
- DCHECK(dispatcher);
- dispatcher->DidReadDirectory(entries, has_more);
- dispatchers_.Remove(request_id);
-}
-
-void FileSystemDispatcher::DidFail(
- int request_id, base::PlatformFileError error_code) {
- fileapi::FileSystemCallbackDispatcher* dispatcher =
- dispatchers_.Lookup(request_id);
- DCHECK(dispatcher);
- dispatcher->DidFail(error_code);
- dispatchers_.Remove(request_id);
-}
-
-void FileSystemDispatcher::DidWrite(
- int request_id, int64 bytes, bool complete) {
- fileapi::FileSystemCallbackDispatcher* dispatcher =
- dispatchers_.Lookup(request_id);
- DCHECK(dispatcher);
- dispatcher->DidWrite(bytes, complete);
- if (complete)
- dispatchers_.Remove(request_id);
-}
diff --git a/chrome/common/file_system/file_system_dispatcher.h b/chrome/common/file_system/file_system_dispatcher.h
deleted file mode 100644
index bc84d2a..0000000
--- a/chrome/common/file_system/file_system_dispatcher.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_
-#define CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_
-
-#include <vector>
-
-#include "base/basictypes.h"
-#include "base/file_util_proxy.h"
-#include "base/id_map.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_message.h"
-#include "webkit/fileapi/file_system_callback_dispatcher.h"
-#include "webkit/fileapi/file_system_types.h"
-
-namespace base {
-struct PlatformFileInfo;
-}
-
-class FilePath;
-class GURL;
-
-// Dispatches and sends file system related messages sent to/from a child
-// process from/to the main browser process. There is one instance
-// per child process. Messages are dispatched on the main child thread.
-class FileSystemDispatcher : public IPC::Channel::Listener {
- public:
- FileSystemDispatcher();
- ~FileSystemDispatcher();
-
- // IPC::Channel::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& msg);
-
- bool OpenFileSystem(const GURL& origin_url,
- fileapi::FileSystemType type,
- long long size,
- bool create,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Move(const FilePath& src_path,
- const FilePath& dest_path,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Copy(const FilePath& src_path,
- const FilePath& dest_path,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Remove(const FilePath& path,
- bool recursive,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool ReadMetadata(const FilePath& path,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Create(const FilePath& path,
- bool exclusive,
- bool is_directory,
- bool recursive,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Exists(const FilePath& path,
- bool for_directory,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool ReadDirectory(const FilePath& path,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Truncate(const FilePath& path,
- int64 offset,
- int* request_id_out,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Write(const FilePath& path,
- const GURL& blob_url,
- int64 offset,
- int* request_id_out,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool Cancel(int request_id_to_cancel,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
- bool TouchFile(const FilePath& file_path,
- const base::Time& last_access_time,
- const base::Time& last_modified_time,
- fileapi::FileSystemCallbackDispatcher* dispatcher);
-
- private:
- // Message handler for OpenFileSystem.
- void OnOpenFileSystemRequestComplete(
- int request_id,
- bool accepted,
- const std::string& name,
- const FilePath& root_path);
-
- // Message handlers for regular file system operations.
- void DidSucceed(int request_id);
- void DidReadMetadata(int request_id,
- const base::PlatformFileInfo& file_info);
- void DidReadDirectory(
- int request_id,
- const std::vector<base::FileUtilProxy::Entry>& entries,
- bool has_more);
- void DidFail(int request_id, base::PlatformFileError error_code);
- void DidWrite(int request_id, int64 bytes, bool complete);
-
- IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_;
-
- DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher);
-};
-
-#endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_
diff --git a/chrome/common/file_system/file_system_dispatcher_dummy.cc b/chrome/common/file_system/file_system_dispatcher_dummy.cc
deleted file mode 100644
index a7c8c71..0000000
--- a/chrome/common/file_system/file_system_dispatcher_dummy.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/file_system/file_system_dispatcher.h"
-
-#include "base/compiler_specific.h"
-
-// FileSystemDispatcher --------------------------------------------------------
-
-FileSystemDispatcher::FileSystemDispatcher() {
-}
-
-FileSystemDispatcher::~FileSystemDispatcher() {
-}
-
-// FileSystemDispatcher implementation -----------------------------------------
-
-bool FileSystemDispatcher::OnMessageReceived(const IPC::Message& message) {
- return false;
-}
diff --git a/chrome/common/file_system/webfilesystem_callback_dispatcher.cc b/chrome/common/file_system/webfilesystem_callback_dispatcher.cc
deleted file mode 100644
index f549ade..0000000
--- a/chrome/common/file_system/webfilesystem_callback_dispatcher.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/file_system/webfilesystem_callback_dispatcher.h"
-
-#include <string>
-#include <vector>
-
-#include "base/file_util_proxy.h"
-#include "base/logging.h"
-#include "base/utf_string_conversions.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
-#include "webkit/glue/webkit_glue.h"
-
-using WebKit::WebFileInfo;
-using WebKit::WebFileSystemCallbacks;
-using WebKit::WebFileSystemEntry;
-using WebKit::WebString;
-using WebKit::WebVector;
-
-WebFileSystemCallbackDispatcher::WebFileSystemCallbackDispatcher(
- WebFileSystemCallbacks* callbacks)
- : callbacks_(callbacks) {
- DCHECK(callbacks_);
-}
-
-void WebFileSystemCallbackDispatcher::DidSucceed() {
- callbacks_->didSucceed();
-}
-
-void WebFileSystemCallbackDispatcher::DidReadMetadata(
- const base::PlatformFileInfo& file_info) {
- WebFileInfo web_file_info;
- web_file_info.modificationTime = file_info.last_modified.ToDoubleT();
- web_file_info.length = file_info.size;
- if (file_info.is_directory)
- web_file_info.type = WebFileInfo::TypeDirectory;
- else
- web_file_info.type = WebFileInfo::TypeFile;
- callbacks_->didReadMetadata(web_file_info);
-}
-
-void WebFileSystemCallbackDispatcher::DidReadDirectory(
- const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) {
- WebVector<WebFileSystemEntry> file_system_entries(entries.size());
- for (size_t i = 0; i < entries.size(); i++) {
- file_system_entries[i].name =
- webkit_glue::FilePathStringToWebString(entries[i].name);
- file_system_entries[i].isDirectory = entries[i].is_directory;
- }
- callbacks_->didReadDirectory(file_system_entries, has_more);
-}
-
-void WebFileSystemCallbackDispatcher::DidOpenFileSystem(
- const std::string& name, const FilePath& root_path) {
- callbacks_->didOpenFileSystem(UTF8ToUTF16(name),
- webkit_glue::FilePathToWebString(root_path));
-}
-
-void WebFileSystemCallbackDispatcher::DidFail(
- base::PlatformFileError error_code) {
- callbacks_->didFail(
- webkit_glue::PlatformFileErrorToWebFileError(error_code));
-}
-
-void WebFileSystemCallbackDispatcher::DidWrite(int64 bytes, bool complete) {
- NOTREACHED();
-}
diff --git a/chrome/common/file_system/webfilesystem_callback_dispatcher.h b/chrome/common/file_system/webfilesystem_callback_dispatcher.h
deleted file mode 100644
index dc570fa..0000000
--- a/chrome/common/file_system/webfilesystem_callback_dispatcher.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_FILE_SYSTEM_WEBFILESYSTEM_CALLBACK_DISPATCHER_H_
-#define CHROME_COMMON_FILE_SYSTEM_WEBFILESYSTEM_CALLBACK_DISPATCHER_H_
-
-#include "base/basictypes.h"
-#include "base/platform_file.h"
-#include "webkit/fileapi/file_system_callback_dispatcher.h"
-
-namespace WebKit {
-class WebFileSystemCallbacks;
-}
-
-class WebFileSystemCallbackDispatcher
- : public fileapi::FileSystemCallbackDispatcher {
- public:
- explicit WebFileSystemCallbackDispatcher(
- WebKit::WebFileSystemCallbacks* callbacks);
-
- // FileSystemCallbackDispatcher implementation
- virtual void DidSucceed();
- virtual void DidReadMetadata(const base::PlatformFileInfo& file_info);
- virtual void DidReadDirectory(
- const std::vector<base::FileUtilProxy::Entry>& entries,
- bool has_more);
- virtual void DidOpenFileSystem(const std::string&,
- const FilePath&);
- virtual void DidFail(base::PlatformFileError);
- virtual void DidWrite(int64 bytes, bool complete);
-
- private:
- WebKit::WebFileSystemCallbacks* callbacks_;
-};
-
-#endif // CHROME_COMMON_FILE_SYSTEM_WEBFILESYSTEM_CALLBACK_DISPATCHER_H_
diff --git a/chrome/common/file_system/webfilesystem_impl.cc b/chrome/common/file_system/webfilesystem_impl.cc
deleted file mode 100644
index 9f5a0ea..0000000
--- a/chrome/common/file_system/webfilesystem_impl.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/file_system/webfilesystem_impl.h"
-
-#include "chrome/common/file_system/file_system_dispatcher.h"
-#include "chrome/common/file_system/webfilesystem_callback_dispatcher.h"
-#include "chrome/common/file_system/webfilewriter_impl.h"
-#include "chrome/common/child_thread.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
-#include "webkit/glue/webkit_glue.h"
-
-using WebKit::WebFileInfo;
-using WebKit::WebFileSystemCallbacks;
-using WebKit::WebFileSystemEntry;
-using WebKit::WebString;
-using WebKit::WebVector;
-
-WebFileSystemImpl::WebFileSystemImpl() {
-}
-
-void WebFileSystemImpl::move(const WebString& src_path,
- const WebString& dest_path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Move(webkit_glue::WebStringToFilePath(src_path),
- webkit_glue::WebStringToFilePath(dest_path),
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::copy(const WebString& src_path,
- const WebString& dest_path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Copy(webkit_glue::WebStringToFilePath(src_path),
- webkit_glue::WebStringToFilePath(dest_path),
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::remove(const WebString& path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Remove(webkit_glue::WebStringToFilePath(path),
- false /* recursive */,
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::removeRecursively(const WebString& path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Remove(webkit_glue::WebStringToFilePath(path),
- true /* recursive */,
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::readMetadata(const WebString& path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->ReadMetadata(webkit_glue::WebStringToFilePath(path),
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::createFile(const WebString& path,
- bool exclusive,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Create(webkit_glue::WebStringToFilePath(path), exclusive, false,
- false, new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::createDirectory(const WebString& path,
- bool exclusive,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Create(webkit_glue::WebStringToFilePath(path), exclusive, true,
- false, new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::fileExists(const WebString& path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Exists(webkit_glue::WebStringToFilePath(path), false,
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::directoryExists(const WebString& path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->Exists(webkit_glue::WebStringToFilePath(path), true,
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-void WebFileSystemImpl::readDirectory(const WebString& path,
- WebFileSystemCallbacks* callbacks) {
- FileSystemDispatcher* dispatcher =
- ChildThread::current()->file_system_dispatcher();
- dispatcher->ReadDirectory(webkit_glue::WebStringToFilePath(path),
- new WebFileSystemCallbackDispatcher(callbacks));
-}
-
-WebKit::WebFileWriter* WebFileSystemImpl::createFileWriter(
- const WebString& path, WebKit::WebFileWriterClient* client) {
- return new WebFileWriterImpl(path, client);
-}
diff --git a/chrome/common/file_system/webfilesystem_impl.h b/chrome/common/file_system/webfilesystem_impl.h
deleted file mode 100644
index 9aad3f5..0000000
--- a/chrome/common/file_system/webfilesystem_impl.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_FILE_SYSTEM_WEBFILESYSTEM_IMPL_H_
-#define CHROME_COMMON_FILE_SYSTEM_WEBFILESYSTEM_IMPL_H_
-
-#include "base/basictypes.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
-
-namespace WebKit {
-class WebFileWriter;
-class WebFileWriterClient;
-}
-
-class WebFileSystemImpl : public WebKit::WebFileSystem {
- public:
- WebFileSystemImpl();
- virtual ~WebFileSystemImpl() { }
-
- virtual void move(
- const WebKit::WebString& src_path,
- const WebKit::WebString& dest_path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void copy(
- const WebKit::WebString& src_path,
- const WebKit::WebString& dest_path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void remove(
- const WebKit::WebString& path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void removeRecursively(
- const WebKit::WebString& path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void readMetadata(
- const WebKit::WebString& path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void createFile(
- const WebKit::WebString& path,
- bool exclusive,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void createDirectory(
- const WebKit::WebString& path,
- bool exclusive,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void fileExists(
- const WebKit::WebString& path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void directoryExists(
- const WebKit::WebString& path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual void readDirectory(
- const WebKit::WebString& path,
- WebKit::WebFileSystemCallbacks*);
-
- virtual WebKit::WebFileWriter* createFileWriter(
- const WebKit::WebString& path, WebKit::WebFileWriterClient*);
-};
-
-#endif // CHROME_COMMON_FILE_SYSTEM_WEBFILESYSTEM_IMPL_H_
diff --git a/chrome/common/file_system/webfilewriter_impl.cc b/chrome/common/file_system/webfilewriter_impl.cc
deleted file mode 100644
index 7fc2656..0000000
--- a/chrome/common/file_system/webfilewriter_impl.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/file_system/webfilewriter_impl.h"
-
-#include "chrome/common/child_thread.h"
-#include "chrome/common/file_system/file_system_dispatcher.h"
-
-namespace {
-
-inline FileSystemDispatcher* GetFileSystemDispatcher() {
- return ChildThread::current()->file_system_dispatcher();
-}
-}
-
-class WebFileWriterImpl::CallbackDispatcher
- : public fileapi::FileSystemCallbackDispatcher {
- public:
- explicit CallbackDispatcher(
- const base::WeakPtr<WebFileWriterImpl>& writer) : writer_(writer) {
- }
- virtual ~CallbackDispatcher() {
- }
-
- virtual void DidReadMetadata(const base::PlatformFileInfo&) {
- NOTREACHED();
- }
- virtual void DidReadDirectory(
- const std::vector<base::FileUtilProxy::Entry>& entries,
- bool has_more) {
- NOTREACHED();
- }
- virtual void DidOpenFileSystem(const std::string& name,
- const FilePath& root_path) {
- NOTREACHED();
- }
- virtual void DidSucceed() {
- if (writer_)
- writer_->DidSucceed();
- }
- virtual void DidFail(base::PlatformFileError error_code) {
- if (writer_)
- writer_->DidFail(error_code);
- }
- virtual void DidWrite(int64 bytes, bool complete) {
- if (writer_)
- writer_->DidWrite(bytes, complete);
- }
-
- private:
- base::WeakPtr<WebFileWriterImpl> writer_;
-};
-
-WebFileWriterImpl::WebFileWriterImpl(
- const WebKit::WebString& path, WebKit::WebFileWriterClient* client)
- : WebFileWriterBase(path, client),
- request_id_(0) {
-}
-
-WebFileWriterImpl::~WebFileWriterImpl() {
-}
-
-void WebFileWriterImpl::DoTruncate(const FilePath& path, int64 offset) {
- // The FileSystemDispatcher takes ownership of the CallbackDispatcher.
- GetFileSystemDispatcher()->Truncate(path, offset, &request_id_,
- new CallbackDispatcher(AsWeakPtr()));
-}
-
-void WebFileWriterImpl::DoWrite(
- const FilePath& path, const GURL& blob_url, int64 offset) {
- GetFileSystemDispatcher()->Write(path, blob_url, offset, &request_id_,
- new CallbackDispatcher(AsWeakPtr()));
-}
-
-void WebFileWriterImpl::DoCancel() {
- GetFileSystemDispatcher()->Cancel(request_id_,
- new CallbackDispatcher(AsWeakPtr()));
-}
diff --git a/chrome/common/file_system/webfilewriter_impl.h b/chrome/common/file_system/webfilewriter_impl.h
deleted file mode 100644
index 9c9edb5..0000000
--- a/chrome/common/file_system/webfilewriter_impl.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_FILE_SYSTEM_WEBFILEWRITER_IMPL_H_
-#define CHROME_COMMON_FILE_SYSTEM_WEBFILEWRITER_IMPL_H_
-
-#include "base/ref_counted.h"
-#include "base/weak_ptr.h"
-#include "webkit/fileapi/webfilewriter_base.h"
-
-class FileSystemDispatcher;
-
-// An implementation of WebFileWriter for use in chrome renderers and workers.
-class WebFileWriterImpl : public fileapi::WebFileWriterBase,
- public base::SupportsWeakPtr<WebFileWriterImpl> {
- public:
- WebFileWriterImpl(
- const WebKit::WebString& path, WebKit::WebFileWriterClient* client);
- virtual ~WebFileWriterImpl();
-
- protected:
- // WebFileWriterBase overrides
- virtual void DoTruncate(const FilePath& path, int64 offset);
- virtual void DoWrite(const FilePath& path, const GURL& blob_url,
- int64 offset);
- virtual void DoCancel();
-
- private:
- class CallbackDispatcher;
- int request_id_;
-};
-
-#endif // CHROME_COMMON_FILE_SYSTEM_WEBFILEWRITER_IMPL_H_
diff --git a/chrome/common/file_utilities_messages.cc b/chrome/common/file_utilities_messages.cc
deleted file mode 100644
index b1236ae..0000000
--- a/chrome/common/file_utilities_messages.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/common_param_traits.h"
-
-#define IPC_MESSAGE_IMPL
-#include "chrome/common/file_utilities_messages.h"
diff --git a/chrome/common/file_utilities_messages.h b/chrome/common/file_utilities_messages.h
index 6b8157d..eb35263 100644
--- a/chrome/common/file_utilities_messages.h
+++ b/chrome/common/file_utilities_messages.h
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_FILE_UTILITIES_MESSAGES_H_
-#define CHROME_COMMON_FILE_UTILITIES_MESSAGES_H_
-#pragma once
+// Multiply-included message file, so no include guard.
#include "base/time.h"
+#include "chrome/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
#include "ipc/ipc_platform_file.h"
@@ -32,4 +31,3 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FileUtilitiesMsg_OpenFile,
int /* mode */,
IPC::PlatformFileForTransit /* result */)
-#endif // CHROME_COMMON_FILE_UTILITIES_MESSAGES_H_
diff --git a/chrome/common/gpu_feature_flags.cc b/chrome/common/gpu_feature_flags.cc
index 12b857b..40e5775 100644
--- a/chrome/common/gpu_feature_flags.cc
+++ b/chrome/common/gpu_feature_flags.cc
@@ -11,6 +11,7 @@ const char GpuFeatureFlags::kGpuFeatureNameAccelerated2dCanvas[] =
const char GpuFeatureFlags::kGpuFeatureNameAcceleratedCompositing[] =
"accelerated_compositing";
const char GpuFeatureFlags::kGpuFeatureNameWebgl[] = "webgl";
+const char GpuFeatureFlags::kGpuFeatureNameMultisampling[] = "multisampling";
const char GpuFeatureFlags::kGpuFeatureNameAll[] = "all";
GpuFeatureFlags::GpuFeatureFlags()
@@ -38,6 +39,8 @@ GpuFeatureFlags::GpuFeatureType GpuFeatureFlags::StringToGpuFeatureType(
return kGpuFeatureAcceleratedCompositing;
else if (feature_string == kGpuFeatureNameWebgl)
return kGpuFeatureWebgl;
+ else if (feature_string == kGpuFeatureNameMultisampling)
+ return kGpuFeatureMultisampling;
else if (feature_string == kGpuFeatureNameAll)
return kGpuFeatureAll;
return kGpuFeatureUnknown;
diff --git a/chrome/common/gpu_feature_flags.h b/chrome/common/gpu_feature_flags.h
index 5b9d3ed..a8a8b2a 100644
--- a/chrome/common/gpu_feature_flags.h
+++ b/chrome/common/gpu_feature_flags.h
@@ -19,9 +19,11 @@ class GpuFeatureFlags {
kGpuFeatureAccelerated2dCanvas = 1 << 0,
kGpuFeatureAcceleratedCompositing = 1 << 1,
kGpuFeatureWebgl = 1 << 2,
+ kGpuFeatureMultisampling = 1 << 3,
kGpuFeatureAll = kGpuFeatureAccelerated2dCanvas |
kGpuFeatureAcceleratedCompositing |
- kGpuFeatureWebgl,
+ kGpuFeatureWebgl |
+ kGpuFeatureMultisampling,
kGpuFeatureUnknown = 0
};
@@ -41,6 +43,7 @@ class GpuFeatureFlags {
// "accelerated_2d_canvas"
// "accelerated_compositing"
// "webgl"
+ // "multisampling"
static GpuFeatureType StringToGpuFeatureType(
const std::string& feature_string);
@@ -48,6 +51,7 @@ class GpuFeatureFlags {
static const char kGpuFeatureNameAccelerated2dCanvas[];
static const char kGpuFeatureNameAcceleratedCompositing[];
static const char kGpuFeatureNameWebgl[];
+ static const char kGpuFeatureNameMultisampling[];
static const char kGpuFeatureNameAll[];
// If a bit is set to 1, corresponding feature is blacklisted.
diff --git a/chrome/common/gpu_feature_flags_unittest.cc b/chrome/common/gpu_feature_flags_unittest.cc
index 1bd8f40..e51649b 100644
--- a/chrome/common/gpu_feature_flags_unittest.cc
+++ b/chrome/common/gpu_feature_flags_unittest.cc
@@ -34,7 +34,8 @@ TEST(GpuFeatureFlagsTest, GpuFeatureFlagsBasic) {
static_cast<uint32>(
GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas |
GpuFeatureFlags::kGpuFeatureAcceleratedCompositing |
- GpuFeatureFlags::kGpuFeatureWebgl));
+ GpuFeatureFlags::kGpuFeatureWebgl |
+ GpuFeatureFlags::kGpuFeatureMultisampling));
// Test StringToGpuFeatureType.
EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("accelerated_2d_canvas"),
@@ -43,6 +44,8 @@ TEST(GpuFeatureFlagsTest, GpuFeatureFlagsBasic) {
GpuFeatureFlags::kGpuFeatureAcceleratedCompositing);
EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("webgl"),
GpuFeatureFlags::kGpuFeatureWebgl);
+ EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("multisampling"),
+ GpuFeatureFlags::kGpuFeatureMultisampling);
EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("all"),
GpuFeatureFlags::kGpuFeatureAll);
EXPECT_EQ(GpuFeatureFlags::StringToGpuFeatureType("xxx"),
diff --git a/chrome/common/gpu_info.cc b/chrome/common/gpu_info.cc
index ff9caae..07b2461 100644
--- a/chrome/common/gpu_info.cc
+++ b/chrome/common/gpu_info.cc
@@ -10,6 +10,7 @@ GPUInfo::GPUInfo()
device_id_(0),
driver_vendor_(""),
driver_version_(""),
+ driver_date_(""),
pixel_shader_version_(0),
vertex_shader_version_(0),
gl_version_(0),
@@ -17,7 +18,8 @@ GPUInfo::GPUInfo()
gl_vendor_(""),
gl_renderer_(""),
gl_extensions_(""),
- can_lose_context_(false) {
+ can_lose_context_(false),
+ collection_error_(false) {
}
GPUInfo::~GPUInfo() {}
@@ -46,6 +48,10 @@ std::string GPUInfo::driver_version() const {
return driver_version_;
}
+std::string GPUInfo::driver_date() const {
+ return driver_date_;
+}
+
uint32 GPUInfo::pixel_shader_version() const {
return pixel_shader_version_;
}
@@ -78,6 +84,10 @@ bool GPUInfo::can_lose_context() const {
return can_lose_context_;
}
+bool GPUInfo::collection_error() const {
+ return collection_error_;
+}
+
void GPUInfo::SetLevel(Level level) {
level_ = level;
}
@@ -93,9 +103,14 @@ void GPUInfo::SetVideoCardInfo(uint32 vendor_id, uint32 device_id) {
}
void GPUInfo::SetDriverInfo(const std::string& driver_vendor,
- const std::string& driver_version) {
- driver_vendor_ = driver_vendor;
- driver_version_ = driver_version;
+ const std::string& driver_version,
+ const std::string& driver_date) {
+ if (driver_vendor.length() > 0)
+ driver_vendor_ = driver_vendor;
+ if (driver_version.length() > 0)
+ driver_version_ = driver_version;
+ if (driver_date.length() > 0)
+ driver_date_ = driver_date;
}
void GPUInfo::SetShaderVersion(uint32 pixel_shader_version,
@@ -128,6 +143,10 @@ void GPUInfo::SetCanLoseContext(bool can_lose_context) {
can_lose_context_ = can_lose_context;
}
+void GPUInfo::SetCollectionError(bool collection_error) {
+ collection_error_ = collection_error;
+}
+
#if defined(OS_WIN)
const DxDiagNode& GPUInfo::dx_diagnostics() const {
return dx_diagnostics_;
diff --git a/chrome/common/gpu_info.h b/chrome/common/gpu_info.h
index 3b8e0e6..9593f56 100644
--- a/chrome/common/gpu_info.h
+++ b/chrome/common/gpu_info.h
@@ -24,6 +24,7 @@ class GPUInfo {
enum Level {
kUninitialized,
+ kPreliminary,
kPartial,
kCompleting,
kComplete,
@@ -50,6 +51,9 @@ class GPUInfo {
// Return the version of the graphics driver currently installed.
std::string driver_version() const;
+ // Return the date of the graphics driver currently installed.
+ std::string driver_date() const;
+
// Return the version of the pixel/fragment shader used by the gpu.
// Major version in the second lowest 8 bits, minor in the lowest 8 bits,
// eg version 2.5 would be 0x00000205.
@@ -88,6 +92,11 @@ class GPUInfo {
// semantics are available.
bool can_lose_context() const;
+ // Return true if there was an error at any stage of collecting GPUInfo data.
+ // If there was an error, then the GPUInfo fields may be incomplete or set
+ // to default values such as 0 or empty string.
+ bool collection_error() const;
+
void SetLevel(Level level);
void SetInitializationTime(const base::TimeDelta& initialization_time);
@@ -95,7 +104,8 @@ class GPUInfo {
void SetVideoCardInfo(uint32 vendor_id, uint32 device_id);
void SetDriverInfo(const std::string& driver_vendor,
- const std::string& driver_version);
+ const std::string& driver_version,
+ const std::string& driver_date);
void SetShaderVersion(uint32 pixel_shader_version,
uint32 vertex_shader_version);
@@ -112,6 +122,8 @@ class GPUInfo {
void SetCanLoseContext(bool can_lose_context);
+ void SetCollectionError(bool collection_error);
+
#if defined(OS_WIN)
// The information returned by the DirectX Diagnostics Tool.
const DxDiagNode& dx_diagnostics() const;
@@ -126,6 +138,7 @@ class GPUInfo {
uint32 device_id_;
std::string driver_vendor_;
std::string driver_version_;
+ std::string driver_date_;
uint32 pixel_shader_version_;
uint32 vertex_shader_version_;
uint32 gl_version_;
@@ -134,6 +147,7 @@ class GPUInfo {
std::string gl_renderer_;
std::string gl_extensions_;
bool can_lose_context_;
+ bool collection_error_;
#if defined(OS_WIN)
DxDiagNode dx_diagnostics_;
diff --git a/chrome/common/gpu_info_unittest.cc b/chrome/common/gpu_info_unittest.cc
index 34630e8..c1a5dce 100644
--- a/chrome/common/gpu_info_unittest.cc
+++ b/chrome/common/gpu_info_unittest.cc
@@ -14,6 +14,7 @@ TEST(GPUInfoBasicTest, EmptyGPUInfo) {
EXPECT_EQ(gpu_info.device_id(), 0u);
EXPECT_EQ(gpu_info.driver_vendor(), "");
EXPECT_EQ(gpu_info.driver_version(), "");
+ EXPECT_EQ(gpu_info.driver_date(), "");
EXPECT_EQ(gpu_info.pixel_shader_version(), 0u);
EXPECT_EQ(gpu_info.vertex_shader_version(), 0u);
EXPECT_EQ(gpu_info.gl_version(), 0u);
diff --git a/chrome/common/gpu_messages.cc b/chrome/common/gpu_messages.cc
index b46babe..a5b1550 100644
--- a/chrome/common/gpu_messages.cc
+++ b/chrome/common/gpu_messages.cc
@@ -134,6 +134,7 @@ void ParamTraits<GPUInfo> ::Write(Message* m, const param_type& p) {
WriteParam(m, p.device_id());
WriteParam(m, p.driver_vendor());
WriteParam(m, p.driver_version());
+ WriteParam(m, p.driver_date());
WriteParam(m, p.pixel_shader_version());
WriteParam(m, p.vertex_shader_version());
WriteParam(m, p.gl_version());
@@ -155,6 +156,7 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
uint32 device_id;
std::string driver_vendor;
std::string driver_version;
+ std::string driver_date;
uint32 pixel_shader_version;
uint32 vertex_shader_version;
uint32 gl_version;
@@ -169,6 +171,7 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
ret = ret && ReadParam(m, iter, &device_id);
ret = ret && ReadParam(m, iter, &driver_vendor);
ret = ret && ReadParam(m, iter, &driver_version);
+ ret = ret && ReadParam(m, iter, &driver_date);
ret = ret && ReadParam(m, iter, &pixel_shader_version);
ret = ret && ReadParam(m, iter, &vertex_shader_version);
ret = ret && ReadParam(m, iter, &gl_version);
@@ -183,7 +186,7 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
p->SetInitializationTime(initialization_time);
p->SetVideoCardInfo(vendor_id, device_id);
- p->SetDriverInfo(driver_vendor, driver_version);
+ p->SetDriverInfo(driver_vendor, driver_version, driver_date);
p->SetShaderVersion(pixel_shader_version, vertex_shader_version);
p->SetGLVersion(gl_version);
p->SetGLVersionString(gl_version_string);
@@ -204,7 +207,7 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
}
void ParamTraits<GPUInfo> ::Log(const param_type& p, std::string* l) {
- l->append(base::StringPrintf("<GPUInfo> %d %d %x %x %s %s %x %x %x %d",
+ l->append(base::StringPrintf("<GPUInfo> %d %d %x %x %s %s %s %x %x %x %d",
p.level(),
static_cast<int32>(
p.initialization_time().InMilliseconds()),
@@ -212,6 +215,7 @@ void ParamTraits<GPUInfo> ::Log(const param_type& p, std::string* l) {
p.device_id(),
p.driver_vendor().c_str(),
p.driver_version().c_str(),
+ p.driver_date().c_str(),
p.pixel_shader_version(),
p.vertex_shader_version(),
p.gl_version(),
diff --git a/chrome/common/gpu_messages_internal.h b/chrome/common/gpu_messages_internal.h
index 635362a..eecc12e 100644
--- a/chrome/common/gpu_messages_internal.h
+++ b/chrome/common/gpu_messages_internal.h
@@ -142,7 +142,7 @@ IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
// Response from GPU to a GpuMsg_Synchronize message.
IPC_MESSAGE_CONTROL0(GpuHostMsg_SynchronizeReply)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) && !defined(TOUCH_UI)
// Resize the window that is being drawn into. It's important that this
// resize be synchronized with the swapping of the front and back buffers.
IPC_SYNC_MESSAGE_CONTROL2_1(GpuHostMsg_ResizeXID,
@@ -173,6 +173,13 @@ IPC_MESSAGE_CONTROL2(GpuHostMsg_ScheduleComposite,
// GPU Channel Messages
// These are messages from a renderer process to the GPU process.
+// Initialize a channel between a renderer process and a GPU process. The
+// renderer passes its process handle to the GPU process, which gives gives the
+// GPU process the ability to map handles from the renderer process. This must
+// be the first message sent on a newly connected channel.
+IPC_MESSAGE_CONTROL1(GpuChannelMsg_Initialize,
+ base::ProcessHandle /* renderer_process_for_gpu */)
+
// Tells the GPU process to create a new command buffer that renders to an
// offscreen frame buffer. If parent_route_id is not zero, the texture backing
// the frame buffer is mapped into the corresponding parent command buffer's
@@ -212,9 +219,10 @@ IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyVideoDecoder,
// Initialize a command buffer with the given number of command entries.
// Returns the shared memory handle for the command buffer mapped to the
// calling process.
-IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_Initialize,
+IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_Initialize,
+ base::SharedMemoryHandle /* ring_buffer */,
int32 /* size */,
- base::SharedMemoryHandle /* ring_buffer */)
+ bool /* result */)
// Get the current state of the command buffer.
IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetState,
@@ -251,6 +259,13 @@ IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateTransferBuffer,
int32 /* size */,
int32 /* id */)
+// Register an existing shared memory transfer buffer. Returns an id that can be
+// used to identify the transfer buffer from a command buffer.
+IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_RegisterTransferBuffer,
+ base::SharedMemoryHandle /* transfer_buffer */,
+ size_t /* size */,
+ int32 /* id */)
+
// Destroy a previously created transfer buffer.
IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyTransferBuffer,
int32 /* id */)
diff --git a/chrome/common/gpu_messages_unittest.cc b/chrome/common/gpu_messages_unittest.cc
index 4e2da79..052c144 100644
--- a/chrome/common/gpu_messages_unittest.cc
+++ b/chrome/common/gpu_messages_unittest.cc
@@ -16,7 +16,7 @@ TEST(GPUIPCMessageTest, GPUInfo) {
input.SetLevel(GPUInfo::kPartial);
input.SetInitializationTime(base::TimeDelta::FromMilliseconds(100));
input.SetVideoCardInfo(0x10de, 0x0658);
- input.SetDriverInfo("NVIDIA", "195.36.24");
+ input.SetDriverInfo("NVIDIA", "195.36.24", "7-14-2009");
input.SetShaderVersion(0x0162, 0x0162);
input.SetGLVersion(0x0302);
input.SetGLVersionString("3.2.0 NVIDIA 195.36.24");
@@ -38,6 +38,7 @@ TEST(GPUIPCMessageTest, GPUInfo) {
EXPECT_EQ(input.device_id(), output.device_id());
EXPECT_EQ(input.driver_vendor(), output.driver_vendor());
EXPECT_EQ(input.driver_version(), output.driver_version());
+ EXPECT_EQ(input.driver_date(), output.driver_date());
EXPECT_EQ(input.pixel_shader_version(), output.pixel_shader_version());
EXPECT_EQ(input.vertex_shader_version(), output.vertex_shader_version());
EXPECT_EQ(input.gl_version(), output.gl_version());
@@ -49,6 +50,7 @@ TEST(GPUIPCMessageTest, GPUInfo) {
std::string log_message;
IPC::LogParam(output, &log_message);
- EXPECT_STREQ("<GPUInfo> 1 100 10de 658 NVIDIA 195.36.24 162 162 302 0",
+ EXPECT_STREQ("<GPUInfo> 2 100 10de 658 NVIDIA "
+ "195.36.24 7-14-2009 162 162 302 0",
log_message.c_str());
}
diff --git a/chrome/common/gpu_plugin.cc b/chrome/common/gpu_plugin.cc
deleted file mode 100644
index fd4c680..0000000
--- a/chrome/common/gpu_plugin.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/gpu_plugin.h"
-
-#include "base/command_line.h"
-#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
-#include "chrome/common/chrome_switches.h"
-#include "gpu/gpu_plugin/gpu_plugin.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-
-namespace chrome {
-
-void RegisterInternalGPUPlugin() {
-#if defined(ENABLE_GPU)
- const webkit::npapi::PluginEntryPoints entry_points = {
-#if !defined(OS_POSIX) || defined(OS_MACOSX)
- gpu_plugin::NP_GetEntryPoints,
-#endif
- gpu_plugin::NP_Initialize,
- gpu_plugin::NP_Shutdown
- };
-
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableGPUPlugin))
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(
- FilePath(FILE_PATH_LITERAL("gpu-plugin")),
- "GPU Plug-in",
- "GPU Rendering Plug-in",
- "application/vnd.google.chrome.gpu-plugin",
- entry_points);
-#endif // ENABLE_GPU
-}
-
-} // namespace chrome
diff --git a/chrome/common/gpu_plugin.h b/chrome/common/gpu_plugin.h
deleted file mode 100644
index 938cbc2..0000000
--- a/chrome/common/gpu_plugin.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_GPU_PLUGIN_H_
-#define CHROME_COMMON_GPU_PLUGIN_H_
-#pragma once
-
-namespace chrome {
-
-// Register the GPU plugin as an internal plugin in the PluginList.
-void RegisterInternalGPUPlugin();
-
-} // namespace chrome
-
-#endif // CHROME_COMMON_GPU_PLUGIN_H_
diff --git a/chrome/common/indexed_db_messages.h b/chrome/common/indexed_db_messages.h
index 4203f61..814a8e6 100644
--- a/chrome/common/indexed_db_messages.h
+++ b/chrome/common/indexed_db_messages.h
@@ -34,6 +34,18 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryOpen_Params)
IPC_STRUCT_MEMBER(uint64, maximum_size)
IPC_STRUCT_END()
+// Used to delete an indexed database.
+IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryDeleteDatabase_Params)
+ // The routing ID of the view initiating the deletion.
+ IPC_STRUCT_MEMBER(int32, routing_id)
+ // The response should have this id.
+ IPC_STRUCT_MEMBER(int32, response_id)
+ // The origin doing the initiating.
+ IPC_STRUCT_MEMBER(string16, origin)
+ // The name of the database.
+ IPC_STRUCT_MEMBER(string16, name)
+IPC_STRUCT_END()
+
// Used to create an object store.
IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
// The name of the object store.
@@ -157,6 +169,9 @@ IPC_MESSAGE_CONTROL1(IndexedDBMsg_TransactionCallbacksComplete,
IPC_MESSAGE_CONTROL1(IndexedDBMsg_TransactionCallbacksTimeout,
int32 /* transaction_id */)
+IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksVersionChange,
+ int32, /* database_id */
+ string16) /* new_version */
// Indexed DB messages sent from the renderer to the browser.
@@ -170,6 +185,11 @@ IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_CursorKey,
int32, /* idb_cursor_id */
IndexedDBKey /* key */)
+// WebIDBCursor::primaryKey() message.
+IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_CursorPrimaryKey,
+ int32, /* idb_cursor_id */
+ IndexedDBKey /* primary_key */)
+
// WebIDBCursor::value() message.
IPC_SYNC_MESSAGE_CONTROL1_2(IndexedDBHostMsg_CursorValue,
int32, /* idb_cursor_id */
@@ -200,6 +220,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(IndexedDBHostMsg_CursorDelete,
IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryOpen,
IndexedDBHostMsg_FactoryOpen_Params)
+// WebIDBFactory::deleteDatabase() message.
+IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryDeleteDatabase,
+ IndexedDBHostMsg_FactoryDeleteDatabase_Params)
+
// WebIDBDatabase::name() message.
IPC_SYNC_MESSAGE_CONTROL1_1(IndexedDBHostMsg_DatabaseName,
int32, /* idb_database_id */
@@ -248,9 +272,10 @@ IPC_SYNC_MESSAGE_CONTROL4_2(IndexedDBHostMsg_DatabaseTransaction,
int32, /* idb_transaction_id */
WebKit::WebExceptionCode /* ec */)
-// WebIDBDatabase::close() message.
-IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseOpen,
- int32 /* idb_database_id */)
+// WebIDBDatabase::open() message.
+IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseOpen,
+ int32, /* idb_database_id */
+ int32 /* response_id */)
// WebIDBDatabase::close() message.
IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose,
@@ -409,4 +434,3 @@ IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDidCompleteTaskEvents,
// WebIDBTransaction::~WebIDBTransaction() message.
IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_TransactionDestroyed,
int32 /* idb_transaction_id */)
-
diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc
index 63e11d9..b6e76c9 100644
--- a/chrome/common/json_pref_store.cc
+++ b/chrome/common/json_pref_store.cc
@@ -159,6 +159,10 @@ void JsonPrefStore::ScheduleWritePrefs() {
writer_.ScheduleWrite(this);
}
+void JsonPrefStore::ReportValueChanged(const std::string& key) {
+ FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key));
+}
+
bool JsonPrefStore::SerializeData(std::string* output) {
// TODO(tc): Do we want to prune webkit preferences that match the default
// value?
diff --git a/chrome/common/json_pref_store.h b/chrome/common/json_pref_store.h
index a587ba0..d5970b9 100644
--- a/chrome/common/json_pref_store.h
+++ b/chrome/common/json_pref_store.h
@@ -46,6 +46,8 @@ class JsonPrefStore : public PersistentPrefStore,
virtual PrefReadError ReadPrefs();
virtual bool WritePrefs();
virtual void ScheduleWritePrefs();
+ // TODO(battre) remove this function
+ virtual void ReportValueChanged(const std::string& key);
private:
// ImportantFileWriter::DataSerializer overrides:
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index e0f92d9..b17458f 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -43,32 +43,36 @@
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
+#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
#include "ipc/ipc_logging.h"
+
#if defined(OS_WIN)
#include "base/logging_win.h"
#include <initguid.h>
#endif
+namespace {
+
// When true, this means that error dialogs should not be shown.
-static bool dialogs_are_suppressed_ = false;
+bool dialogs_are_suppressed_ = false;
// This should be true for exactly the period between the end of
// InitChromeLogging() and the beginning of CleanupChromeLogging().
-static bool chrome_logging_initialized_ = false;
+bool chrome_logging_initialized_ = false;
// Set if we caled InitChromeLogging() but failed to initialize.
-static bool chrome_logging_failed_ = false;
+bool chrome_logging_failed_ = false;
// This should be true for exactly the period between the end of
// InitChromeLogging() and the beginning of CleanupChromeLogging().
-static bool chrome_logging_redirected_ = false;
+bool chrome_logging_redirected_ = false;
#if defined(OS_WIN)
// {7FE69228-633E-4f06-80C1-527FEA23E3A7}
-static const GUID kChromeTraceProviderName = {
+const GUID kChromeTraceProviderName = {
0x7fe69228, 0x633e, 0x4f06,
{ 0x80, 0xc1, 0x52, 0x7f, 0xea, 0x23, 0xe3, 0xa7 } };
#endif
@@ -77,16 +81,29 @@ static const GUID kChromeTraceProviderName = {
// silenced. To record a new error, pass the log string associated
// with that error in the str parameter.
MSVC_DISABLE_OPTIMIZE();
-static void SilentRuntimeAssertHandler(const std::string& str) {
+void SilentRuntimeAssertHandler(const std::string& str) {
base::debug::BreakDebugger();
}
-static void SilentRuntimeReportHandler(const std::string& str) {
+void SilentRuntimeReportHandler(const std::string& str) {
}
+#if defined(OS_WIN)
+// Handler to silently dump the current process when there is an assert in
+// chrome.
+void DumpProcessAssertHandler(const std::string& str) {
+ // Get the breakpad pointer from chrome.exe
+ typedef void (__cdecl *DumpProcessFunction)();
+ DumpProcessFunction DumpProcess = reinterpret_cast<DumpProcessFunction>(
+ ::GetProcAddress(::GetModuleHandle(chrome::kBrowserProcessExecutableName),
+ "DumpProcess"));
+ if (DumpProcess)
+ DumpProcess();
+}
+#endif // OS_WIN
MSVC_ENABLE_OPTIMIZE();
// Suppresses error/assertion dialogs and enables the logging of
// those errors into silenced_errors_.
-static void SuppressDialogs() {
+void SuppressDialogs() {
if (dialogs_are_suppressed_)
return;
@@ -106,6 +123,8 @@ static void SuppressDialogs() {
dialogs_are_suppressed_ = true;
}
+} // anonymous namespace
+
namespace logging {
LoggingDestination DetermineLogMode(const CommandLine& command_line) {
@@ -341,6 +360,15 @@ void InitChromeLogging(const CommandLine& command_line,
logging::LogEventProvider::Initialize(kChromeTraceProviderName);
#endif
+#ifdef NDEBUG
+ if (command_line.HasSwitch(switches::kSilentDumpOnDCHECK) &&
+ command_line.HasSwitch(switches::kEnableDCHECK)) {
+#if defined(OS_WIN)
+ logging::SetLogReportHandler(DumpProcessAssertHandler);
+#endif
+ }
+#endif // NDEBUG
+
chrome_logging_initialized_ = true;
}
diff --git a/chrome/common/message_router.cc b/chrome/common/message_router.cc
deleted file mode 100644
index b3ea596..0000000
--- a/chrome/common/message_router.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/message_router.h"
-
-MessageRouter::MessageRouter() {
-}
-
-MessageRouter::~MessageRouter() {
-}
-
-bool MessageRouter::OnControlMessageReceived(const IPC::Message& msg) {
- NOTREACHED() <<
- "should override in subclass if you care about control messages";
- return false;
-}
-
-bool MessageRouter::Send(IPC::Message* msg) {
- NOTREACHED() <<
- "should override in subclass if you care about sending messages";
- return false;
-}
-
-void MessageRouter::AddRoute(int32 routing_id,
- IPC::Channel::Listener* listener) {
- routes_.AddWithID(listener, routing_id);
-}
-
-void MessageRouter::RemoveRoute(int32 routing_id) {
- routes_.Remove(routing_id);
-}
-
-bool MessageRouter::OnMessageReceived(const IPC::Message& msg) {
- if (msg.routing_id() == MSG_ROUTING_CONTROL)
- return OnControlMessageReceived(msg);
-
- return RouteMessage(msg);
-}
-
-bool MessageRouter::RouteMessage(const IPC::Message& msg) {
- IPC::Channel::Listener* listener = ResolveRoute(msg.routing_id());
- if (!listener)
- return false;
-
- listener->OnMessageReceived(msg);
- return true;
-}
-
-IPC::Channel::Listener* MessageRouter::ResolveRoute(int32 routing_id) {
- return routes_.Lookup(routing_id);
-}
diff --git a/chrome/common/message_router.h b/chrome/common/message_router.h
deleted file mode 100644
index e6709be..0000000
--- a/chrome/common/message_router.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_MESSAGE_ROUTER_H__
-#define CHROME_COMMON_MESSAGE_ROUTER_H__
-#pragma once
-
-#include "base/id_map.h"
-#include "ipc/ipc_channel.h"
-
-// The MessageRouter handles all incoming messages sent to it by routing them
-// to the correct listener. Routing is based on the Message's routing ID.
-// Since routing IDs are typically assigned asynchronously by the browser
-// process, the MessageRouter has the notion of pending IDs for listeners that
-// have not yet been assigned a routing ID.
-//
-// When a message arrives, the routing ID is used to index the set of routes to
-// find a listener. If a listener is found, then the message is passed to it.
-// Otherwise, the message is ignored if its routing ID is not equal to
-// MSG_ROUTING_CONTROL.
-//
-// The MessageRouter supports the IPC::Message::Sender interface for outgoing
-// messages, but does not define a meaningful implementation of it. The
-// subclass of MessageRouter is intended to provide that if appropriate.
-//
-// The MessageRouter can be used as a concrete class provided its Send method
-// is not called and it does not receive any control messages.
-
-class MessageRouter : public IPC::Channel::Listener,
- public IPC::Message::Sender {
- public:
- MessageRouter();
- virtual ~MessageRouter();
-
- // Implemented by subclasses to handle control messages
- virtual bool OnControlMessageReceived(const IPC::Message& msg);
-
- // IPC::Channel::Listener implementation:
- virtual bool OnMessageReceived(const IPC::Message& msg);
-
- // Like OnMessageReceived, except it only handles routed messages. Returns
- // true if the message was dispatched, or false if there was no listener for
- // that route id.
- virtual bool RouteMessage(const IPC::Message& msg);
-
- // IPC::Message::Sender implementation:
- virtual bool Send(IPC::Message* msg);
-
- // Called to add/remove a listener for a particular message routing ID.
- void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
- void RemoveRoute(int32 routing_id);
-
- IPC::Channel::Listener* ResolveRoute(int32 routing_id);
-
- private:
- // A list of all listeners with assigned routing IDs.
- IDMap<IPC::Channel::Listener> routes_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageRouter);
-};
-
-#endif // CHROME_COMMON_MESSAGE_ROUTER_H__
diff --git a/chrome/common/metrics_helpers.cc b/chrome/common/metrics_helpers.cc
index 644df78..c043846 100644
--- a/chrome/common/metrics_helpers.cc
+++ b/chrome/common/metrics_helpers.cc
@@ -531,6 +531,18 @@ void HistogramSender::TransmitHistogram(const Histogram& histogram) {
const std::string& histogram_name = histogram.histogram_name();
int corruption = histogram.FindCorruption(snapshot);
+
+ // Crash if we detect that our histograms have been overwritten. This may be
+ // a fair distance from the memory smasher, but we hope to correlate these
+ // crashes with other events, such as plugins, or usage patterns, etc.
+ if (Histogram::BUCKET_ORDER_ERROR & corruption) {
+ // The checksum should have caught this, so crash separately if it didn't.
+ CHECK_NE(0, Histogram::RANGE_CHECKSUM_ERROR & corruption);
+ CHECK(false); // Crash for the bucket order corruption.
+ }
+ // Checksum corruption might not have caused order corruption.
+ CHECK_EQ(0, Histogram::RANGE_CHECKSUM_ERROR & corruption);
+
if (corruption) {
NOTREACHED();
InconsistencyDetected(corruption);
diff --git a/chrome/common/mime_registry_messages.cc b/chrome/common/mime_registry_messages.cc
deleted file mode 100644
index e8c2b9b..0000000
--- a/chrome/common/mime_registry_messages.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/common_param_traits.h"
-
-#define IPC_MESSAGE_IMPL
-#include "chrome/common/mime_registry_messages.h"
diff --git a/chrome/common/mime_registry_messages.h b/chrome/common/mime_registry_messages.h
index 636009f..ba6ebe4 100644
--- a/chrome/common/mime_registry_messages.h
+++ b/chrome/common/mime_registry_messages.h
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_MIME_REGISTRY_MESSAGES_H_
-#define CHROME_COMMON_MIME_REGISTRY_MESSAGES_H_
-#pragma once
+// Multiply-included message file, so no include guard.
#include "base/file_path.h"
+#include "chrome/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
@@ -25,4 +24,3 @@ IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetPreferredExtensionForMimeType,
std::string /* mime_type */,
FilePath::StringType /* extension */)
-#endif // CHROME_COMMON_MIME_REGISTRY_MESSAGES_H_
diff --git a/chrome/common/net/PRESUBMIT.py b/chrome/common/net/PRESUBMIT.py
new file mode 100644
index 0000000..f7a3310
--- /dev/null
+++ b/chrome/common/net/PRESUBMIT.py
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Chromium presubmit script for src/chrome/common/net.
+
+See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
+for more details on the presubmit API built into gcl.
+"""
+
+def GetPreferredTrySlaves():
+ return ['win', 'linux', 'mac', 'win_sync', 'linux_sync', 'mac_sync']
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
index 0830766..5815a3f 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
+++ b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
@@ -25,6 +25,39 @@
using ::testing::_;
+MockFetcher::MockFetcher(bool success,
+ const GURL& url,
+ const std::string& results,
+ URLFetcher::RequestType request_type,
+ URLFetcher::Delegate* d)
+ : URLFetcher(url, request_type, d),
+ success_(success),
+ url_(url),
+ results_(results) {}
+
+MockFetcher::~MockFetcher() {}
+
+void MockFetcher::Start() {
+ net::URLRequestStatus::Status code;
+ int http_code;
+ if (success_) {
+ http_code = RC_REQUEST_OK;
+ code = net::URLRequestStatus::SUCCESS;
+ } else {
+ http_code = RC_FORBIDDEN;
+ code = net::URLRequestStatus::FAILED;
+ }
+
+ net::URLRequestStatus status(code, 0);
+ delegate()->OnURLFetchComplete(NULL,
+ url_,
+ status,
+ http_code,
+ ResponseCookies(),
+ results_);
+}
+
+
class GaiaAuthFetcherTest : public testing::Test {
public:
GaiaAuthFetcherTest()
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h
index 65235b1..3346562 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h
+++ b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h
@@ -23,33 +23,12 @@ class MockFetcher : public URLFetcher {
const GURL& url,
const std::string& results,
URLFetcher::RequestType request_type,
- URLFetcher::Delegate* d)
- : URLFetcher(url, request_type, d),
- success_(success),
- url_(url),
- results_(results) {}
+ URLFetcher::Delegate* d);
- ~MockFetcher() {}
+ virtual ~MockFetcher();
- void Start() {
- net::URLRequestStatus::Status code;
- int http_code;
- if (success_) {
- http_code = RC_REQUEST_OK;
- code = net::URLRequestStatus::SUCCESS;
- } else {
- http_code = RC_FORBIDDEN;
- code = net::URLRequestStatus::FAILED;
- }
+ virtual void Start();
- net::URLRequestStatus status(code, 0);
- delegate()->OnURLFetchComplete(NULL,
- url_,
- status,
- http_code,
- ResponseCookies(),
- results_);
- }
private:
bool success_;
GURL url_;
diff --git a/chrome/common/net/socket_stream.h b/chrome/common/net/socket_stream.h
deleted file mode 100644
index 6999842..0000000
--- a/chrome/common/net/socket_stream.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_NET_SOCKET_STREAM_H_
-#define CHROME_COMMON_NET_SOCKET_STREAM_H_
-#pragma once
-
-namespace chrome_common_net {
-
-const int kNoSocketId = 0;
-
-} // namespace chrome_common_net
-
-#endif // CHROME_COMMON_NET_SOCKET_STREAM_H_
diff --git a/chrome/common/net/test_url_fetcher_factory.cc b/chrome/common/net/test_url_fetcher_factory.cc
index 869e9be..0ac8429 100644
--- a/chrome/common/net/test_url_fetcher_factory.cc
+++ b/chrome/common/net/test_url_fetcher_factory.cc
@@ -16,7 +16,18 @@ TestURLFetcher::TestURLFetcher(int id,
URLFetcher::Delegate* d)
: URLFetcher(url, request_type, d),
id_(id),
- original_url_(url) {
+ original_url_(url),
+ did_receive_last_chunk_(false) {
+}
+
+TestURLFetcher::~TestURLFetcher() {
+}
+
+void TestURLFetcher::AppendChunkToUpload(const std::string& data,
+ bool is_last_chunk) {
+ DCHECK(!did_receive_last_chunk_);
+ did_receive_last_chunk_ = is_last_chunk;
+ chunks_.push_back(data);
}
TestURLFetcherFactory::TestURLFetcherFactory() {}
diff --git a/chrome/common/net/test_url_fetcher_factory.h b/chrome/common/net/test_url_fetcher_factory.h
index 65625a4..10c3f7f 100644
--- a/chrome/common/net/test_url_fetcher_factory.h
+++ b/chrome/common/net/test_url_fetcher_factory.h
@@ -6,6 +6,7 @@
#define CHROME_COMMON_NET_TEST_URL_FETCHER_FACTORY_H_
#pragma once
+#include <list>
#include <map>
#include <string>
#include <utility>
@@ -47,10 +48,15 @@ class TestURLFetcher : public URLFetcher {
const GURL& url,
RequestType request_type,
Delegate* d);
+ ~TestURLFetcher();
// Overriden to do nothing. It is assumed the caller will notify the delegate.
virtual void Start() {}
+ // Overriden to cache the chunks uploaded. Caller can read back the uploaded
+ // chunks with the upload_data() accessor.
+ virtual void AppendChunkToUpload(const std::string& data, bool is_last_chunk);
+
// Unique ID in our factory.
int id() const { return id_; }
@@ -62,12 +68,17 @@ class TestURLFetcher : public URLFetcher {
// Returns the data uploaded on this URLFetcher.
const std::string& upload_data() const { return URLFetcher::upload_data(); }
+ // Returns the chunks of data uploaded on this URLFetcher.
+ const std::list<std::string>& upload_chunks() const { return chunks_; }
+
// Returns the delegate installed on the URLFetcher.
Delegate* delegate() const { return URLFetcher::delegate(); }
private:
const int id_;
const GURL original_url_;
+ std::list<std::string> chunks_;
+ bool did_receive_last_chunk_;
DISALLOW_COPY_AND_ASSIGN(TestURLFetcher);
};
diff --git a/chrome/common/net/url_fetcher.cc b/chrome/common/net/url_fetcher.cc
index 150dbab..ec052e7 100644
--- a/chrome/common/net/url_fetcher.cc
+++ b/chrome/common/net/url_fetcher.cc
@@ -105,11 +105,12 @@ class URLFetcher::Core
// |original_url_| and |url_|.
base::TimeTicks GetBackoffReleaseTime();
- void CompleteAddingUploadDataChunk(const std::string& data);
+ void CompleteAddingUploadDataChunk(const std::string& data,
+ bool is_last_chunk);
// Adds a block of data to be uploaded in a POST body. This can only be called
// after Start().
- void AppendChunkToUpload(const std::string& data);
+ void AppendChunkToUpload(const std::string& data, bool is_last_chunk);
URLFetcher* fetcher_; // Corresponding fetcher object
GURL original_url_; // The URL we were asked to fetch
@@ -300,23 +301,23 @@ void URLFetcher::Core::OnResponseStarted(net::URLRequest* request) {
}
void URLFetcher::Core::CompleteAddingUploadDataChunk(
- const std::string& content) {
+ const std::string& content, bool is_last_chunk) {
DCHECK(is_chunked_upload_);
DCHECK(request_.get());
- if (content.length()) {
- request_->AppendChunkToUpload(content.data(),
- static_cast<int>(content.length()));
- } else {
- request_->MarkEndOfChunks();
- }
+ DCHECK(!content.empty());
+ request_->AppendChunkToUpload(content.data(),
+ static_cast<int>(content.length()),
+ is_last_chunk);
}
-void URLFetcher::Core::AppendChunkToUpload(const std::string& content) {
+void URLFetcher::Core::AppendChunkToUpload(const std::string& content,
+ bool is_last_chunk) {
DCHECK(delegate_loop_proxy_);
CHECK(io_message_loop_proxy_.get());
io_message_loop_proxy_->PostTask(
FROM_HERE,
- NewRunnableMethod(this, &Core::CompleteAddingUploadDataChunk, content));
+ NewRunnableMethod(this, &Core::CompleteAddingUploadDataChunk, content,
+ is_last_chunk));
}
void URLFetcher::Core::OnReadCompleted(net::URLRequest* request,
@@ -529,13 +530,10 @@ void URLFetcher::set_chunked_upload(const std::string& content_type) {
core_->is_chunked_upload_ = true;
}
-void URLFetcher::AppendChunkToUpload(const std::string& data) {
+void URLFetcher::AppendChunkToUpload(const std::string& data,
+ bool is_last_chunk) {
DCHECK(data.length());
- core_->AppendChunkToUpload(data);
-}
-
-void URLFetcher::MarkEndOfChunks() {
- core_->AppendChunkToUpload(std::string());
+ core_->AppendChunkToUpload(data, is_last_chunk);
}
const std::string& URLFetcher::upload_data() const {
diff --git a/chrome/common/net/url_fetcher.h b/chrome/common/net/url_fetcher.h
index 524e7cb..476cdae 100644
--- a/chrome/common/net/url_fetcher.h
+++ b/chrome/common/net/url_fetcher.h
@@ -144,12 +144,7 @@ class URLFetcher {
// Adds the given bytes to a request's POST data transmitted using chunked
// transfer encoding.
// This method should be called ONLY after calling Start().
- void AppendChunkToUpload(const std::string& data);
-
- // Signals the end of a chunked transfer encoded data stream. This method
- // should be called ONLY after calling Start(), set_chunked_upload() and
- // typically one or more calls to AppendChunkToUpload.
- void MarkEndOfChunks();
+ virtual void AppendChunkToUpload(const std::string& data, bool is_last_chunk);
// Set one or more load flags as defined in net/base/load_flags.h. Must be
// called before the request is started.
diff --git a/chrome/common/notification_details.cc b/chrome/common/notification_details.cc
deleted file mode 100644
index 4455faa..0000000
--- a/chrome/common/notification_details.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/notification_details.h"
-
-NotificationDetails::NotificationDetails() : ptr_(NULL) {
-}
-
-NotificationDetails::NotificationDetails(const NotificationDetails& other)
- : ptr_(other.ptr_) {
-}
-
-NotificationDetails::NotificationDetails(const void* ptr) : ptr_(ptr) {
-}
-
-NotificationDetails::~NotificationDetails() {
-}
diff --git a/chrome/common/notification_details.h b/chrome/common/notification_details.h
index 4d243cf..9a30bde 100644
--- a/chrome/common/notification_details.h
+++ b/chrome/common/notification_details.h
@@ -2,56 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file defines the type used to provide details for NotificationService
-// notifications.
-
#ifndef CHROME_COMMON_NOTIFICATION_DETAILS_H__
#define CHROME_COMMON_NOTIFICATION_DETAILS_H__
#pragma once
-#include "base/basictypes.h"
-
-// Do not declare a NotificationDetails directly--use either
-// "Details<detailsclassname>(detailsclasspointer)" or
-// NotificationService::NoDetails().
-class NotificationDetails {
- public:
- NotificationDetails();
- NotificationDetails(const NotificationDetails& other);
- ~NotificationDetails();
-
- // NotificationDetails can be used as the index for a map; this method
- // returns the pointer to the current details as an identifier, for use as a
- // map index.
- uintptr_t map_key() const { return reinterpret_cast<uintptr_t>(ptr_); }
-
- bool operator!=(const NotificationDetails& other) const {
- return ptr_ != other.ptr_;
- }
-
- bool operator==(const NotificationDetails& other) const {
- return ptr_ == other.ptr_;
- }
-
- protected:
- explicit NotificationDetails(const void* ptr);
-
- // Declaring this const allows Details<T> to be used with both T = Foo and
- // T = const Foo.
- const void* ptr_;
-};
-
-template <class T>
-class Details : public NotificationDetails {
- public:
- // TODO(erg): Our code hard relies on implicit conversion
- Details(T* ptr) : NotificationDetails(ptr) {} // NOLINT
- Details(const NotificationDetails& other) // NOLINT
- : NotificationDetails(other) {}
-
- T* operator->() const { return ptr(); }
- // The casts here allow this to compile with both T = Foo and T = const Foo.
- T* ptr() const { return static_cast<T*>(const_cast<void*>(ptr_)); }
-};
+// TODO(jam): remove this file when all files have been converted.
+#include "content/common/notification_details.h"
#endif // CHROME_COMMON_NOTIFICATION_DETAILS_H__
diff --git a/chrome/common/notification_observer.h b/chrome/common/notification_observer.h
index b0af25e..94bef58 100644
--- a/chrome/common/notification_observer.h
+++ b/chrome/common/notification_observer.h
@@ -6,20 +6,7 @@
#define CHROME_COMMON_NOTIFICATION_OBSERVER_H_
#pragma once
-class NotificationDetails;
-class NotificationSource;
-class NotificationType;
-
-// This is the base class for notification observers. When a matching
-// notification is posted to the notification service, Observe is called.
-class NotificationObserver {
- public:
- NotificationObserver();
- virtual ~NotificationObserver();
-
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) = 0;
-};
+// TODO(jam): remove this file when all files have been converted.
+#include "content/common/notification_observer.h"
#endif // CHROME_COMMON_NOTIFICATION_OBSERVER_H_
diff --git a/chrome/common/notification_observer_mock.cc b/chrome/common/notification_observer_mock.cc
deleted file mode 100644
index 634afa5..0000000
--- a/chrome/common/notification_observer_mock.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/notification_observer_mock.h"
-
-#include "chrome/common/notification_details.h"
-#include "chrome/common/notification_source.h"
-
-NotificationObserverMock::NotificationObserverMock() {}
-
-NotificationObserverMock::~NotificationObserverMock() {}
diff --git a/chrome/common/notification_observer_mock.h b/chrome/common/notification_observer_mock.h
deleted file mode 100644
index e232928..0000000
--- a/chrome/common/notification_observer_mock.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_NOTIFICATION_OBSERVER_MOCK_H_
-#define CHROME_COMMON_NOTIFICATION_OBSERVER_MOCK_H_
-#pragma once
-
-#include "chrome/common/notification_observer.h"
-#include "chrome/common/notification_type.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-class NotificationDetails;
-class NotificationSource;
-
-class NotificationObserverMock : public NotificationObserver {
- public:
- NotificationObserverMock();
- virtual ~NotificationObserverMock();
-
- MOCK_METHOD3(Observe, void(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details));
-};
-
-#endif // CHROME_COMMON_NOTIFICATION_OBSERVER_MOCK_H_
diff --git a/chrome/common/notification_registrar.cc b/chrome/common/notification_registrar.cc
deleted file mode 100644
index 841d5d7..0000000
--- a/chrome/common/notification_registrar.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/notification_registrar.h"
-
-#include <algorithm>
-
-#include "base/logging.h"
-#include "base/threading/platform_thread.h"
-#include "chrome/common/notification_service.h"
-
-namespace {
-
-void CheckCalledOnValidThread(base::PlatformThreadId thread_id) {
- base::PlatformThreadId current_thread_id = base::PlatformThread::CurrentId();
- CHECK(current_thread_id == thread_id) << "called on invalid thread: "
- << thread_id << " vs. "
- << current_thread_id;
-}
-
-} // namespace
-
-struct NotificationRegistrar::Record {
- bool operator==(const Record& other) const;
-
- NotificationObserver* observer;
- NotificationType type;
- NotificationSource source;
- base::PlatformThreadId thread_id;
-};
-
-bool NotificationRegistrar::Record::operator==(const Record& other) const {
- return observer == other.observer &&
- type == other.type &&
- source == other.source;
- // thread_id is for debugging purpose and thus not compared here.
-}
-
-NotificationRegistrar::NotificationRegistrar() {
-}
-
-NotificationRegistrar::~NotificationRegistrar() {
- RemoveAll();
-}
-
-void NotificationRegistrar::Add(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source) {
- DCHECK(!IsRegistered(observer, type, source)) << "Duplicate registration.";
-
- Record record = { observer, type, source, base::PlatformThread::CurrentId() };
- registered_.push_back(record);
-
- NotificationService::current()->AddObserver(observer, type, source);
-}
-
-void NotificationRegistrar::Remove(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source) {
- if (!IsRegistered(observer, type, source)) {
- NOTREACHED() << "Trying to remove unregistered observer of type " <<
- type.value << " from list of size " << registered_.size() << ".";
- return;
- }
-
- Record record = { observer, type, source };
- RecordVector::iterator found = std::find(
- registered_.begin(), registered_.end(), record);
- CheckCalledOnValidThread(found->thread_id);
- registered_.erase(found);
-
- // This can be NULL if our owner outlives the NotificationService, e.g. if our
- // owner is a Singleton.
- NotificationService* service = NotificationService::current();
- if (service)
- service->RemoveObserver(observer, type, source);
-}
-
-void NotificationRegistrar::RemoveAll() {
- // Early-exit if no registrations, to avoid calling
- // NotificationService::current. If we've constructed an object with a
- // NotificationRegistrar member, but haven't actually used the notification
- // service, and we reach prgram exit, then calling current() below could try
- // to initialize the service's lazy TLS pointer during exit, which throws
- // wrenches at things.
- if (registered_.empty())
- return;
-
-
- // This can be NULL if our owner outlives the NotificationService, e.g. if our
- // owner is a Singleton.
- NotificationService* service = NotificationService::current();
- if (service) {
- for (size_t i = 0; i < registered_.size(); i++) {
- CheckCalledOnValidThread(registered_[i].thread_id);
- service->RemoveObserver(registered_[i].observer,
- registered_[i].type,
- registered_[i].source);
- }
- }
- registered_.clear();
-}
-
-bool NotificationRegistrar::IsEmpty() const {
- return registered_.empty();
-}
-
-bool NotificationRegistrar::IsRegistered(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source) {
- Record record = { observer, type, source };
- return std::find(registered_.begin(), registered_.end(), record) !=
- registered_.end();
-}
diff --git a/chrome/common/notification_registrar.h b/chrome/common/notification_registrar.h
index 9048560..73c21c9 100644
--- a/chrome/common/notification_registrar.h
+++ b/chrome/common/notification_registrar.h
@@ -6,61 +6,7 @@
#define CHROME_COMMON_NOTIFICATION_REGISTRAR_H_
#pragma once
-#include <vector>
-
-#include "base/basictypes.h"
-#include "chrome/common/notification_type.h"
-
-class NotificationObserver;
-class NotificationSource;
-
-// Aids in registering for notifications and ensures that all registered
-// notifications are unregistered when the class is destroyed.
-//
-// The intended use is that you make a NotificationRegistrar member in your
-// class and use it to register your notifications instead of going through the
-// notification service directly. It will automatically unregister them for
-// you.
-class NotificationRegistrar {
- public:
- // This class must not be derived from (we don't have a virtual destructor so
- // it won't work). Instead, use it as a member in your class.
- NotificationRegistrar();
- ~NotificationRegistrar();
-
- // Wrappers around NotificationService::[Add|Remove]Observer.
- void Add(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source);
- void Remove(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source);
-
- // Unregisters all notifications.
- void RemoveAll();
-
- // Returns true if no notifications are registered.
- bool IsEmpty() const;
-
- // Returns true if there is already a registered notification with the
- // specified details.
- bool IsRegistered(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source);
-
- private:
- struct Record;
-
- // We keep registered notifications in a simple vector. This means we'll do
- // brute-force searches when removing them individually, but individual
- // removal is uncommon, and there will typically only be a couple of
- // notifications anyway.
- typedef std::vector<Record> RecordVector;
-
- // Lists all notifications we're currently registered for.
- RecordVector registered_;
-
- DISALLOW_COPY_AND_ASSIGN(NotificationRegistrar);
-};
+// TODO(jam): remove this file when all files have been converted.
+#include "content/common/notification_registrar.h"
#endif // CHROME_COMMON_NOTIFICATION_REGISTRAR_H_
diff --git a/chrome/common/notification_service.cc b/chrome/common/notification_service.cc
deleted file mode 100644
index 06e4819..0000000
--- a/chrome/common/notification_service.cc
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/notification_service.h"
-
-#include "base/lazy_instance.h"
-#include "base/threading/thread_local.h"
-#include "chrome/common/notification_observer.h"
-
-static base::LazyInstance<base::ThreadLocalPointer<NotificationService> >
- lazy_tls_ptr(base::LINKER_INITIALIZED);
-
-// static
-NotificationService* NotificationService::current() {
- return lazy_tls_ptr.Pointer()->Get();
-}
-
-// static
-bool NotificationService::HasKey(const NotificationSourceMap& map,
- const NotificationSource& source) {
- return map.find(source.map_key()) != map.end();
-}
-
-NotificationService::NotificationService() {
- DCHECK(current() == NULL);
-#ifndef NDEBUG
- memset(observer_counts_, 0, sizeof(observer_counts_));
-#endif
-
- lazy_tls_ptr.Pointer()->Set(this);
-}
-
-void NotificationService::AddObserver(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source) {
- DCHECK(type.value < NotificationType::NOTIFICATION_TYPE_COUNT);
-
- // We have gotten some crashes where the observer pointer is NULL. The problem
- // is that this happens when we actually execute a notification, so have no
- // way of knowing who the bad observer was. We want to know when this happens
- // in release mode so we know what code to blame the crash on (since this is
- // guaranteed to crash later).
- CHECK(observer);
-
- NotificationObserverList* observer_list;
- if (HasKey(observers_[type.value], source)) {
- observer_list = observers_[type.value][source.map_key()];
- } else {
- observer_list = new NotificationObserverList;
- observers_[type.value][source.map_key()] = observer_list;
- }
-
- observer_list->AddObserver(observer);
-#ifndef NDEBUG
- ++observer_counts_[type.value];
-#endif
-}
-
-void NotificationService::RemoveObserver(NotificationObserver* observer,
- NotificationType type,
- const NotificationSource& source) {
- DCHECK(type.value < NotificationType::NOTIFICATION_TYPE_COUNT);
-
- // This is a very serious bug. An object is most likely being deleted on
- // the wrong thread, and as a result another thread's NotificationService
- // has its deleted pointer in its map. A garbge object will be called in the
- // future.
- // NOTE: when this check shows crashes, use BrowserThread::DeleteOnIOThread or
- // other variants as the trait on the object.
- CHECK(HasKey(observers_[type.value], source));
-
- NotificationObserverList* observer_list =
- observers_[type.value][source.map_key()];
- if (observer_list) {
- observer_list->RemoveObserver(observer);
-#ifndef NDEBUG
- --observer_counts_[type.value];
-#endif
- }
-
- // TODO(jhughes): Remove observer list from map if empty?
-}
-
-void NotificationService::Notify(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- DCHECK(type.value > NotificationType::ALL) <<
- "Allowed for observing, but not posting.";
- DCHECK(type.value < NotificationType::NOTIFICATION_TYPE_COUNT);
-
- // There's no particular reason for the order in which the different
- // classes of observers get notified here.
-
- // Notify observers of all types and all sources
- if (HasKey(observers_[NotificationType::ALL], AllSources()) &&
- source != AllSources()) {
- FOR_EACH_OBSERVER(NotificationObserver,
- *observers_[NotificationType::ALL][AllSources().map_key()],
- Observe(type, source, details));
- }
-
- // Notify observers of all types and the given source
- if (HasKey(observers_[NotificationType::ALL], source)) {
- FOR_EACH_OBSERVER(NotificationObserver,
- *observers_[NotificationType::ALL][source.map_key()],
- Observe(type, source, details));
- }
-
- // Notify observers of the given type and all sources
- if (HasKey(observers_[type.value], AllSources()) &&
- source != AllSources()) {
- FOR_EACH_OBSERVER(NotificationObserver,
- *observers_[type.value][AllSources().map_key()],
- Observe(type, source, details));
- }
-
- // Notify observers of the given type and the given source
- if (HasKey(observers_[type.value], source)) {
- FOR_EACH_OBSERVER(NotificationObserver,
- *observers_[type.value][source.map_key()],
- Observe(type, source, details));
- }
-}
-
-
-NotificationService::~NotificationService() {
- lazy_tls_ptr.Pointer()->Set(NULL);
-
-#ifndef NDEBUG
- for (int i = 0; i < NotificationType::NOTIFICATION_TYPE_COUNT; i++) {
- if (observer_counts_[i] > 0) {
- // This may not be completely fixable -- see
- // http://code.google.com/p/chromium/issues/detail?id=11010 .
- VLOG(1) << observer_counts_[i] << " notification observer(s) leaked "
- "of notification type " << i;
- }
- }
-#endif
-
- for (int i = 0; i < NotificationType::NOTIFICATION_TYPE_COUNT; i++) {
- NotificationSourceMap omap = observers_[i];
- for (NotificationSourceMap::iterator it = omap.begin();
- it != omap.end(); ++it)
- delete it->second;
- }
-}
-
-NotificationObserver::NotificationObserver() {}
-
-NotificationObserver::~NotificationObserver() {}
diff --git a/chrome/common/notification_service.h b/chrome/common/notification_service.h
index 83c5ec1..b6ca926 100644
--- a/chrome/common/notification_service.h
+++ b/chrome/common/notification_service.h
@@ -2,107 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file describes a central switchboard for notifications that might
-// happen in various parts of the application, and allows users to register
-// observers for various classes of events that they're interested in.
-
#ifndef CHROME_COMMON_NOTIFICATION_SERVICE_H_
#define CHROME_COMMON_NOTIFICATION_SERVICE_H_
#pragma once
-#include <map>
-
-#include "base/observer_list.h"
-#include "chrome/common/notification_details.h"
-#include "chrome/common/notification_source.h"
-#include "chrome/common/notification_type.h"
-
-class NotificationObserver;
-
-class NotificationService {
- public:
- // Returns the NotificationService object for the current thread, or NULL if
- // none.
- static NotificationService* current();
-
- // Normally instantiated when the thread is created. Not all threads have
- // a NotificationService. Only one instance should be created per thread.
- NotificationService();
- ~NotificationService();
-
- // Synchronously posts a notification to all interested observers.
- // Source is a reference to a NotificationSource object representing
- // the object originating the notification (can be
- // NotificationService::AllSources(), in which case
- // only observers interested in all sources will be notified).
- // Details is a reference to an object containing additional data about
- // the notification. If no additional data is needed, NoDetails() is used.
- // There is no particular order in which the observers will be notified.
- void Notify(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
-
- // Returns a NotificationSource that represents all notification sources
- // (for the purpose of registering an observer for events from all sources).
- static Source<void> AllSources() { return Source<void>(NULL); }
-
- // Returns a NotificationDetails object that represents a lack of details
- // associated with a notification. (This is effectively a null pointer.)
- static Details<void> NoDetails() { return Details<void>(NULL); }
-
- private:
- friend class NotificationRegistrar;
-
- typedef ObserverList<NotificationObserver> NotificationObserverList;
- typedef std::map<uintptr_t, NotificationObserverList*> NotificationSourceMap;
-
- // Convenience function to determine whether a source has a
- // NotificationObserverList in the given map;
- static bool HasKey(const NotificationSourceMap& map,
- const NotificationSource& source);
-
- // NOTE: Rather than using this directly, you should use a
- // NotificationRegistrar.
- //
- // Registers a NotificationObserver to be called whenever a matching
- // notification is posted. Observer is a pointer to an object subclassing
- // NotificationObserver to be notified when an event matching the other two
- // parameters is posted to this service. Type is the type of events to be
- // notified about (or NotificationType::ALL to receive events of all types).
- // Source is a NotificationSource object (created using
- // "Source<classname>(pointer)"), if this observer only wants to
- // receive events from that object, or NotificationService::AllSources()
- // to receive events from all sources.
- //
- // A given observer can be registered only once for each combination of
- // type and source. If the same object is registered more than once,
- // it must be removed for each of those combinations of type and source later.
- //
- // The caller retains ownership of the object pointed to by observer.
- void AddObserver(NotificationObserver* observer,
- NotificationType type, const NotificationSource& source);
-
- // NOTE: Rather than using this directly, you should use a
- // NotificationRegistrar.
- //
- // Removes the object pointed to by observer from receiving notifications
- // that match type and source. If no object matching the parameters is
- // currently registered, this method is a no-op.
- void RemoveObserver(NotificationObserver* observer,
- NotificationType type, const NotificationSource& source);
-
- // Keeps track of the observers for each type of notification.
- // Until we get a prohibitively large number of notification types,
- // a simple array is probably the fastest way to dispatch.
- NotificationSourceMap observers_[NotificationType::NOTIFICATION_TYPE_COUNT];
-
-#ifndef NDEBUG
- // Used to check to see that AddObserver and RemoveObserver calls are
- // balanced.
- int observer_counts_[NotificationType::NOTIFICATION_TYPE_COUNT];
-#endif
-
- DISALLOW_COPY_AND_ASSIGN(NotificationService);
-};
+// TODO(jam): remove this file when all files have been converted.
+#include "content/common/notification_service.h"
#endif // CHROME_COMMON_NOTIFICATION_SERVICE_H_
diff --git a/chrome/common/notification_service_unittest.cc b/chrome/common/notification_service_unittest.cc
deleted file mode 100644
index 8578eb9..0000000
--- a/chrome/common/notification_service_unittest.cc
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/notification_observer.h"
-#include "chrome/common/notification_registrar.h"
-#include "chrome/common/notification_service.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-// Bogus class to act as a NotificationSource for the messages.
-class TestSource {};
-
-class TestObserver : public NotificationObserver {
-public:
- TestObserver() : notification_count_(0) {}
-
- int notification_count() { return notification_count_; }
-
- void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- ++notification_count_;
- }
-
-private:
- int notification_count_;
-};
-
-} // namespace
-
-
-class NotificationServiceTest : public testing::Test {
- protected:
- NotificationRegistrar registrar_;
-};
-
-TEST_F(NotificationServiceTest, Basic) {
- TestSource test_source;
- TestSource other_source;
-
- // Check the equality operators defined for NotificationSource
- EXPECT_TRUE(
- Source<TestSource>(&test_source) == Source<TestSource>(&test_source));
- EXPECT_TRUE(
- Source<TestSource>(&test_source) != Source<TestSource>(&other_source));
-
- TestObserver all_types_all_sources;
- TestObserver idle_all_sources;
- TestObserver all_types_test_source;
- TestObserver idle_test_source;
-
- // Make sure it doesn't freak out when there are no observers.
- NotificationService* service = NotificationService::current();
- service->Notify(NotificationType::IDLE,
- Source<TestSource>(&test_source),
- NotificationService::NoDetails());
-
- registrar_.Add(&all_types_all_sources, NotificationType::ALL,
- NotificationService::AllSources());
- registrar_.Add(&idle_all_sources, NotificationType::IDLE,
- NotificationService::AllSources());
- registrar_.Add(&all_types_test_source, NotificationType::ALL,
- Source<TestSource>(&test_source));
- registrar_.Add(&idle_test_source, NotificationType::IDLE,
- Source<TestSource>(&test_source));
-
- EXPECT_EQ(0, all_types_all_sources.notification_count());
- EXPECT_EQ(0, idle_all_sources.notification_count());
- EXPECT_EQ(0, all_types_test_source.notification_count());
- EXPECT_EQ(0, idle_test_source.notification_count());
-
- service->Notify(NotificationType::IDLE,
- Source<TestSource>(&test_source),
- NotificationService::NoDetails());
-
- EXPECT_EQ(1, all_types_all_sources.notification_count());
- EXPECT_EQ(1, idle_all_sources.notification_count());
- EXPECT_EQ(1, all_types_test_source.notification_count());
- EXPECT_EQ(1, idle_test_source.notification_count());
-
- service->Notify(NotificationType::BUSY,
- Source<TestSource>(&test_source),
- NotificationService::NoDetails());
-
- EXPECT_EQ(2, all_types_all_sources.notification_count());
- EXPECT_EQ(1, idle_all_sources.notification_count());
- EXPECT_EQ(2, all_types_test_source.notification_count());
- EXPECT_EQ(1, idle_test_source.notification_count());
-
- service->Notify(NotificationType::IDLE,
- Source<TestSource>(&other_source),
- NotificationService::NoDetails());
-
- EXPECT_EQ(3, all_types_all_sources.notification_count());
- EXPECT_EQ(2, idle_all_sources.notification_count());
- EXPECT_EQ(2, all_types_test_source.notification_count());
- EXPECT_EQ(1, idle_test_source.notification_count());
-
- service->Notify(NotificationType::BUSY,
- Source<TestSource>(&other_source),
- NotificationService::NoDetails());
-
- EXPECT_EQ(4, all_types_all_sources.notification_count());
- EXPECT_EQ(2, idle_all_sources.notification_count());
- EXPECT_EQ(2, all_types_test_source.notification_count());
- EXPECT_EQ(1, idle_test_source.notification_count());
-
- // Try send with NULL source.
- service->Notify(NotificationType::IDLE,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
-
- EXPECT_EQ(5, all_types_all_sources.notification_count());
- EXPECT_EQ(3, idle_all_sources.notification_count());
- EXPECT_EQ(2, all_types_test_source.notification_count());
- EXPECT_EQ(1, idle_test_source.notification_count());
-
- registrar_.RemoveAll();
-
- service->Notify(NotificationType::IDLE,
- Source<TestSource>(&test_source),
- NotificationService::NoDetails());
-
- EXPECT_EQ(5, all_types_all_sources.notification_count());
- EXPECT_EQ(3, idle_all_sources.notification_count());
- EXPECT_EQ(2, all_types_test_source.notification_count());
- EXPECT_EQ(1, idle_test_source.notification_count());
-}
-
-TEST_F(NotificationServiceTest, MultipleRegistration) {
- TestSource test_source;
-
- TestObserver idle_test_source;
-
- NotificationService* service = NotificationService::current();
-
- registrar_.Add(&idle_test_source, NotificationType::IDLE,
- Source<TestSource>(&test_source));
- registrar_.Add(&idle_test_source, NotificationType::ALL,
- Source<TestSource>(&test_source));
-
- service->Notify(NotificationType::IDLE,
- Source<TestSource>(&test_source),
- NotificationService::NoDetails());
- EXPECT_EQ(2, idle_test_source.notification_count());
-
- registrar_.Remove(&idle_test_source, NotificationType::IDLE,
- Source<TestSource>(&test_source));
-
- service->Notify(NotificationType::IDLE,
- Source<TestSource>(&test_source),
- NotificationService::NoDetails());
- EXPECT_EQ(3, idle_test_source.notification_count());
-
- registrar_.Remove(&idle_test_source, NotificationType::ALL,
- Source<TestSource>(&test_source));
-
- service->Notify(NotificationType::IDLE,
- Source<TestSource>(&test_source),
- NotificationService::NoDetails());
- EXPECT_EQ(3, idle_test_source.notification_count());
-}
diff --git a/chrome/common/notification_source.cc b/chrome/common/notification_source.cc
deleted file mode 100644
index e0f5ca0..0000000
--- a/chrome/common/notification_source.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/notification_source.h"
-
-NotificationSource::NotificationSource(const NotificationSource& other)
- : ptr_(other.ptr_) {
-}
-
-NotificationSource::NotificationSource(const void* ptr) : ptr_(ptr) {
-}
-
-NotificationSource::~NotificationSource() {
-}
-
-
diff --git a/chrome/common/notification_source.h b/chrome/common/notification_source.h
index 81ed1c1..3870a5b 100644
--- a/chrome/common/notification_source.h
+++ b/chrome/common/notification_source.h
@@ -2,54 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file defines the type used to provide sources for NotificationService
-// notifications.
-
#ifndef CHROME_COMMON_NOTIFICATION_SOURCE_H__
#define CHROME_COMMON_NOTIFICATION_SOURCE_H__
#pragma once
-#include "base/basictypes.h"
-
-// Do not declare a NotificationSource directly--use either
-// "Source<sourceclassname>(sourceclasspointer)" or
-// NotificationService::AllSources().
-class NotificationSource {
- public:
- NotificationSource(const NotificationSource& other);
- ~NotificationSource();
-
- // NotificationSource can be used as the index for a map; this method
- // returns the pointer to the current source as an identifier, for use as a
- // map index.
- uintptr_t map_key() const { return reinterpret_cast<uintptr_t>(ptr_); }
-
- bool operator!=(const NotificationSource& other) const {
- return ptr_ != other.ptr_;
- }
- bool operator==(const NotificationSource& other) const {
- return ptr_ == other.ptr_;
- }
-
- protected:
- explicit NotificationSource(const void* ptr);
-
- // Declaring this const allows Source<T> to be used with both T = Foo and
- // T = const Foo.
- const void* ptr_;
-};
-
-template <class T>
-class Source : public NotificationSource {
- public:
- // TODO(erg): Our code hard relies on implicit conversion
- Source(const T* ptr) : NotificationSource(ptr) {} // NOLINT
- Source(const NotificationSource& other) // NOLINT
- : NotificationSource(other) {}
-
- T* operator->() const { return ptr(); }
- // The casts here allow this to compile with both T = Foo and T = const Foo.
- T* ptr() const { return static_cast<T*>(const_cast<void*>(ptr_)); }
-};
+// TODO(jam): remove this file when all files have been converted.
+#include "content/common/notification_source.h"
#endif // CHROME_COMMON_NOTIFICATION_SOURCE_H__
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index 0c39093..7335e1d 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -6,1331 +6,7 @@
#define CHROME_COMMON_NOTIFICATION_TYPE_H_
#pragma once
-// This file describes various types used to describe and filter notifications
-// that pass through the NotificationService.
-//
-// It is written as an enum inside a class so that it can be forward declared.
-// You're not allowed to forward declare an enum, and we want to forward
-// declare this since it's required by NotificationObserver which is included
-// by a lot of header files.
-//
-// Since this class encapsulates an integral value, it should be passed by
-// value.
-class NotificationType {
- public:
- enum Type {
- // General -----------------------------------------------------------------
-
- // Special signal value to represent an interest in all notifications.
- // Not valid when posting a notification.
- ALL = 0,
-
- // The app is done processing user actions, now is a good time to do
- // some background work.
- IDLE,
-
- // Means that the app has just started doing something in response to a
- // user action, and that background processes shouldn't run if avoidable.
- BUSY,
-
- // This is sent when the user does a gesture resulting in a noteworthy
- // action taking place. This is typically used for logging. The source is
- // the profile, and the details is a wstring identifying the action.
- USER_ACTION,
-
- // NavigationController ----------------------------------------------------
-
- // A new pending navigation has been created. Pending entries are created
- // when the user requests the navigation. We don't know if it will actually
- // happen until it does (at this point, it will be "committed." Note that
- // renderer- initiated navigations such as link clicks will never be
- // pending.
- //
- // This notification is called after the pending entry is created, but
- // before we actually try to navigate. The source will be the
- // NavigationController that owns the pending entry, and there are no
- // details.
- NAV_ENTRY_PENDING,
-
- // A new non-pending navigation entry has been created. This will
- // correspond to one NavigationController entry being created (in the case
- // of new navigations) or renavigated to (for back/forward navigations).
- //
- // The source will be the navigation controller doing the commit. The
- // details will be NavigationController::LoadCommittedDetails.
- NAV_ENTRY_COMMITTED,
-
- // Indicates that the NavigationController given in the Source has
- // decreased its back/forward list count by removing entries from either
- // the front or back of its list. This is usually the result of going back
- // and then doing a new navigation, meaning all the "forward" items are
- // deleted.
- //
- // This normally happens as a result of a new navigation. It will be
- // followed by a NAV_ENTRY_COMMITTED message for the new page that
- // caused the pruning. It could also be a result of removing an item from
- // the list to fix up after interstitials.
- //
- // The details are NavigationController::PrunedDetails.
- NAV_LIST_PRUNED,
-
- // Indicates that a NavigationEntry has changed. The source will be the
- // NavigationController that owns the NavigationEntry. The details will be
- // a NavigationController::EntryChangedDetails struct.
- //
- // This will NOT be sent on navigation, interested parties should also
- // listen for NAV_ENTRY_COMMITTED to handle that case. This will be
- // sent when the entry is updated outside of navigation (like when a new
- // title comes).
- NAV_ENTRY_CHANGED,
-
- // Other load-related (not from NavigationController) ----------------------
-
- // Corresponds to ViewHostMsg_DocumentOnLoadCompletedInMainFrame. The source
- // is the TabContents and the details the page_id.
- LOAD_COMPLETED_MAIN_FRAME,
-
- // A content load is starting. The source will be a
- // Source<NavigationController> corresponding to the tab in which the load
- // is occurring. No details are expected for this notification.
- LOAD_START,
-
- // A content load has stopped. The source will be a
- // Source<NavigationController> corresponding to the tab in which the load
- // is occurring. Details in the form of a LoadNotificationDetails object
- // are optional.
- LOAD_STOP,
-
- // A frame is staring a provisional load. The source is a
- // Source<NavigationController> corresponding to the tab in which the load
- // occurs. Details is a ProvisionalLoadDetails object.
- FRAME_PROVISIONAL_LOAD_START,
-
- // The provisional load for a frame was committed. The source is a
- // NavigationController corresponding to the tab in which the load occurred.
- // Details is a ProvisionalLoadDetails object. In contrast to
- // NAV_ENTRY_COMMITTED, this notification is sent when the load was
- // committed, even if no navigation entry was committed (such as
- // AUTO_SUBFRAME navigations).
- FRAME_PROVISIONAL_LOAD_COMMITTED,
-
- // The DOM for a frame was fully constructed, but referenced resources
- // might not be fully loaded yet. The source is a
- // Source<NavigationController> corresponding to the tab in which the load
- // occurred. Details are the int64 frame ID.
- FRAME_DOM_CONTENT_LOADED,
-
- // The frame finished loading. The source is a Source<NavigationController>
- // corresponding to the tab in which the load occurred. Details are the
- // int64 frame ID.
- FRAME_DID_FINISH_LOAD,
-
- // Content was loaded from an in-memory cache. The source will be a
- // Source<NavigationController> corresponding to the tab in which the load
- // occurred. Details in the form of a LoadFromMemoryCacheDetails object
- // are provided.
- LOAD_FROM_MEMORY_CACHE,
-
- // A provisional content load has failed with an error. The source will be
- // a Source<NavigationController> corresponding to the tab in which the
- // load occurred. Details in the form of a ProvisionalLoadDetails object
- // are provided.
- FAIL_PROVISIONAL_LOAD_WITH_ERROR,
-
- // A response has been received for a resource request. The source will be
- // a Source<RenderViewHostDelegate> corresponding to the tab in which the
- // request was issued. Details in the form of a ResourceRequestDetails
- // object are provided.
- RESOURCE_RESPONSE_STARTED,
-
- // A redirect was received while requesting a resource. The source will be
- // a Source<RenderViewHostDelegate> corresponding to the tab in which the
- // request was issued. Details in the form of a ResourceRedirectDetails
- // are provided.
- RESOURCE_RECEIVED_REDIRECT,
-
- // A new window is created in response to a request from a renderer. The
- // source will be a Source<TabContents> corresponding to the tab the
- // request originates from. Details in the form of a
- // ViewHostMsg_CreateWindow_Params object are provided.
- CREATING_NEW_WINDOW,
-
- // SSL ---------------------------------------------------------------------
-
- // Updating the SSL security indicators (the lock icon and such) proceeds
- // in two phases:
- //
- // 1) The internal SSL state for a host or tab changes. When this happens,
- // the SSLManager broadcasts an SSL_INTERNAL_STATE_CHANGED notification.
- //
- // 2) The SSLManager for each tab receives this notification and might or
- // might not update the navigation entry for its tab, depending on
- // whether the change in state affects that tab. If the SSLManager does
- // change the navigation entry, then the SSLManager broadcasts an
- // SSL_VISIBLE_STATE_CHANGED notification to the user interface can
- // redraw properly.
-
- // The SSL state of a page has changed in some visible way. For example,
- // if an insecure resource is loaded on a secure page. Note that a
- // toplevel load commit will also update the SSL state (since the
- // NavigationEntry is new) and this message won't always be sent in that
- // case. Listen to this notification if you need to refresh SSL-related UI
- // elements.
- //
- // There is no source or details.
- SSL_VISIBLE_STATE_CHANGED,
-
- // The SSL state of the browser has changed in some internal way. For
- // example, the user might have explicitly allowed some broken certificate
- // or a secure origin might have included some insecure content. Listen to
- // this notifiation if you need to keep track of our internal SSL state.
- //
- // The source will be the navigation controller associated with the state
- // change. There are no details.
- SSL_INTERNAL_STATE_CHANGED,
-
- // Views -------------------------------------------------------------------
-
- // Notification that a view was removed from a view hierarchy. The source
- // is the view, the details is the parent view.
- VIEW_REMOVED,
-
- // Browser-window ----------------------------------------------------------
-
- // This message is sent after a window has been opened. The source is a
- // Source<Browser> containing the affected Browser. No details are
- // expected.
- BROWSER_OPENED,
-
- // This message is sent soon after BROWSER_OPENED, and indicates that
- // the Browser's |window_| is now non-NULL. The source is a Source<Browser>
- // containing the affected Browser. No details are expected.
- BROWSER_WINDOW_READY,
-
- // This message is sent when a browser is closing. The source is a
- // Source<Browser> containing the affected Browser. Details is a boolean
- // that if true indicates that the application will be closed as a result of
- // this browser window closure (i.e. this was the last opened browser
- // window on win/linux). This is sent prior to BROWSER_CLOSED, and may be
- // sent more than once for a particular browser.
- BROWSER_CLOSING,
-
- // This message is sent after a window has been closed. The source is a
- // Source<Browser> containing the affected Browser. Details is a boolean
- // that if true indicates that the last browser window has closed - this
- // does not indicate that the application is exiting (observers should
- // listen for APP_TERMINATING if they want to detect when the application
- // will shut down). Note that the boolean pointed to by details is only
- // valid for the duration of this call.
- BROWSER_CLOSED,
-
- // This message is sent when the last window considered to be an
- // "application window" has been closed. Dependent/dialog/utility windows
- // can use this as a way to know that they should also close. No source or
- // details are passed.
- ALL_APPWINDOWS_CLOSED,
-
-#if defined(OS_MACOSX)
- // This message is sent when the application is made active (Mac OS X only
- // at present). No source or details are passed.
- APP_ACTIVATED,
-#endif
-
- // This message is sent when the application is terminating (the last
- // browser window has shutdown as part of an explicit user-initiated exit,
- // or the user closed the last browser window on Windows/Linux and there are
- // no BackgroundContents keeping the browser running). No source or details
- // are passed.
- APP_TERMINATING,
-
-#if defined(OS_MACOSX)
- // This notification is sent when the app has no key window, such as when
- // all windows are closed but the app is still active. No source or details
- // are provided.
- NO_KEY_WINDOW,
-#endif
-
- // This is sent when the user has chosen to exit the app, but before any
- // browsers have closed. This is only sent if the user chooses the exit menu
- // item, not if Chrome exists by some other means (such as the user closing
- // the last window). The source and details are unspecified.
- APP_EXITING,
-
- // Indicates that a top window has been closed. The source is the HWND
- // that was closed, no details are expected.
- WINDOW_CLOSED,
-
- // Indicates that a devtools window is closing. The source is the Profile*
- // and the details is the inspected RenderViewHost*.
- DEVTOOLS_WINDOW_CLOSING,
-
- // Sent when an info bubble has been created but not yet shown. The source
- // is the InfoBubble.
- INFO_BUBBLE_CREATED,
-
- // Sent when the language (English, French...) for a page has been detected.
- // The details Details<std::string> contain the ISO 639-1 language code and
- // the source is Source<TabContents>.
- TAB_LANGUAGE_DETERMINED,
-
- // Sent when a page has been translated. The source is the tab for that page
- // (Source<TabContents>) and the details are the language the page was
- // originally in and the language it was translated to
- // (std::pair<std::string, std::string>).
- PAGE_TRANSLATED,
-
- // Sent after the renderer returns a snapshot of tab contents.
- // The source (Source<RenderViewHost>) is the RenderViewHost for which the
- // snapshot was generated and the details (Details<const SkBitmap>) is the
- // actual snapshot.
- TAB_SNAPSHOT_TAKEN,
-
- // Send after the code is run in specified tab.
- TAB_CODE_EXECUTED,
-
- // The user has changed the browser theme.
- BROWSER_THEME_CHANGED,
-
- // Sent when the renderer returns focus to the browser, as part of focus
- // traversal. The source is the browser, there are no details.
- FOCUS_RETURNED_TO_BROWSER,
-
- // Application-modal dialogs -----------------------------------------------
-
- // Sent after an application-modal dialog has been shown. The source
- // is the dialog.
- APP_MODAL_DIALOG_SHOWN,
-
- // Tabs --------------------------------------------------------------------
-
- // Sent when a tab is added to a TabContentsDelegate. The source is the
- // TabContentsDelegate and the details is the TabContents.
- TAB_ADDED,
-
- // This notification is sent after a tab has been appended to the
- // tab_strip. The source is a Source<NavigationController> with a pointer
- // to controller for the added tab. There are no details.
- TAB_PARENTED,
-
- // This message is sent before a tab has been closed. The source is a
- // Source<NavigationController> with a pointer to the controller for the
- // closed tab. No details are expected.
- //
- // See also TAB_CLOSED.
- TAB_CLOSING,
-
- // Notification that a tab has been closed. The source is the
- // NavigationController with no details.
- TAB_CLOSED,
-
- // This notification is sent when a render view host has connected to a
- // renderer process. The source is a Source<TabContents> with a pointer to
- // the TabContents. A TAB_CONTENTS_DISCONNECTED notification is
- // guaranteed before the source pointer becomes junk. No details are
- // expected.
- TAB_CONTENTS_CONNECTED,
-
- // This notification is sent when a TabContents swaps its render view host
- // with another one, possibly changing processes. The source is a
- // Source<TabContents> with a pointer to the TabContents. A
- // TAB_CONTENTS_DISCONNECTED notification is guaranteed before the
- // source pointer becomes junk. No details are expected.
- TAB_CONTENTS_SWAPPED,
-
- // This message is sent after a TabContents is disconnected from the
- // renderer process. The source is a Source<TabContents> with a pointer to
- // the TabContents (the pointer is usable). No details are expected.
- TAB_CONTENTS_DISCONNECTED,
-
- // This notification is sent after TabContents' title is updated. The source
- // is a Source<TabContents> with a pointer to the TabContents. No details
- // are expected.
- TAB_CONTENTS_TITLE_UPDATED,
-
- // This message is sent when a new InfoBar has been added to a TabContents.
- // The source is a Source<TabContents> with a pointer to the TabContents
- // the InfoBar was added to. The details is a Details<InfoBarDelegate> with
- // a pointer to an object implementing the InfoBarDelegate interface for
- // the InfoBar that was added.
- TAB_CONTENTS_INFOBAR_ADDED,
-
- // This message is sent when an InfoBar is about to be removed from a
- // TabContents. The source is a Source<TabContents> with a pointer to the
- // TabContents the InfoBar was removed from. The details is a
- // Details<InfoBarDelegate> with a pointer to an object implementing the
- // InfoBarDelegate interface for the InfoBar that was removed.
- TAB_CONTENTS_INFOBAR_REMOVED,
-
- // This message is sent when an InfoBar is replacing another infobar in a
- // TabContents. The source is a Source<TabContents> with a pointer to the
- // TabContents the InfoBar was removed from. The details is a
- // Details<std::pair<InfoBarDelegate*, InfoBarDelegate*> > with a pointer
- // to the old and new InfoBarDelegates, respectively.
- TAB_CONTENTS_INFOBAR_REPLACED,
-
- // This is sent when an externally hosted tab is created. The details
- // contain the ExternalTabContainer that contains the tab
- EXTERNAL_TAB_CREATED,
-
- // This is sent when an externally hosted tab is closed. No details are
- // expected.
- EXTERNAL_TAB_CLOSED,
-
- // Indicates that the new page tab has finished loading. This is used for
- // performance testing to see how fast we can load it after startup, and is
- // only called once for the lifetime of the browser. The source is unused.
- // Details is an integer: the number of milliseconds elapsed between
- // starting and finishing all painting.
- INITIAL_NEW_TAB_UI_LOAD,
-
- // Used to fire notifications about how long various events took to
- // complete. E.g., this is used to get more fine grained timings from the
- // new tab page. Details is a MetricEventDurationDetails.
- METRIC_EVENT_DURATION,
-
- // This notification is sent when a TabContents is being hidden, e.g. due
- // to switching away from this tab. The source is a Source<TabContents>.
- TAB_CONTENTS_HIDDEN,
-
- // This notification is sent when a TabContents is being destroyed. Any
- // object holding a reference to a TabContents can listen to that
- // notification to properly reset the reference. The source is a
- // Source<TabContents>.
- TAB_CONTENTS_DESTROYED,
-
- // This notification is sent when TabContents::SetAppExtension is invoked.
- // The source is the TabContents SetAppExtension was invoked on.
- TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED,
-
- // A RenderViewHost was created for a TabContents. The source is the
- // associated TabContents, and the details is the RenderViewHost
- // pointer.
- RENDER_VIEW_HOST_CREATED_FOR_TAB,
-
- // Stuff inside the tabs ---------------------------------------------------
-
- // This message is sent after a constrained window has been closed. The
- // source is a Source<ConstrainedWindow> with a pointer to the closed child
- // window. (The pointer isn't usable, except for identification.) No
- // details are expected.
- CWINDOW_CLOSED,
-
- // Indicates that a RenderProcessHost was created and its handle is now
- // available. The source will be the RenderProcessHost that corresponds to
- // the process.
- RENDERER_PROCESS_CREATED,
-
- // Indicates that a RenderProcessHost is destructing. The source will be the
- // RenderProcessHost that corresponds to the process.
- RENDERER_PROCESS_TERMINATED,
-
- // Indicates that a render process was closed (meaning it exited, but the
- // RenderProcessHost might be reused). The source will be the corresponding
- // RenderProcessHost. The details will be a RendererClosedDetails struct.
- // This may get sent along with RENDERER_PROCESS_TERMINATED.
- RENDERER_PROCESS_CLOSED,
-
- // Indicates that a render process has become unresponsive for a period of
- // time. The source will be the RenderWidgetHost that corresponds to the
- // hung view, and no details are expected.
- RENDERER_PROCESS_HANG,
-
- // This is sent to notify that the RenderViewHost displayed in a
- // TabContents has changed. Source is the TabContents for which the change
- // happened, details is the previous RenderViewHost (can be NULL when the
- // first RenderViewHost is set).
- RENDER_VIEW_HOST_CHANGED,
-
- // Indicates that the render view host has received an accessibility tree
- // update, either partial or full, from the render view. The source is the
- // RenderViewHost, the details are not used.
- RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
-
- // This is sent when a RenderWidgetHost is being destroyed. The source is
- // the RenderWidgetHost, the details are not used.
- RENDER_WIDGET_HOST_DESTROYED,
-
- // Sent when the widget is about to paint. The source is the
- // RenderWidgetHost, the details are not used.
- RENDER_WIDGET_HOST_WILL_PAINT,
-
- // Sent after the widget has painted. The source is the RenderWidgetHost,
- // the details are not used.
- RENDER_WIDGET_HOST_DID_PAINT,
-
- // Indicates the RenderWidgetHost is about to destroy the backing store. The
- // backing store will still be valid when this call is made. The source is
- // the RenderWidgetHost, the details is the BackingStore.
- RENDER_WIDGET_HOST_WILL_DESTROY_BACKING_STORE,
-
- // Indicates that the RenderWidgetHost just updated the backing store. The
- // source is the RenderWidgetHost, the details are not used.
- RENDER_WIDGET_HOST_DID_UPDATE_BACKING_STORE,
-
- // This notifies the observer that a PaintAtSizeACK was received. The source
- // is the RenderWidgetHost, the details are an instance of
- // RenderWidgetHost::PaintAtSizeAckDetails.
- RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK,
-
- // This notifies the observer that a HandleInputEventACK was received. The
- // source is the RenderWidgetHost, the details are the type of event
- // received.
- // Note: The RenderWidgetHost may be deallocated at this point.
- // Used only in testing.
- RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK,
-
- // Sent from ~RenderViewHost. The source is the TabContents.
- RENDER_VIEW_HOST_DELETED,
-
- // Sent from RenderViewHost::ClosePage. The hosted RenderView has
- // processed the onbeforeunload handler and is about to be sent a
- // ViewMsg_ClosePage message to complete the tear-down process. The source
- // is the RenderViewHost sending the message, and no details are provided.
- // Note: This message is not sent in response to RenderView closure
- // initiated by window.close().
- RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW,
-
- // Indicates a RenderWidgetHost has been hidden or restored. The source is
- // the RWH whose visibility changed, the details is a bool set to true if
- // the new state is "visible."
- RENDER_WIDGET_VISIBILITY_CHANGED,
-
- // Notification from TabContents that we have received a response from the
- // renderer in response to a dom automation controller action.
- DOM_OPERATION_RESPONSE,
-
- // Sent when the bookmark bubble hides. The source is the profile, the
- // details unused.
- BOOKMARK_BUBBLE_HIDDEN,
-
- // This notification is sent when the result of a find-in-page search is
- // available with the browser process. The source is a Source<TabContents>
- // with a pointer to the TabContents. Details encompass a
- // FindNotificationDetail object that tells whether the match was found or
- // not found.
- FIND_RESULT_AVAILABLE,
-
- // This is sent when the users preference for when the bookmark bar should
- // be shown changes. The source is the profile, and the details are
- // NoDetails.
- BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
-
- // Sent just before the installation confirm dialog is shown. The source
- // is the ExtensionInstallUI, the details are NoDetails.
- EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
-
- // Used to monitor web cache usage by notifying whenever the
- // CacheManagerHost observes new UsageStats. The source will be the
- // RenderProcessHost that corresponds to the new statistics. Details are a
- // UsageStats object sent by the renderer, and should be copied - ptr not
- // guaranteed to be valid after the notification.
- WEB_CACHE_STATS_OBSERVED,
-
- // The focused element inside a page has changed. The source is the
- // TabContents containing the render view host for the page. The details is
- // a Details<const bool> that indicates whether or not an editable node was
- // focused.
- FOCUS_CHANGED_IN_PAGE,
-
- // Notification posted from ExecuteJavascriptInWebFrameNotifyResult. The
- // source is the RenderViewHost ExecuteJavascriptInWebFrameNotifyResult was
- // invoked on. The details are a std::pair<int, Value*> with the int giving
- // the id returned from ExecuteJavascriptInWebFrameNotifyResult and the
- // Value the results of the javascript expression. The Value is owned by
- // RenderViewHost and may be a Null Value.
- EXECUTE_JAVASCRIPT_RESULT,
-
- // BackgroundContents ------------------------------------------------------
-
- // A new background contents was opened by script. The source is the parent
- // profile and the details are BackgroundContentsOpenedDetails.
- BACKGROUND_CONTENTS_OPENED,
-
- // The background contents navigated to a new location. The source is the
- // parent Profile, and the details are the BackgroundContents that was
- // navigated.
- BACKGROUND_CONTENTS_NAVIGATED,
-
- // The background contents were closed by someone invoking window.close()
- // or the parent application was uninstalled.
- // The source is the parent profile, and the details are the
- // BackgroundContents.
- BACKGROUND_CONTENTS_CLOSED,
-
- // The background contents is being deleted. The source is the
- // parent Profile, and the details are the BackgroundContents being deleted.
- BACKGROUND_CONTENTS_DELETED,
-
- // Child Processes ---------------------------------------------------------
-
- // This notification is sent when a child process host has connected to a
- // child process. There is no usable source, since it is sent from an
- // ephemeral task; register for AllSources() to receive this notification.
- // The details are in a Details<ChildProcessInfo>.
- CHILD_PROCESS_HOST_CONNECTED,
-
- // This message is sent after a ChildProcessHost is disconnected from the
- // child process. There is no usable source, since it is sent from an
- // ephemeral task; register for AllSources() to receive this notification.
- // The details are in a Details<ChildProcessInfo>.
- CHILD_PROCESS_HOST_DISCONNECTED,
-
- // This message is sent when a child process disappears
- // unexpectedly as a result of a crash. There is no usable
- // source, since it is sent from an ephemeral task; register for
- // AllSources() to receive this notification. The details are in
- // a Details<ChildProcessInfo>.
- CHILD_PROCESS_CRASHED,
-
- // This message is sent when a child process disappears
- // unexpectedly as a result of a termination signal. There is no
- // usable source, since it is sent from an ephemeral task;
- // register for AllSources() to receive this notification. The
- // details are in a Details<ChildProcessInfo>.
- CHILD_PROCESS_WAS_KILLED,
-
- // This message indicates that an instance of a particular child was
- // created in a page. (If one page contains several regions rendered by
- // the same child, this notification will occur once for each region
- // during the page load.)
- //
- // There is no usable source, since it is sent from an ephemeral task;
- // register for AllSources() to receive this notification. The details are
- // in a Details<ChildProcessInfo>.
- CHILD_INSTANCE_CREATED,
-
- // This is sent when network interception is disabled for a plugin, or the
- // plugin is unloaded. This should only be sent/received on the browser IO
- // thread or the plugin thread. The source is the plugin that is disabling
- // interception. No details are expected.
- CHROME_PLUGIN_UNLOADED,
-
- // Sent by the PluginUpdater when there is a change of plugin
- // enable/disable status.
- PLUGIN_ENABLE_STATUS_CHANGED,
-
- // This is sent when a login prompt is shown. The source is the
- // Source<NavigationController> for the tab in which the prompt is shown.
- // Details are a LoginNotificationDetails which provide the LoginHandler
- // that should be given authentication.
- AUTH_NEEDED,
-
- // This is sent when authentication credentials have been supplied (either
- // by the user or by an automation service), but before we've actually
- // received another response from the server. The source is the
- // Source<NavigationController> for the tab in which the prompt was shown.
- // Details are an AuthSuppliedLoginNotificationDetails which provide the
- // LoginHandler that should be given authentication as well as the supplied
- // username and password.
- AUTH_SUPPLIED,
-
- // This is sent when an authentication request has been dismissed without
- // supplying credentials (either by the user or by an automation service).
- // The source is the Source<NavigationController> for the tab in which the
- // prompt was shown. Details are a LoginNotificationDetails which provide
- // the LoginHandler that should be cancelled.
- AUTH_CANCELLED,
-
- // Saved Pages -------------------------------------------------------------
-
- // Sent when a SavePackage finishes successfully. The source is the
- // SavePackage, and Details are a GURL containing address of downloaded
- // page.
- SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
-
- // History -----------------------------------------------------------------
-
- // Sent when a history service is created on the main thread. This is sent
- // after history is created, but before it has finished loading. Use
- // HISTORY_LOADED is you need to know when loading has completed.
- // The source is the profile that the history service belongs to, and the
- // details is the pointer to the newly created HistoryService object.
- HISTORY_CREATED,
-
- // Sent when a history service has finished loading. The source is the
- // profile that the history service belongs to, and the details is the
- // HistoryService.
- HISTORY_LOADED,
-
- // Sent when a URL that has been typed has been added or modified. This is
- // used by the in-memory URL database (used by autocomplete) to track
- // changes to the main history system.
- //
- // The source is the profile owning the history service that changed, and
- // the details is history::URLsModifiedDetails that lists the modified or
- // added URLs.
- HISTORY_TYPED_URLS_MODIFIED,
-
- // Sent when the user visits a URL.
- //
- // The source is the profile owning the history service that changed, and
- // the details is history::URLVisitedDetails.
- HISTORY_URL_VISITED,
-
- // Sent when one or more URLs are deleted.
- //
- // The source is the profile owning the history service that changed, and
- // the details is history::URLsDeletedDetails that lists the deleted URLs.
- HISTORY_URLS_DELETED,
-
- // Sent when a keyword search term is updated. The source is the Profile and
- // the details are history::KeywordSearchTermDetails
- HISTORY_KEYWORD_SEARCH_TERM_UPDATED,
-
- // Sent by history when the favicon of a URL changes. The source is the
- // profile, and the details is history::FavIconChangeDetails (see
- // history_notifications.h).
- FAVICON_CHANGED,
-
- // Sent by history if there is a problem reading the profile. The details
- // is an int that's one of the message IDs in the string table. The active
- // browser window should notify the user of this error.
- PROFILE_ERROR,
-
- // Sent after an incognito profile has been created. The details are none
- // and the source is the new profile.
- OTR_PROFILE_CREATED,
-
- // Sent before a Profile is destroyed. The details are
- // none and the source is a Profile*.
- PROFILE_DESTROYED,
-
- // TopSites ----------------------------------------------------------------
-
- // Sent by TopSites when it finishes loading. The source is the profile the
- // details the TopSites.
- TOP_SITES_LOADED,
-
- // Sent by TopSites when it has finished updating its most visited URLs
- // cache after querying the history service. The source is the TopSites and
- // the details a CancelableRequestProvider::Handle from the history service
- // query.
- // Used only in testing.
- TOP_SITES_UPDATED,
-
- // Thumbnails---------------------------------------------------------------
-
- // Sent by the ThumbnailGenerator whenever a render widget host
- // updates its backing store. The source is the
- // ThumbnailGenerator, and the details are the RenderWidgetHost
- // that notified the ThumbnailGenerator that its backing store was
- // updated.
- THUMBNAIL_GENERATOR_SNAPSHOT_CHANGED,
-
- // Bookmarks ---------------------------------------------------------------
-
- // Sent when the starred state of a URL changes. A URL is starred if there
- // is at least one bookmark for it. The source is a Profile and the details
- // is history::URLsStarredDetails that contains the list of URLs and
- // whether they were starred or unstarred.
- URLS_STARRED,
-
- // Sent when the bookmark bar model finishes loading. This source is the
- // Profile, and the details aren't used.
- BOOKMARK_MODEL_LOADED,
-
- // Sent when SpellCheckHost has been reloaded. The source is the profile,
- // the details are NoDetails.
- SPELLCHECK_HOST_REINITIALIZED,
-
- // Sent when a new word has been added to the custom dictionary. The source
- // is the SpellCheckHost, the details are NoDetails.
- SPELLCHECK_WORD_ADDED,
-
- // Sent by the profile when the automatic spell correction setting has been
- // toggled. It exists as a notification rather than just letting interested
- // parties listen for the pref change because some objects may outlive the
- // profile. Source is profile, details is NoDetails.
- SPELLCHECK_AUTOSPELL_TOGGLED,
-
- // Sent when the bookmark bubble is shown for a particular URL. The source
- // is the profile, the details the URL.
- BOOKMARK_BUBBLE_SHOWN,
-
- // Non-history storage services --------------------------------------------
-
- // Notification that the TemplateURLModel has finished loading from the
- // database. The source is the TemplateURLModel, and the details are
- // NoDetails.
- TEMPLATE_URL_MODEL_LOADED,
-
- // Sent when a TemplateURL is removed from the model. The source is the
- // Profile, and the details the id of the TemplateURL being removed.
- TEMPLATE_URL_REMOVED,
-
- // Notification triggered when a web application has been installed or
- // uninstalled. Any application view should reload its data. The source is
- // the profile. No details are provided.
- WEB_APP_INSTALL_CHANGED,
-
- // This is sent to a pref observer when a pref is changed. The source is the
- // PrefService and the details a std::string of the changed path.
- PREF_CHANGED,
-
- // This is broadcast after the preference subsystem has completed
- // asynchronous initalization of a PrefService.
- PREF_INITIALIZATION_COMPLETED,
-
- // Sent when a default request context has been created, so calling
- // Profile::GetDefaultRequestContext() will not return NULL. This is sent
- // on the thread where Profile::GetRequestContext() is first called, which
- // should be the UI thread.
- DEFAULT_REQUEST_CONTEXT_AVAILABLE,
-
- // The state of a web resource has been changed. A resource may have been
- // added, removed, or altered. Source is WebResourceService, and the
- // details are NoDetails.
- WEB_RESOURCE_STATE_CHANGED,
-
- // Autocomplete ------------------------------------------------------------
-
- // Sent by the autocomplete controller each time the result set updates.
- // The details is a boolean indicating if the default match has changed.
- AUTOCOMPLETE_CONTROLLER_RESULT_UPDATED,
-
- // This is sent when an item of the Omnibox popup is selected. The source
- // is the profile.
- OMNIBOX_OPENED_URL,
-
- // Sent by the autocomplete edit when it is destroyed.
- AUTOCOMPLETE_EDIT_DESTROYED,
-
- // Sent by the autocomplete edit when it is focused.
- AUTOCOMPLETE_EDIT_FOCUSED,
-
- // Sent when the main Google URL has been updated. Some services cache
- // this value and need to update themselves when it changes. See
- // google_util::GetGoogleURLAndUpdateIfNecessary().
- GOOGLE_URL_UPDATED,
-
- // Printing ----------------------------------------------------------------
-
- // Notification from PrintJob that an event occured. It can be that a page
- // finished printing or that the print job failed. Details is
- // PrintJob::EventDetails.
- PRINT_JOB_EVENT,
-
- // Shutdown ----------------------------------------------------------------
-
- // Sent on the browser IO thread when an net::URLRequestContext is released
- // by its owning Profile. The source is a pointer to the
- // net::URLRequestContext.
- URL_REQUEST_CONTEXT_RELEASED,
-
- // Sent when WM_ENDSESSION has been received, after the browsers have been
- // closed but before browser process has been shutdown. The source/details
- // are all source and no details.
- SESSION_END,
-
- // Personalization ---------------------------------------------------------
-
- PERSONALIZATION,
- PERSONALIZATION_CREATED,
-
- // User Scripts ------------------------------------------------------------
-
- // Sent when there are new user scripts available. The details are a
- // pointer to SharedMemory containing the new scripts.
- USER_SCRIPTS_UPDATED,
-
- // User Style Sheet --------------------------------------------------------
-
- // Sent when the user style sheet has changed.
- USER_STYLE_SHEET_UPDATED,
-
- // Extensions --------------------------------------------------------------
-
- // Sent when the known installed extensions have all been loaded. In
- // testing scenarios this can happen multiple times if extensions are
- // unloaded and reloaded. The source is a Profile.
- EXTENSIONS_READY,
-
- // Sent when a new extension is loaded. The details are an Extension, and
- // the source is a Profile.
- EXTENSION_LOADED,
-
- // Sent when attempting to load a new extension, but they are disabled. The
- // details are an Extension*, and the source is a Profile*.
- EXTENSION_UPDATE_DISABLED,
-
- // Sent when an extension is about to be installed so we can (in the case of
- // themes) alert the user with a loading dialog. The source is the download
- // manager and the details are the download url.
- EXTENSION_READY_FOR_INSTALL,
-
- // Sent when an extension install turns out to not be a theme.
- NO_THEME_DETECTED,
-
- // Sent when a new theme is installed. The details are an Extension, and the
- // source is a Profile.
- THEME_INSTALLED,
-
- // Sent when new extensions are installed. The details are an Extension, and
- // the source is a Profile.
- EXTENSION_INSTALLED,
-
- // An error occured during extension install. The details are a string with
- // details about why the install failed.
- EXTENSION_INSTALL_ERROR,
-
- // Sent when an extension has been uninstalled. The details are
- // an UninstalledExtensionInfo struct and the source is a Profile.
- EXTENSION_UNINSTALLED,
-
- // Sent when an extension is unloaded. This happens when an extension is
- // uninstalled or disabled. The details are an UnloadedExtensionInfo, and
- // the source is a Profile.
- //
- // Note that when this notification is sent, ExtensionService has already
- // removed the extension from its internal state.
- EXTENSION_UNLOADED,
-
- // Sent when an extension has updated its user scripts. The details are an
- // Extension, and the source is a Profile.
- EXTENSION_USER_SCRIPTS_UPDATED,
-
- // Sent after a new ExtensionFunctionDispatcher is created. The details are
- // an ExtensionFunctionDispatcher* and the source is a Profile*. This is
- // similar in timing to EXTENSION_HOST_CREATED, but also fires when an
- // extension view which is hosted in TabContents* is created.
- EXTENSION_FUNCTION_DISPATCHER_CREATED,
-
- // Sent before an ExtensionHost is destroyed. The details are
- // an ExtensionFunctionDispatcher* and the source is a Profile*. This is
- // similar in timing to EXTENSION_HOST_DESTROYED, but also fires when an
- // extension view which is hosted in TabContents* is destroyed.
- EXTENSION_FUNCTION_DISPATCHER_DESTROYED,
-
- // Sent after a new ExtensionHost is created. The details are
- // an ExtensionHost* and the source is an ExtensionProcessManager*.
- EXTENSION_HOST_CREATED,
-
- // Sent before an ExtensionHost is destroyed. The details are
- // an ExtensionHost* and the source is a Profile*.
- EXTENSION_HOST_DESTROYED,
-
- // Sent by an ExtensionHost when it finished its initial page load.
- // The details are an ExtensionHost* and the source is a Profile*.
- EXTENSION_HOST_DID_STOP_LOADING,
-
- // Sent by an ExtensionHost when its render view requests closing through
- // window.close(). The details are an ExtensionHost* and the source is a
- // Profile*.
- EXTENSION_HOST_VIEW_SHOULD_CLOSE,
-
- // Sent after an extension render process is created and fully functional.
- // The details are an ExtensionHost*.
- EXTENSION_PROCESS_CREATED,
-
- // Sent when extension render process ends (whether it crashes or closes).
- // The details are an ExtensionHost* and the source is a Profile*. Not sent
- // during browser shutdown.
- EXTENSION_PROCESS_TERMINATED,
-
- // Sent when a background page is ready so other components can load.
- EXTENSION_BACKGROUND_PAGE_READY,
-
- // Sent when a pop-up extension view is ready, so that notification may
- // be sent to pending callbacks. Note that this notification is sent
- // after all onload callbacks have been invoked in the main frame.
- // The details is the ExtensionHost* hosted within the popup, and the source
- // is a Profile*.
- EXTENSION_POPUP_VIEW_READY,
-
- // Sent when a browser action's state has changed. The source is the
- // ExtensionAction* that changed. There are no details.
- EXTENSION_BROWSER_ACTION_UPDATED,
-
- // Sent when the count of page actions has changed. Note that some of them
- // may not apply to the current page. The source is a LocationBar*. There
- // are no details.
- EXTENSION_PAGE_ACTION_COUNT_CHANGED,
-
- // Sent when a browser action's visibility has changed. The source is the
- // ExtensionPrefs* that changed. The details are a Extension*.
- EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED,
-
- // Sent when a page action's visibility has changed. The source is the
- // ExtensionAction* that changed. The details are a TabContents*.
- EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
-
- // Sent by an extension to notify the browser about the results of a unit
- // test.
- EXTENSION_TEST_PASSED,
- EXTENSION_TEST_FAILED,
-
- // Sent by extension test javascript code, typically in a browser test. The
- // sender is a std::string representing the extension id, and the details
- // are a std::string with some message. This is particularly useful when you
- // want to have C++ code wait for javascript code to do something.
- EXTENSION_TEST_MESSAGE,
-
- // Sent when an bookmarks extensions API function was successfully invoked.
- // The source is the id of the extension that invoked the function, and the
- // details are a pointer to the const BookmarksFunction in question.
- EXTENSION_BOOKMARKS_API_INVOKED,
-
- // Sent when an omnibox extension has sent back omnibox suggestions. The
- // source is the profile, and the details are an ExtensionOmniboxSuggestions
- // object.
- EXTENSION_OMNIBOX_SUGGESTIONS_READY,
-
- // Sent when the user accepts the input in an extension omnibox keyword
- // session. The source is the profile.
- EXTENSION_OMNIBOX_INPUT_ENTERED,
-
- // Sent when an omnibox extension has updated the default suggestion. The
- // source is the profile.
- EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED,
-
- // Sent when an extension changes a preference value. The source is the
- // profile, and the details are an ExtensionPrefStore::ExtensionPrefDetails
- // object.
- EXTENSION_PREF_CHANGED,
-
- // Desktop Notifications ---------------------------------------------------
-
- // This notification is sent when a balloon is connected to a renderer
- // process to render the balloon contents. The source is a
- // Source<BalloonHost> with a pointer to the the balloon. A
- // NOTIFY_BALLOON_DISCONNECTED is guaranteed before the source pointer
- // becomes junk. No details expected.
- NOTIFY_BALLOON_CONNECTED,
-
- // This message is sent after a balloon is disconnected from the renderer
- // process. The source is a Source<BalloonHost> with a pointer to the
- // balloon host (the pointer is usable). No details are expected.
- NOTIFY_BALLOON_DISCONNECTED,
-
- // Web Database Service ----------------------------------------------------
-
- // This notification is sent whenever autofill entries are
- // changed. The detail of this notification is a list of changes
- // represented by a vector of AutofillChange. Each change
- // includes a change type (add, update, or remove) as well as the
- // key of the entry that was affected.
- AUTOFILL_ENTRIES_CHANGED,
-
- // DEPRECATED
- // TODO(dhollowa): Remove this once Sync has migrated to GUID-based
- // notifications. http://crbug.com/58813
- // Sent when an AutoFillProfile has been added/removed/updated in the
- // WebDatabase. The detail is an AutofillProfileChange.
- AUTOFILL_PROFILE_CHANGED,
-
- // Sent when an AutoFillProfile has been added/removed/updated in the
- // WebDatabase. The detail is an AutofillProfileChangeGUID.
- AUTOFILL_PROFILE_CHANGED_GUID,
-
- // DEPRECATED
- // TODO(dhollowa): Remove this once Sync has migrated to GUID-based
- // notifications. http://crbug.com/58813
- // Sent when an Autofill CreditCard has been added/removed/updated in the
- // WebDatabase. The detail is an AutofillCreditCardChange.
- AUTOFILL_CREDIT_CARD_CHANGED,
-
- // Sent when an Autofill CreditCard has been added/removed/updated in the
- // WebDatabase. The detail is an AutofillCreditCardChangeGUID.
- AUTOFILL_CREDIT_CARD_CHANGED_GUID,
-
- // This notification is sent whenever the web database service has finished
- // loading the web database. No details are expected.
- WEB_DATABASE_LOADED,
-
- // Purge Memory ------------------------------------------------------------
-
- // Sent on the IO thread when the system should try to reduce the amount of
- // memory in use, no source or details are passed. See memory_purger.h .cc.
- PURGE_MEMORY,
-
- // Upgrade notifications ---------------------------------------------------
-
- // Sent when Chrome detects that it has been upgraded behind the scenes.
- // NOTE: The detection mechanism is asynchronous, so this event may arrive
- // quite some time after the upgrade actually happened. No details are
- // expected.
- UPGRADE_DETECTED,
-
- // Sent when Chrome believes an update has been installed and available for
- // long enough with the user shutting down to let it take effect. See
- // upgrade_detector.cc for details on how long it waits. No details are
- // expected.
- UPGRADE_RECOMMENDED,
-
- // Software incompatibility notifications ----------------------------------
-
- // Sent when Chrome has finished compiling the list of loaded modules (and
- // other modules of interest). No details are expected.
- MODULE_LIST_ENUMERATED,
-
- // Sent when Chrome detects an incompatible module. Details is a boolean
- // specifying true if one or more confirmed bad modules were found or false
- // if only suspected bad modules were found.
- MODULE_INCOMPATIBILITY_DETECTED,
-
- // Background App Tracking Notifications -----------------------------------
- // Sent when the state of the background page tracker has changed (the
- // number of unacknowledged background pages have changed). Source is the
- // BackgroundPageTracker and there are no Details.
- BACKGROUND_PAGE_TRACKER_CHANGED,
-
- // Accessibility Notifications ---------------------------------------------
-
- // Notification that a window in the browser UI (not the web content)
- // was opened, for propagating to an accessibility extension.
- // Details will be an AccessibilityWindowInfo.
- ACCESSIBILITY_WINDOW_OPENED,
-
- // Notification that a window in the browser UI was closed.
- // Details will be an AccessibilityWindowInfo.
- ACCESSIBILITY_WINDOW_CLOSED,
-
- // Notification that a control in the browser UI was focused.
- // Details will be an AccessibilityControlInfo.
- ACCESSIBILITY_CONTROL_FOCUSED,
-
- // Notification that a control in the browser UI had its action taken,
- // like pressing a button or toggling a checkbox.
- // Details will be an AccessibilityControlInfo.
- ACCESSIBILITY_CONTROL_ACTION,
-
- // Notification that text box in the browser UI had text change.
- // Details will be an AccessibilityControlInfo.
- ACCESSIBILITY_TEXT_CHANGED,
-
- // Notification that a pop-down menu was opened, for propagating
- // to an accessibility extension.
- // Details will be an AccessibilityMenuInfo.
- ACCESSIBILITY_MENU_OPENED,
-
- // Notification that a pop-down menu was closed, for propagating
- // to an accessibility extension.
- // Details will be an AccessibilityMenuInfo.
- ACCESSIBILITY_MENU_CLOSED,
-
- // Content Settings --------------------------------------------------------
-
- // Sent when content settings change. The source is a HostContentSettings
- // object, the details are ContentSettingsNotificationsDetails.
- CONTENT_SETTINGS_CHANGED,
-
- // Sent when the collect cookies dialog is shown. The source is a
- // TabSpecificContentSettings object, there are no details.
- COLLECTED_COOKIES_SHOWN,
-
- // Sent when the default setting for desktop notifications has changed.
- // The source is the DesktopNotificationService, the details are None.
- DESKTOP_NOTIFICATION_DEFAULT_CHANGED,
-
- // Sent when a non-default setting in the the notification content settings
- // map has changed. The source is the DesktopNotificationService, the
- // details are None.
- DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
-
- // Sent when the geolocation settings change. The source is the
- // GeolocationContentSettingsMap object, the details are
- // ContentSettingsNotificationsDetails.
- GEOLOCATION_SETTINGS_CHANGED,
-
- // Sync --------------------------------------------------------------------
-
- // Sent when the sync backend has been paused.
- SYNC_PAUSED,
-
- // Sent when the sync backend has been resumed.
- SYNC_RESUMED,
-
- // The sync service has started the configuration process.
- SYNC_CONFIGURE_START,
-
- // The sync service is finished the configuration process.
- SYNC_CONFIGURE_DONE,
-
- // The session service has been saved. This notification type is only sent
- // if there were new SessionService commands to save, and not for no-op save
- // operations.
- SESSION_SERVICE_SAVED,
-
- // A foreign session has been updated. If a new tab page is open, the
- // foreign session handler needs to update the new tab page's foreign
- // session data.
- FOREIGN_SESSION_UPDATED,
-
- // Foreign sessions has been disabled. New tabs should not display foreign
- // session data.
- FOREIGN_SESSION_DISABLED,
-
- // Sent when the set of data types that should be synced has been modified
- // externally (eg. by the dom_ui options screen).
- // The source is the Profile, there are no details.
- SYNC_DATA_TYPES_UPDATED,
-
- // Cookies -----------------------------------------------------------------
-
- // Sent when a cookie changes. The source is a Profile object, the details
- // are a ChromeCookieDetails object.
- COOKIE_CHANGED,
-
- // Sidebar -----------------------------------------------------------------
-
- // Sent when the sidebar state is changed.
- // The source is a SidebarManager instance, the details are the changed
- // SidebarContainer object.
- SIDEBAR_CHANGED,
-
- // Token Service -----------------------------------------------------------
-
- // When the token service has a new token available for a service, one of
- // these notifications is issued per new token.
- // The source is a TokenService on the Profile. The details are a
- // TokenAvailableDetails object.
- TOKEN_AVAILABLE,
-
- // When there aren't any additional tokens left to load, this notification
- // is sent.
- // The source is a TokenService on the profile. There are no details.
- TOKEN_LOADING_FINISHED,
-
- // If a token request failed, one of these is issued per failed request.
- // The source is a TokenService on the Profile. The details are a
- // TokenRequestFailedDetails object.
- TOKEN_REQUEST_FAILED,
-
- // When a service has a new token they got from a frontend that the
- // TokenService should know about, fire this notification. The details
- // are a TokenAvailableDetails object.
- TOKEN_UPDATED,
-
- // Sent when a user signs into Google services such as sync.
- // The source is the Profile. The details are a GoogleServiceSignin object.
- GOOGLE_SIGNIN_SUCCESSFUL,
-
- // Sent when a user fails to sign into Google services such as sync.
- // The source is the Profile. The details are a GoogleServiceAuthError
- // object.
- GOOGLE_SIGNIN_FAILED,
-
- // AutoFill Notifications --------------------------------------------------
-
- // Sent when a popup with AutoFill suggestions is shown in the renderer.
- // The source is the corresponding RenderViewHost. There are not details.
- AUTOFILL_DID_SHOW_SUGGESTIONS,
-
- // Sent when a form is previewed or filled with AutoFill suggestions.
- // The source is the corresponding RenderViewHost. There are not details.
- AUTOFILL_DID_FILL_FORM_DATA,
-
-
- // Misc --------------------------------------------------------------------
-
-#if defined(OS_CHROMEOS)
- // Sent when a chromium os user logs in.
- LOGIN_USER_CHANGED,
-
- // Sent when user image is updated.
- LOGIN_USER_IMAGE_CHANGED,
-
- // Sent when a chromium os user attempts to log in. The source is
- // all and the details are AuthenticationNotificationDetails.
- LOGIN_AUTHENTICATION,
-
- // Sent when a panel state changed.
- PANEL_STATE_CHANGED,
-
- // Sent when the wizard's content view is destroyed. The source and details
- // are not used.
- WIZARD_CONTENT_VIEW_DESTROYED,
-
- // Sent when the screen lock state has changed. The source is
- // ScreenLocker and the details is a bool specifing that the
- // screen is locked. When details is a false, the source object
- // is being deleted, so the receiver shouldn't use the screen locker
- // object.
- SCREEN_LOCK_STATE_CHANGED,
-
- // Sent when the network state has changed on UI thread.
- // The source is AllSources and the details is NetworkStateDetails defined
- // in chrome/browser/chromeos/network_state_notifier.h.
- // TODO(oshima): Port this to all platforms.
- NETWORK_STATE_CHANGED,
-
- // Sent when an attempt to acquire the public key of the owner of a chromium
- // os device has succeeded.
- OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED,
-
- // Sent when an attempt to acquire the public key of the owner of a chromium
- // os device has failed.
- OWNER_KEY_FETCH_ATTEMPT_FAILED,
-
- // Sent after device was successfully owned.
- OWNERSHIP_TAKEN,
-
- // This is sent to a ChromeOS settings observer when a system setting is
- // changed. The source is the CrosSettings and the details a std::string of
- // the changed setting.
- SYSTEM_SETTING_CHANGED,
-#endif
-
- // Sent before the repost form warning is brought up.
- // The source is a NavigationController.
- REPOST_WARNING_SHOWN,
-
-#if defined(TOOLKIT_VIEWS)
- // Sent when a bookmark's context menu is shown. Used to notify
- // tests that the context menu has been created and shown.
- BOOKMARK_CONTEXT_MENU_SHOWN,
-#endif
-
- // Sent when the zoom level changes. The source is the profile.
- ZOOM_LEVEL_CHANGED,
-
- // Sent when the tab's closeable state has changed due to increase/decrease
- // in number of tabs in browser or increase/decrease in number of browsers.
- // Details<bool> contain the closeable flag while source is AllSources.
- // This is only sent from ChromeOS's TabCloseableStateWatcher.
- TAB_CLOSEABLE_STATE_CHANGED,
-
- // Sent each time the InstantController is updated.
- INSTANT_CONTROLLER_UPDATED,
-
- // Sent each time the InstantController shows the InstantLoader.
- INSTANT_CONTROLLER_SHOWN,
-
- // Password Store ----------------------------------------------------------
- // This notification is sent whenenever login entries stored in the password
- // store are changed. The detail of this notification is a list of changes
- // represented by a vector of PasswordStoreChange. Each change includes a
- // change type (ADD, UPDATE, or REMOVE) as well as the
- // |webkit_glue::PasswordForm|s that were affected.
- LOGINS_CHANGED,
-
- // Sent when the applications in the NTP app launcher have been reordered.
- EXTENSION_LAUNCHER_REORDERED,
-
- // Count (must be last) ----------------------------------------------------
- // Used to determine the number of notification types. Not valid as
- // a type parameter when registering for or posting notifications.
- NOTIFICATION_TYPE_COUNT
- };
-
- // TODO(erg): Our notification system relies on implicit conversion.
- NotificationType(Type v) : value(v) {} // NOLINT
-
- bool operator==(NotificationType t) const { return value == t.value; }
- bool operator!=(NotificationType t) const { return value != t.value; }
-
- // Comparison to explicit enum values.
- bool operator==(Type v) const { return value == v; }
- bool operator!=(Type v) const { return value != v; }
-
- Type value;
-};
-
-inline bool operator==(NotificationType::Type a, NotificationType b) {
- return a == b.value;
-}
-inline bool operator!=(NotificationType::Type a, NotificationType b) {
- return a != b.value;
-}
+// TODO(jam): remove this file when all files have been converted.
+#include "content/common/notification_type.h"
#endif // CHROME_COMMON_NOTIFICATION_TYPE_H_
diff --git a/chrome/common/page_transition_types.cc b/chrome/common/page_transition_types.cc
index 1079ea0..bf686f9 100644
--- a/chrome/common/page_transition_types.cc
+++ b/chrome/common/page_transition_types.cc
@@ -34,20 +34,3 @@ const char* PageTransition::CoreTransitionString(Type type) {
}
return NULL;
}
-
-// static
-const char* PageTransition::QualifierString(Type type) {
- DCHECK_NE((int)(type & (CLIENT_REDIRECT | SERVER_REDIRECT)),
- (int)(CLIENT_REDIRECT | SERVER_REDIRECT));
-
- switch (type & (CLIENT_REDIRECT | SERVER_REDIRECT | FORWARD_BACK)) {
- case CLIENT_REDIRECT: return "client_redirect";
- case SERVER_REDIRECT: return "server_redirect";
- case FORWARD_BACK: return "forward_back";
- case (CLIENT_REDIRECT | FORWARD_BACK):
- return "client_redirect|forward_back";
- case (SERVER_REDIRECT | FORWARD_BACK):
- return "server_redirect|forward_back";
- }
- return "";
-}
diff --git a/chrome/common/page_transition_types.h b/chrome/common/page_transition_types.h
index 8ca7042..d764fe9 100644
--- a/chrome/common/page_transition_types.h
+++ b/chrome/common/page_transition_types.h
@@ -160,9 +160,6 @@ class PageTransition {
// Return a string version of the core type values.
static const char* CoreTransitionString(Type type);
-
- // Return a string version of the qualifier type values.
- static const char* QualifierString(Type type);
};
#endif // CHROME_COMMON_PAGE_TRANSITION_TYPES_H__
diff --git a/chrome/common/pepper_file_messages.cc b/chrome/common/pepper_file_messages.cc
index 30f6ad1..c4bd665 100644
--- a/chrome/common/pepper_file_messages.cc
+++ b/chrome/common/pepper_file_messages.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -31,4 +31,34 @@ void ParamTraits<webkit::ppapi::DirEntry>::Log(const param_type& p,
l->append(")");
}
+void ParamTraits<webkit::ppapi::PepperFilePath>::Write(Message* m,
+ const param_type& p) {
+ WriteParam(m, static_cast<unsigned>(p.domain()));
+ WriteParam(m, p.path());
+}
+
+bool ParamTraits<webkit::ppapi::PepperFilePath>::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ unsigned domain;
+ FilePath path;
+ if (!ReadParam(m, iter, &domain) || !ReadParam(m, iter, &path))
+ return false;
+ if (domain > webkit::ppapi::PepperFilePath::DOMAIN_MAX_VALID)
+ return false;
+
+ *p = webkit::ppapi::PepperFilePath(
+ static_cast<webkit::ppapi::PepperFilePath::Domain>(domain), path);
+ return true;
+}
+
+void ParamTraits<webkit::ppapi::PepperFilePath>::Log(const param_type& p,
+ std::string* l) {
+ l->append("(");
+ LogParam(static_cast<unsigned>(p.domain()), l);
+ l->append(", ");
+ LogParam(p.path(), l);
+ l->append(")");
+}
+
} // namespace IPC
diff --git a/chrome/common/pepper_file_messages.h b/chrome/common/pepper_file_messages.h
index 657b3e3..1298414 100644
--- a/chrome/common/pepper_file_messages.h
+++ b/chrome/common/pepper_file_messages.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,11 +6,12 @@
#define CHROME_COMMON_PEPPER_FILE_MESSAGES_H_
#pragma once
-#include "chrome/common/common_param_traits.h"
+#include "content/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
#include "ipc/ipc_platform_file.h"
#include "webkit/plugins/ppapi/dir_contents.h"
+#include "webkit/plugins/ppapi/file_path.h"
#define IPC_MESSAGE_START PepperFileMsgStart
@@ -25,43 +26,51 @@ struct ParamTraits<webkit::ppapi::DirEntry> {
static void Log(const param_type& p, std::string* l);
};
+template <>
+struct ParamTraits<webkit::ppapi::PepperFilePath> {
+ typedef webkit::ppapi::PepperFilePath param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* p);
+ static void Log(const param_type& p, std::string* l);
+};
+
} // namespace IPC
// Trusted Pepper Filesystem messages from the renderer to the browser.
// Open the file.
IPC_SYNC_MESSAGE_CONTROL2_2(PepperFileMsg_OpenFile,
- FilePath /* path */,
+ webkit::ppapi::PepperFilePath /* path */,
int /* flags */,
base::PlatformFileError /* error_code */,
IPC::PlatformFileForTransit /* result */)
// Rename the file.
IPC_SYNC_MESSAGE_CONTROL2_1(PepperFileMsg_RenameFile,
- FilePath /* path_from */,
- FilePath /* path_to */,
+ webkit::ppapi::PepperFilePath /* from_path */,
+ webkit::ppapi::PepperFilePath /* to_path */,
base::PlatformFileError /* error_code */)
// Delete the file.
IPC_SYNC_MESSAGE_CONTROL2_1(PepperFileMsg_DeleteFileOrDir,
- FilePath /* path */,
+ webkit::ppapi::PepperFilePath /* path */,
bool /* recursive */,
base::PlatformFileError /* error_code */)
// Create the directory.
IPC_SYNC_MESSAGE_CONTROL1_1(PepperFileMsg_CreateDir,
- FilePath /* path */,
+ webkit::ppapi::PepperFilePath /* path */,
base::PlatformFileError /* error_code */)
// Query the file's info.
IPC_SYNC_MESSAGE_CONTROL1_2(PepperFileMsg_QueryFile,
- FilePath /* path */,
+ webkit::ppapi::PepperFilePath /* path */,
base::PlatformFileInfo, /* info */
base::PlatformFileError /* error_code */)
// Get the directory's contents.
IPC_SYNC_MESSAGE_CONTROL1_2(PepperFileMsg_GetDirContents,
- FilePath /* path */,
+ webkit::ppapi::PepperFilePath /* path */,
webkit::ppapi::DirContents, /* contents */
base::PlatformFileError /* error_code */)
diff --git a/chrome/common/pepper_messages.cc b/chrome/common/pepper_messages.cc
index 60dad0d..807618d 100644
--- a/chrome/common/pepper_messages.cc
+++ b/chrome/common/pepper_messages.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "chrome/common/common_param_traits.h"
-#include "ppapi/c/private/ppb_flash.h"
+#include "ppapi/c/private/ppb_flash_net_connector.h"
#define IPC_MESSAGE_IMPL
#include "chrome/common/pepper_messages.h"
diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc
index 891e75e..f676f4c 100644
--- a/chrome/common/pepper_plugin_registry.cc
+++ b/chrome/common/pepper_plugin_registry.cc
@@ -50,34 +50,31 @@ void ComputeBuiltInPlugins(std::vector<PepperPluginInfo>* plugins) {
PepperPluginInfo pdf;
pdf.path = path;
pdf.name = kPDFPluginName;
- pdf.mime_types.push_back(kPDFPluginMimeType);
- pdf.file_extensions = kPDFPluginExtension;
- pdf.type_descriptions = kPDFPluginDescription;
+ webkit::npapi::WebPluginMimeType pdf_mime_type(kPDFPluginMimeType,
+ kPDFPluginExtension,
+ kPDFPluginDescription);
+ pdf.mime_types.push_back(pdf_mime_type);
plugins->push_back(pdf);
skip_pdf_file_check = true;
}
}
- // Native client.
- //
- // Verify that we enable nacl on the command line. The name of the switch
- // varies between the browser and renderer process.
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaCl) &&
- PathService::Get(chrome::FILE_NACL_PLUGIN, &path) &&
- file_util::PathExists(path)) {
- PepperPluginInfo nacl;
- nacl.path = path;
- nacl.name = kNaClPluginName;
- nacl.mime_types.push_back(kNaClPluginMimeType);
-
- // TODO(bbudge) Remove this mime type after NaCl tree has been updated.
- const char* kNaClPluginOldMimeType = "application/x-ppapi-nacl-srpc";
- nacl.mime_types.push_back(kNaClPluginOldMimeType);
-
- nacl.file_extensions = kNaClPluginExtension;
- nacl.type_descriptions = kNaClPluginDescription;
- plugins->push_back(nacl);
+ // Handle the Native Client plugin just like the PDF plugin.
+ static bool skip_nacl_file_check = false;
+ if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) {
+ if (skip_nacl_file_check || file_util::PathExists(path)) {
+ PepperPluginInfo nacl;
+ nacl.path = path;
+ nacl.name = kNaClPluginName;
+ webkit::npapi::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType,
+ kNaClPluginExtension,
+ kNaClPluginDescription);
+ nacl.mime_types.push_back(nacl_mime_type);
+ plugins->push_back(nacl);
+
+ skip_nacl_file_check = true;
+ }
}
// Remoting.
@@ -87,7 +84,10 @@ void ComputeBuiltInPlugins(std::vector<PepperPluginInfo>* plugins) {
PepperPluginInfo info;
info.is_internal = true;
info.path = FilePath(FILE_PATH_LITERAL("internal-chromoting"));
- info.mime_types.push_back(kRemotingPluginMimeType);
+ webkit::npapi::WebPluginMimeType remoting_mime_type(kRemotingPluginMimeType,
+ std::string(),
+ std::string());
+ info.mime_types.push_back(remoting_mime_type);
info.internal_entry_points.get_interface = remoting::PPP_GetInterface;
info.internal_entry_points.initialize_module =
remoting::PPP_InitializeModule;
@@ -111,8 +111,10 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
// FORMAT:
// command-line = <plugin-entry> + *( LWS + "," + LWS + <plugin-entry> )
- // plugin-entry = <file-path> + ["#" + <name> + ["#" + <description>]] +
- // *1( LWS + ";" + LWS + <mime-type> )
+ // plugin-entry =
+ // <file-path> +
+ // ["#" + <name> + ["#" + <description> + ["#" + <version>]]] +
+ // *1( LWS + ";" + LWS + <mime-type> )
std::vector<std::string> modules;
base::SplitString(value, ',', &modules);
@@ -139,12 +141,16 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
#endif
if (name_parts.size() > 1)
plugin.name = name_parts[1];
- if (name_parts.size() > 2) {
+ if (name_parts.size() > 2)
plugin.description = name_parts[2];
- plugin.type_descriptions = name_parts[2];
+ if (name_parts.size() > 3)
+ plugin.version = name_parts[3];
+ for (size_t j = 1; j < parts.size(); ++j) {
+ webkit::npapi::WebPluginMimeType mime_type(parts[j],
+ std::string(),
+ plugin.description);
+ plugin.mime_types.push_back(mime_type);
}
- for (size_t j = 1; j < parts.size(); ++j)
- plugin.mime_types.push_back(parts[j]);
plugins->push_back(plugin);
}
@@ -213,13 +219,16 @@ void PepperPluginRegistry::AddLiveModule(const FilePath& path,
live_modules_[path] = module;
}
-void PepperPluginRegistry::PluginModuleDestroyed(
- webkit::ppapi::PluginModule* destroyed_module) {
+void PepperPluginRegistry::PluginModuleDead(
+ webkit::ppapi::PluginModule* dead_module) {
+ // DANGER: Don't dereference the dead_module pointer! It may be in the
+ // process of being deleted.
+
// Modules aren't destroyed very often and there are normally at most a
// couple of them. So for now we just do a brute-force search.
for (NonOwningModuleMap::iterator i = live_modules_.begin();
i != live_modules_.end(); ++i) {
- if (i->second == destroyed_module) {
+ if (i->second == dead_module) {
live_modules_.erase(i);
return;
}
diff --git a/chrome/common/pepper_plugin_registry.h b/chrome/common/pepper_plugin_registry.h
index 18233ea..beb808c 100644
--- a/chrome/common/pepper_plugin_registry.h
+++ b/chrome/common/pepper_plugin_registry.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/file_path.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/plugin_module.h"
@@ -28,11 +29,10 @@ struct PepperPluginInfo {
bool is_out_of_process;
FilePath path; // Internal plugins have "internal-[name]" as path.
- std::vector<std::string> mime_types;
std::string name;
std::string description;
- std::string file_extensions;
- std::string type_descriptions;
+ std::string version;
+ std::vector<webkit::npapi::WebPluginMimeType> mime_types;
// When is_internal is set, this contains the function pointers to the
// entry points for the internal plugins.
@@ -73,8 +73,9 @@ class PepperPluginRegistry
const PepperPluginInfo* GetInfoForPlugin(const FilePath& path) const;
// Returns an existing loaded module for the given path. It will search for
- // both preloaded in-process or currently active out-of-process plugins
- // matching the given name. Returns NULL if the plugin hasn't been loaded.
+ // both preloaded in-process or currently active (non crashed) out-of-process
+ // plugins matching the given name. Returns NULL if the plugin hasn't been
+ // loaded.
webkit::ppapi::PluginModule* GetLiveModule(const FilePath& path);
// Notifies the registry that a new non-preloaded module has been created.
@@ -84,8 +85,7 @@ class PepperPluginRegistry
void AddLiveModule(const FilePath& path, webkit::ppapi::PluginModule* module);
// ModuleLifetime implementation.
- virtual void PluginModuleDestroyed(
- webkit::ppapi::PluginModule* destroyed_module);
+ virtual void PluginModuleDead(webkit::ppapi::PluginModule* dead_module);
private:
PepperPluginRegistry();
@@ -101,7 +101,10 @@ class PepperPluginRegistry
// A list of non-owning pointers to all currently-live plugin modules. This
// includes both preloaded ones in preloaded_modules_, and out-of-process
- // modules whose lifetime is managed externally.
+ // modules whose lifetime is managed externally. This will contain only
+ // non-crashed modules. If an out-of-process module crashes, it may
+ // continue as long as there are WebKit references to it, but it will not
+ // appear in this list.
typedef std::map<FilePath, webkit::ppapi::PluginModule*> NonOwningModuleMap;
NonOwningModuleMap live_modules_;
};
diff --git a/chrome/common/persistent_pref_store.h b/chrome/common/persistent_pref_store.h
index e0eb8dc..c79d678 100644
--- a/chrome/common/persistent_pref_store.h
+++ b/chrome/common/persistent_pref_store.h
@@ -44,13 +44,16 @@ class PersistentPrefStore : public PrefStore {
// tests rely on the number of notifications generated.
//
// TODO(mnissler, danno): Can we replace GetMutableDictionary() and
- // GetMutableList() with something along the lines of ScopedPrefUpdate that
- // updates the value in the end?
+ // GetMutableList() with something along the lines of ScopedUserPrefUpdate
+ // that updates the value in the end?
virtual void SetValueSilently(const std::string& key, Value* value) = 0;
// Removes the value for |key|.
virtual void RemoveValue(const std::string& key) = 0;
+ // TODO(battre) Remove this function.
+ virtual void ReportValueChanged(const std::string& key) = 0;
+
// Whether the store is in a pseudo-read-only mode where changes are not
// actually persisted to disk. This happens in some cases when there are
// read errors during startup.
diff --git a/chrome/common/plugin_messages.cc b/chrome/common/plugin_messages.cc
index 26d2aec..fe09d04 100644
--- a/chrome/common/plugin_messages.cc
+++ b/chrome/common/plugin_messages.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/utf_string_conversions.h"
+#include "content/common/common_param_traits.h"
#include "ipc/ipc_channel_handle.h"
#define IPC_MESSAGE_IMPL
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index 98ed543..f0f4f79 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -36,22 +36,6 @@ IPC_MESSAGE_CONTROL1(PluginProcessMsg_PluginMessage,
// shutdown, so we don't mistake it for a crash.
IPC_MESSAGE_CONTROL0(PluginProcessMsg_NotifyRenderersOfPendingShutdown)
-// The following messages are used by all child processes, even though they
-// are listed under PluginProcess. It seems overkill to define ChildProcess.
-// Tells the child process it should stop.
-IPC_MESSAGE_CONTROL0(PluginProcessMsg_AskBeforeShutdown)
-
-// Sent in response to PluginProcessHostMsg_ShutdownRequest to tell the child
-// process that it's safe to shutdown.
-IPC_MESSAGE_CONTROL0(PluginProcessMsg_Shutdown)
-
-#if defined(IPC_MESSAGE_LOG_ENABLED)
-// Tell the child process to begin or end IPC message logging.
-// Like above, this is used by all ChildProcesses.
-IPC_MESSAGE_CONTROL1(PluginProcessMsg_SetIPCLoggingEnabled,
- bool /* on or off */)
-#endif
-
//-----------------------------------------------------------------------------
// PluginProcessHost messages
@@ -63,8 +47,6 @@ IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated,
IPC_SYNC_MESSAGE_CONTROL0_1(PluginProcessHostMsg_GetPluginFinderUrl,
std::string /* plugin finder URL */)
-IPC_MESSAGE_CONTROL0(PluginProcessHostMsg_ShutdownRequest)
-
// Allows a chrome plugin loaded in a plugin process to send arbitrary
// data to an instance of the same plugin loaded in the browser process.
IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginMessage,
@@ -285,11 +267,6 @@ IPC_MESSAGE_ROUTED2(PluginMsg_HTTPRangeRequestReply,
unsigned long /* resource_id */,
int /* range_request_id */)
-IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_CreateCommandBuffer,
- int /* route_id */)
-
-IPC_MESSAGE_ROUTED0(PluginMsg_DestroyCommandBuffer)
-
IPC_MESSAGE_CONTROL1(PluginMsg_SignalModalDialogEvent,
gfx::NativeViewId /* containing_window */)
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index f3ddcc3..1d6b50a 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -99,13 +99,7 @@ const char kStaticEncodings[] = "intl.static_encodings";
const char kPopupWhitelistedHosts[] = "profile.popup_whitelisted_sites";
// WebKit preferences.
-// A boolean flag to indicate whether WebKit standard font family is
-// serif or sans-serif. We don't have a UI for setting standard family.
-// Instead, we use this pref to map either serif or sans_serif to WebKit
-// standard font family. At the moment, we don't have a UI for this
-// flag, either.
-const char kWebKitStandardFontIsSerif[] =
- "webkit.webprefs.standard_font_is_serif";
+const char kWebKitStandardFontFamily[] = "webkit.webprefs.standard_font_family";
const char kWebKitFixedFontFamily[] = "webkit.webprefs.fixed_font_family";
const char kWebKitSerifFontFamily[] = "webkit.webprefs.serif_font_family";
const char kWebKitSansSerifFontFamily[] =
@@ -562,7 +556,14 @@ const char kPluginsLastInternalDirectory[] = "plugins.last_internal_directory";
const char kPluginsPluginsList[] = "plugins.plugins_list";
// List pref containing names of plugins that are disabled by policy.
-const char kPluginsPluginsBlacklist[] = "plugins.plugins_blacklist";
+const char kPluginsDisabledPlugins[] = "plugins.plugins_disabled";
+
+// List pref containing exceptions to the list of plugins disabled by policy.
+const char kPluginsDisabledPluginsExceptions[] =
+ "plugins.plugins_disabled_exceptions";
+
+// List pref containing names of plugins that are enabled by policy.
+const char kPluginsEnabledPlugins[] = "plugins.plugins_enabled";
// When first shipped, the pdf plugin will be disabled by default. When we
// enable it by default, we'll want to do so only once.
@@ -674,10 +675,14 @@ const char kEnableTranslate[] = "translate.enabled";
const char kPinnedTabs[] = "pinned_tabs";
-// Integer that specifies the policy refresh rate in milliseconds. Not all
-// values are meaningful, so it is clamped to a sane range by the policy
-// provider.
-const char kPolicyRefreshRate[] = "policy.refresh_rate";
+// Integer that specifies the policy refresh rate for user policy in
+// milliseconds. Not all values are meaningful, so it is clamped to a sane
+// range by the cloud policy subsystem.
+const char kPolicyUserPolicyRefreshRate[] = "policy.user_policy_refresh_rate";
+
+// Same as |kPolicyUserPolicyRefreshRate|, but for device policy.
+const char kPolicyDevicePolicyRefreshRate[] =
+ "policy.device_policy_refresh_rate";
// Integer containing the default Geolocation content setting.
const char kGeolocationDefaultContentSetting[] =
@@ -996,6 +1001,9 @@ const char kDisableVideoAndChat[] = "disable_video_chat";
// Whether Extensions are enabled.
const char kDisableExtensions[] = "extensions.disabled";
+// Whether the plugin finder in the default plugin is enabled.
+const char kDisablePluginFinder[] = "plugins.disable_plugin_finder";
+
// Integer boolean representing the width (in pixels) of the container for
// browser actions.
const char kBrowserActionContainerWidth[] =
@@ -1033,15 +1041,15 @@ const char kNTPMostVisitedURLsBlacklist[] = "ntp.most_visited_blacklist";
// Page.
const char kNTPMostVisitedPinnedURLs[] = "ntp.pinned_urls";
-// Data downloaded from resource pages (JSON, RSS) to be used to dynamically
-// deliver data for the new tab page.
-const char kNTPWebResourceCache[] = "ntp.web_resource_cache";
+// Data downloaded from promo resource pages (JSON, RSS) to be used to
+// dynamically deliver data for the new tab page.
+const char kNTPPromoResourceCache[] = "ntp.promo_resource_cache";
-// Last time of update of web_resource_cache.
-const char kNTPWebResourceCacheUpdate[] = "ntp.web_resource_cache_update";
+// Last time of update of promo_resource_cache.
+const char kNTPPromoResourceCacheUpdate[] = "ntp.promo_resource_cache_update";
-// Serves resources for the NTP.
-const char kNTPWebResourceServer[] = "ntp.web_resource_server";
+// Serves promo resources for the NTP.
+const char kNTPPromoResourceServer[] = "ntp.web_resource_server";
// Serves tips for the NTP.
const char kNTPTipsResourceServer[] = "ntp.tips_resource_server";
@@ -1087,6 +1095,13 @@ const char kNTPPromoLine[] = "ntp.promo_line";
const char kNTPPromoStart[] = "ntp.promo_start";
const char kNTPPromoEnd[] = "ntp.promo_end";
+// The most up-to-date GPU blacklist downloaded from the web, which replaces
+// the one that's installed with chrome.
+const char kGpuBlacklist[] = "gpu_blacklist";
+
+// Last time of update of gpu_blacklist.
+const char kGpuBlacklistUpdate[] = "gpu_blacklist_update";
+
const char kDevToolsDisabled[] = "devtools.disabled";
// A boolean specifying whether dev tools window should be opened docked.
@@ -1239,8 +1254,36 @@ const char kManagedDefaultPluginsSetting[] =
const char kManagedDefaultPopupsSetting[] =
"profile.managed_default_content_settings.popups";
+// Preferences that are exclusivly used to store managed
+// content settings patterns.
+const char kManagedCookiesAllowedForUrls[] =
+ "profile.managed_cookies_allowed_for_urls";
+const char kManagedCookiesBlockedForUrls[] =
+ "profile.managed_cookies_blocked_for_urls";
+const char kManagedCookiesSessionOnlyForUrls[] =
+ "profile.managed_cookies_sessiononly_for_urls";
+const char kManagedImagesAllowedForUrls[] =
+ "profile.managed_images_allowed_for_urls";
+const char kManagedImagesBlockedForUrls[] =
+ "profile.managed_images_blocked_for_urls";
+const char kManagedJavaScriptAllowedForUrls[] =
+ "profile.managed_javascript_allowed_for_urls";
+const char kManagedJavaScriptBlockedForUrls[] =
+ "profile.managed_javascript_blocked_for_urls";
+const char kManagedPluginsAllowedForUrls[] =
+ "profile.managed_plugins_allowed_for_urls";
+const char kManagedPluginsBlockedForUrls[] =
+ "profile.managed_plugins_blocked_for_urls";
+const char kManagedPopupsAllowedForUrls[] =
+ "profile.managed_popups_allowed_for_urls";
+const char kManagedPopupsBlockedForUrls[] =
+ "profile.managed_popups_blocked_for_urls";
+
// Dictionary for storing the set of known background pages (keys are extension
// IDs of background page owners, value is a boolean that is true if the user
// needs to acknowledge this page.
const char kKnownBackgroundPages[] = "background_pages.known";
+
+// Dictionary that maps URL schemes (protocols) to URL handlers.
+const char kRegisteredProtocolHandlers[] = "registered_protocol_handlers";
} // namespace prefs
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 8fe066d..8eef3c7 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -36,7 +36,7 @@ extern const char kAcceptLanguages[];
extern const char kStaticEncodings[];
extern const char kPopupWhitelistedHosts[];
extern const char kShowBookmarkBar[];
-extern const char kWebKitStandardFontIsSerif[];
+extern const char kWebKitStandardFontFamily[];
extern const char kWebKitFixedFontFamily[];
extern const char kWebKitSerifFontFamily[];
extern const char kWebKitSansSerifFontFamily[];
@@ -204,7 +204,9 @@ extern const char kExtensionsUIDeveloperMode[];
extern const char kExtensionToolbarSize[];
extern const char kPluginsLastInternalDirectory[];
extern const char kPluginsPluginsList[];
-extern const char kPluginsPluginsBlacklist[];
+extern const char kPluginsDisabledPlugins[];
+extern const char kPluginsDisabledPluginsExceptions[];
+extern const char kPluginsEnabledPlugins[];
extern const char kPluginsEnabledInternalPDF[];
extern const char kPluginsShowSetReaderDefaultInfobar[];
extern const char kPluginsShowDetails[];
@@ -238,7 +240,9 @@ extern const char kAutoFillPersonalDataManagerFirstRun[];
extern const char kUseVerticalTabs[];
extern const char kEnableTranslate[];
extern const char kPinnedTabs[];
-extern const char kPolicyRefreshRate[];
+
+extern const char kPolicyUserPolicyRefreshRate[];
+extern const char kPolicyDevicePolicyRefreshRate[];
// Local state
extern const char kMetricsClientID[];
@@ -344,6 +348,7 @@ extern const char kNumKeywords[];
extern const char kDisableVideoAndChat[];
extern const char kDisableExtensions[];
+extern const char kDisablePluginFinder[];
extern const char kBrowserActionContainerWidth[];
extern const char kLastExtensionsUpdateCheck[];
@@ -362,9 +367,9 @@ extern const char kNTPTipsResourceServer[];
extern const char kNTPMostVisitedURLsBlacklist[];
extern const char kNTPMostVisitedPinnedURLs[];
-extern const char kNTPWebResourceCache[];
-extern const char kNTPWebResourceCacheUpdate[];
-extern const char kNTPWebResourceServer[];
+extern const char kNTPPromoResourceCache[];
+extern const char kNTPPromoResourceCacheUpdate[];
+extern const char kNTPPromoResourceServer[];
extern const char kNTPDateResourceServer[];
extern const char kNTPShownSections[];
extern const char kNTPPrefVersion[];
@@ -378,6 +383,9 @@ extern const char kNTPPromoGroup[];
extern const char kNTPPromoGroupTimeSlice[];
extern const char kNTPPromoBuild[];
+extern const char kGpuBlacklist[];
+extern const char kGpuBlacklistUpdate[];
+
extern const char kDevToolsDisabled[];
extern const char kDevToolsOpenDocked[];
extern const char kDevToolsSplitLocation[];
@@ -434,6 +442,18 @@ extern const char kManagedDefaultJavaScriptSetting[];
extern const char kManagedDefaultPluginsSetting[];
extern const char kManagedDefaultPopupsSetting[];
+extern const char kManagedCookiesAllowedForUrls[];
+extern const char kManagedCookiesBlockedForUrls[];
+extern const char kManagedCookiesSessionOnlyForUrls[];
+extern const char kManagedImagesAllowedForUrls[];
+extern const char kManagedImagesBlockedForUrls[];
+extern const char kManagedJavaScriptAllowedForUrls[];
+extern const char kManagedJavaScriptBlockedForUrls[];
+extern const char kManagedPluginsAllowedForUrls[];
+extern const char kManagedPluginsBlockedForUrls[];
+extern const char kManagedPopupsAllowedForUrls[];
+extern const char kManagedPopupsBlockedForUrls[];
+
#if defined(OS_CHROMEOS)
extern const char kSignedSettingsTempStorage[];
extern const char kHardwareKeyboardLayout[];
@@ -452,6 +472,8 @@ extern const char kKnownBackgroundPages[];
extern const char kDisable3DAPIs[];
+extern const char kRegisteredProtocolHandlers[];
+
} // namespace prefs
#endif // CHROME_COMMON_PREF_NAMES_H_
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
index 5df43f7..7836cd3 100644
--- a/chrome/common/render_messages.cc
+++ b/chrome/common/render_messages.cc
@@ -8,19 +8,16 @@
#include "chrome/common/extensions/url_pattern.h"
#include "chrome/common/gpu_param_traits.h"
#include "chrome/common/render_messages_params.h"
-#include "chrome/common/resource_response.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/web_apps.h"
+#include "content/common/resource_response.h"
#include "ipc/ipc_channel_handle.h"
#include "media/audio/audio_buffers_state.h"
-#include "net/base/upload_data.h"
-#include "net/http/http_response_headers.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/rect.h"
#include "webkit/appcache/appcache_interfaces.h"
#include "webkit/blob/blob_data.h"
-#include "webkit/glue/resource_loader_bridge.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webcookie.h"
#include "webkit/glue/webcursor.h"
@@ -287,268 +284,6 @@ void ParamTraits<webkit::npapi::WebPluginInfo>::Log(const param_type& p,
l->append(")");
}
-void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.get() != NULL);
- if (p) {
- // Do not disclose Set-Cookie headers over IPC.
- p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES);
- }
-}
-
-bool ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Read(
- const Message* m, void** iter, param_type* r) {
- bool has_object;
- if (!ReadParam(m, iter, &has_object))
- return false;
- if (has_object)
- *r = new net::HttpResponseHeaders(*m, iter);
- return true;
-}
-
-void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Log(
- const param_type& p, std::string* l) {
- l->append("<HttpResponseHeaders>");
-}
-
-void ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.base_time.is_null());
- if (p.base_time.is_null())
- return;
- WriteParam(m, p.base_time);
- WriteParam(m, p.proxy_start);
- WriteParam(m, p.proxy_end);
- WriteParam(m, p.dns_start);
- WriteParam(m, p.dns_end);
- WriteParam(m, p.connect_start);
- WriteParam(m, p.connect_end);
- WriteParam(m, p.ssl_start);
- WriteParam(m, p.ssl_end);
- WriteParam(m, p.send_start);
- WriteParam(m, p.send_end);
- WriteParam(m, p.receive_headers_start);
- WriteParam(m, p.receive_headers_end);
-}
-
-bool ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Read(
- const Message* m, void** iter, param_type* r) {
- bool is_null;
- if (!ReadParam(m, iter, &is_null))
- return false;
- if (is_null)
- return true;
-
- return
- ReadParam(m, iter, &r->base_time) &&
- ReadParam(m, iter, &r->proxy_start) &&
- ReadParam(m, iter, &r->proxy_end) &&
- ReadParam(m, iter, &r->dns_start) &&
- ReadParam(m, iter, &r->dns_end) &&
- ReadParam(m, iter, &r->connect_start) &&
- ReadParam(m, iter, &r->connect_end) &&
- ReadParam(m, iter, &r->ssl_start) &&
- ReadParam(m, iter, &r->ssl_end) &&
- ReadParam(m, iter, &r->send_start) &&
- ReadParam(m, iter, &r->send_end) &&
- ReadParam(m, iter, &r->receive_headers_start) &&
- ReadParam(m, iter, &r->receive_headers_end);
-}
-
-void ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.base_time, l);
- l->append(", ");
- LogParam(p.proxy_start, l);
- l->append(", ");
- LogParam(p.proxy_end, l);
- l->append(", ");
- LogParam(p.dns_start, l);
- l->append(", ");
- LogParam(p.dns_end, l);
- l->append(", ");
- LogParam(p.connect_start, l);
- l->append(", ");
- LogParam(p.connect_end, l);
- l->append(", ");
- LogParam(p.ssl_start, l);
- l->append(", ");
- LogParam(p.ssl_end, l);
- l->append(", ");
- LogParam(p.send_start, l);
- l->append(", ");
- LogParam(p.send_end, l);
- l->append(", ");
- LogParam(p.receive_headers_start, l);
- l->append(", ");
- LogParam(p.receive_headers_end, l);
- l->append(")");
-}
-
-void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.get() != NULL);
- if (p.get()) {
- WriteParam(m, p->http_status_code);
- WriteParam(m, p->http_status_text);
- WriteParam(m, p->request_headers);
- WriteParam(m, p->response_headers);
- }
-}
-
-bool ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Read(
- const Message* m, void** iter, param_type* r) {
- bool has_object;
- if (!ReadParam(m, iter, &has_object))
- return false;
- if (!has_object)
- return true;
- *r = new webkit_glue::ResourceDevToolsInfo();
- return
- ReadParam(m, iter, &(*r)->http_status_code) &&
- ReadParam(m, iter, &(*r)->http_status_text) &&
- ReadParam(m, iter, &(*r)->request_headers) &&
- ReadParam(m, iter, &(*r)->response_headers);
-}
-
-void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Log(
- const param_type& p, std::string* l) {
- l->append("(");
- if (p) {
- LogParam(p->request_headers, l);
- l->append(", ");
- LogParam(p->response_headers, l);
- }
- l->append(")");
-}
-
-void ParamTraits<webkit_glue::ResourceResponseInfo>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.request_time);
- WriteParam(m, p.response_time);
- WriteParam(m, p.headers);
- WriteParam(m, p.mime_type);
- WriteParam(m, p.charset);
- WriteParam(m, p.security_info);
- WriteParam(m, p.content_length);
- WriteParam(m, p.appcache_id);
- WriteParam(m, p.appcache_manifest_url);
- WriteParam(m, p.connection_id);
- WriteParam(m, p.connection_reused);
- WriteParam(m, p.load_timing);
- WriteParam(m, p.devtools_info);
- WriteParam(m, p.download_file_path);
- WriteParam(m, p.was_fetched_via_spdy);
- WriteParam(m, p.was_npn_negotiated);
- WriteParam(m, p.was_alternate_protocol_available);
- WriteParam(m, p.was_fetched_via_proxy);
-}
-
-bool ParamTraits<webkit_glue::ResourceResponseInfo>::Read(
- const Message* m, void** iter, param_type* r) {
- return
- ReadParam(m, iter, &r->request_time) &&
- ReadParam(m, iter, &r->response_time) &&
- ReadParam(m, iter, &r->headers) &&
- ReadParam(m, iter, &r->mime_type) &&
- ReadParam(m, iter, &r->charset) &&
- ReadParam(m, iter, &r->security_info) &&
- ReadParam(m, iter, &r->content_length) &&
- ReadParam(m, iter, &r->appcache_id) &&
- ReadParam(m, iter, &r->appcache_manifest_url) &&
- ReadParam(m, iter, &r->connection_id) &&
- ReadParam(m, iter, &r->connection_reused) &&
- ReadParam(m, iter, &r->load_timing) &&
- ReadParam(m, iter, &r->devtools_info) &&
- ReadParam(m, iter, &r->download_file_path) &&
- ReadParam(m, iter, &r->was_fetched_via_spdy) &&
- ReadParam(m, iter, &r->was_npn_negotiated) &&
- ReadParam(m, iter, &r->was_alternate_protocol_available) &&
- ReadParam(m, iter, &r->was_fetched_via_proxy);
-}
-
-void ParamTraits<webkit_glue::ResourceResponseInfo>::Log(
- const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.request_time, l);
- l->append(", ");
- LogParam(p.response_time, l);
- l->append(", ");
- LogParam(p.headers, l);
- l->append(", ");
- LogParam(p.mime_type, l);
- l->append(", ");
- LogParam(p.charset, l);
- l->append(", ");
- LogParam(p.security_info, l);
- l->append(", ");
- LogParam(p.content_length, l);
- l->append(", ");
- LogParam(p.appcache_id, l);
- l->append(", ");
- LogParam(p.appcache_manifest_url, l);
- l->append(", ");
- LogParam(p.connection_id, l);
- l->append(", ");
- LogParam(p.connection_reused, l);
- l->append(", ");
- LogParam(p.load_timing, l);
- l->append(", ");
- LogParam(p.devtools_info, l);
- l->append(", ");
- LogParam(p.download_file_path, l);
- l->append(", ");
- LogParam(p.was_fetched_via_spdy, l);
- l->append(", ");
- LogParam(p.was_npn_negotiated, l);
- l->append(", ");
- LogParam(p.was_alternate_protocol_available, l);
- l->append(", ");
- LogParam(p.was_fetched_via_proxy, l);
- l->append(")");
-}
-
-void ParamTraits<ResourceResponseHead>::Write(Message* m, const param_type& p) {
- ParamTraits<webkit_glue::ResourceResponseInfo>::Write(m, p);
- WriteParam(m, p.status);
- WriteParam(m, p.replace_extension_localization_templates);
-}
-
-bool ParamTraits<ResourceResponseHead>::Read(const Message* m,
- void** iter,
- param_type* r) {
- return ParamTraits<webkit_glue::ResourceResponseInfo>::Read(
- m, iter, r) &&
- ReadParam(m, iter, &r->status) &&
- ReadParam(m, iter, &r->replace_extension_localization_templates);
-}
-
-void ParamTraits<ResourceResponseHead>::Log(const param_type& p,
- std::string* l) {
- // log more?
- ParamTraits<webkit_glue::ResourceResponseInfo>::Log(p, l);
-}
-
-void ParamTraits<SyncLoadResult>::Write(Message* m, const param_type& p) {
- ParamTraits<ResourceResponseHead>::Write(m, p);
- WriteParam(m, p.final_url);
- WriteParam(m, p.data);
-}
-
-bool ParamTraits<SyncLoadResult>::Read(const Message* m, void** iter,
- param_type* r) {
- return
- ParamTraits<ResourceResponseHead>::Read(m, iter, r) &&
- ReadParam(m, iter, &r->final_url) &&
- ReadParam(m, iter, &r->data);
-}
-
-void ParamTraits<SyncLoadResult>::Log(const param_type& p, std::string* l) {
- // log more?
- ParamTraits<webkit_glue::ResourceResponseInfo>::Log(p, l);
-}
-
void ParamTraits<RendererPreferences>::Write(Message* m, const param_type& p) {
WriteParam(m, p.can_accept_load_drops);
WriteParam(m, p.should_antialias_text);
@@ -668,13 +403,17 @@ void ParamTraits<WebPreferences>::Write(Message* m, const param_type& p) {
WriteParam(m, p.experimental_webgl_enabled);
WriteParam(m, p.gl_multisampling_enabled);
WriteParam(m, p.show_composited_layer_borders);
+ WriteParam(m, p.show_composited_layer_tree);
+ WriteParam(m, p.show_fps_counter);
WriteParam(m, p.accelerated_compositing_enabled);
+ WriteParam(m, p.composite_to_texture_enabled);
WriteParam(m, p.accelerated_2d_canvas_enabled);
WriteParam(m, p.accelerated_plugins_enabled);
WriteParam(m, p.accelerated_layers_enabled);
WriteParam(m, p.accelerated_video_enabled);
WriteParam(m, p.memory_info_enabled);
WriteParam(m, p.interactive_form_validation_enabled);
+ WriteParam(m, p.fullscreen_enabled);
}
bool ParamTraits<WebPreferences>::Read(const Message* m, void** iter,
@@ -724,13 +463,17 @@ bool ParamTraits<WebPreferences>::Read(const Message* m, void** iter,
ReadParam(m, iter, &p->experimental_webgl_enabled) &&
ReadParam(m, iter, &p->gl_multisampling_enabled) &&
ReadParam(m, iter, &p->show_composited_layer_borders) &&
+ ReadParam(m, iter, &p->show_composited_layer_tree) &&
+ ReadParam(m, iter, &p->show_fps_counter) &&
ReadParam(m, iter, &p->accelerated_compositing_enabled) &&
+ ReadParam(m, iter, &p->composite_to_texture_enabled) &&
ReadParam(m, iter, &p->accelerated_2d_canvas_enabled) &&
ReadParam(m, iter, &p->accelerated_plugins_enabled) &&
ReadParam(m, iter, &p->accelerated_layers_enabled) &&
ReadParam(m, iter, &p->accelerated_video_enabled) &&
ReadParam(m, iter, &p->memory_info_enabled) &&
- ReadParam(m, iter, &p->interactive_form_validation_enabled);
+ ReadParam(m, iter, &p->interactive_form_validation_enabled) &&
+ ReadParam(m, iter, &p->fullscreen_enabled);
}
void ParamTraits<WebPreferences>::Log(const param_type& p, std::string* l) {
@@ -830,7 +573,7 @@ bool ParamTraits<URLPattern>::Read(const Message* m, void** iter,
return false;
p->set_valid_schemes(valid_schemes);
- return URLPattern::PARSE_SUCCESS == p->Parse(spec);
+ return URLPattern::PARSE_SUCCESS == p->Parse(spec, URLPattern::PARSE_LENIENT);
}
void ParamTraits<URLPattern>::Log(const param_type& p, std::string* l) {
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 2e94d53..5a257f2 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -20,11 +20,11 @@
#include "chrome/common/translate_errors.h"
#include "chrome/common/view_types.h"
#include "chrome/common/webkit_param_traits.h"
+#include "content/common/common_param_traits.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_platform_file.h" // ifdefed typedef.
#include "ui/base/clipboard/clipboard.h" // enum
#include "webkit/appcache/appcache_interfaces.h" // enum appcache::Status
-#include "webkit/fileapi/file_system_types.h" // enum fileapi::FileSystemType
#if defined(OS_MACOSX)
struct FontDescriptor;
@@ -39,20 +39,12 @@ namespace base {
class Time;
}
-namespace net {
-class HttpResponseHeaders;
-class UploadData;
-}
-
namespace webkit_blob {
class BlobData;
}
namespace webkit_glue {
struct CustomContextMenuContext;
-struct ResourceDevToolsInfo;
-struct ResourceLoadTimingInfo;
-struct ResourceResponseInfo;
struct WebAccessibility;
struct WebCookie;
}
@@ -72,9 +64,6 @@ class SkBitmap;
class URLPattern;
struct ContextMenuParams;
struct EditCommand;
-struct PP_Flash_NetAddress;
-struct ResourceResponseHead;
-struct SyncLoadResult;
struct RendererPreferences;
struct WebDropData;
struct WebMenuItem;
@@ -82,33 +71,33 @@ struct WebPreferences;
// Forward declarations of structures used to store data for when we have a lot
// of parameters.
-struct ViewMsg_Navigate_Params;
-struct ViewMsg_AudioStreamState_Params;
-struct ViewMsg_StopFinding_Params;
-struct ViewHostMsg_GetSearchProviderInstallState_Params;
-struct ViewHostMsg_PageHasOSDD_Type;
-struct ViewHostMsg_FrameNavigate_Params;
-struct ViewHostMsg_UpdateRect_Params;
-struct ViewMsg_ClosePage_Params;
-struct ViewHostMsg_Resource_Request;
-struct ViewMsg_Print_Params;
-struct ViewMsg_PrintPage_Params;
-struct ViewMsg_PrintPages_Params;
+struct ViewHostMsg_AccessibilityNotification_Params;
+struct ViewHostMsg_Audio_CreateStream_Params;
+struct ViewHostMsg_CreateWindow_Params;
+struct ViewHostMsg_CreateWorker_Params;
struct ViewHostMsg_DidPreviewDocument_Params;
struct ViewHostMsg_DidPrintPage_Params;
-struct ViewHostMsg_Audio_CreateStream_Params;
+struct ViewHostMsg_DomMessage_Params;
+struct ViewHostMsg_FrameNavigate_Params;
+struct ViewHostMsg_GetSearchProviderInstallState_Params;
+struct ViewHostMsg_MalwareDOMDetails_Params;
+struct ViewHostMsg_PageHasOSDD_Type;
+struct ViewHostMsg_RunFileChooser_Params;
+struct ViewHostMsg_ShowNotification_Params;
struct ViewHostMsg_ShowPopup_Params;
struct ViewHostMsg_ScriptedPrint_Params;
+struct ViewHostMsg_UpdateRect_Params;
+struct ViewMsg_AudioStreamState_Params;
+struct ViewMsg_ClosePage_Params;
+struct ViewMsg_DeviceOrientationUpdated_Params;
struct ViewMsg_ExecuteCode_Params;
-struct ViewHostMsg_CreateWorker_Params;
-struct ViewHostMsg_ShowNotification_Params;
-struct ViewMsg_New_Params;
-struct ViewHostMsg_CreateWindow_Params;
-struct ViewHostMsg_RunFileChooser_Params;
struct ViewMsg_ExtensionLoaded_Params;
-struct ViewMsg_DeviceOrientationUpdated_Params;
-struct ViewHostMsg_DomMessage_Params;
-struct ViewHostMsg_AccessibilityNotification_Params;
+struct ViewMsg_New_Params;
+struct ViewMsg_Navigate_Params;
+struct ViewMsg_Print_Params;
+struct ViewMsg_PrintPages_Params;
+struct ViewMsg_PrintPage_Params;
+struct ViewMsg_StopFinding_Params;
// Values that may be OR'd together to form the 'flags' parameter of the
// ViewMsg_EnablePreferredSizeChangedMode message.
@@ -185,56 +174,6 @@ struct ParamTraits<webkit::npapi::WebPluginInfo> {
static void Log(const param_type& p, std::string* l);
};
-template <>
-struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > {
- typedef scoped_refptr<net::HttpResponseHeaders> param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-// Traits for webkit_glue::ResourceLoadTimingInfo
-template <>
-struct ParamTraits<webkit_glue::ResourceLoadTimingInfo> {
- typedef webkit_glue::ResourceLoadTimingInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-template <>
-struct ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> > {
- typedef scoped_refptr<webkit_glue::ResourceDevToolsInfo> param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-// Traits for webkit_glue::ResourceResponseInfo
-template <>
-struct ParamTraits<webkit_glue::ResourceResponseInfo> {
- typedef webkit_glue::ResourceResponseInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-template <>
-struct ParamTraits<ResourceResponseHead> {
- typedef ResourceResponseHead param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-template <>
-struct ParamTraits<SyncLoadResult> {
- typedef SyncLoadResult param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
// Traits for reading/writing CSS Colors
template <>
struct ParamTraits<CSSColors::CSSColorName> {
@@ -516,11 +455,6 @@ struct ParamTraits<scoped_refptr<webkit_blob::BlobData> > {
static void Log(const param_type& p, std::string* l);
};
-template <>
-struct SimilarTypeTraits<fileapi::FileSystemType> {
- typedef int Type;
-};
-
// Traits for AudioBuffersState structure.
template <>
struct ParamTraits<AudioBuffersState> {
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index b20dc5f..a1ffb54 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -10,7 +10,6 @@
#include "build/build_config.h"
#include "base/file_path.h"
-#include "base/file_util_proxy.h"
#include "base/nullable_string16.h"
#include "base/platform_file.h"
#include "base/sync_socket.h"
@@ -108,7 +107,7 @@ IPC_MESSAGE_CONTROL3(ViewMsg_SetCacheCapacities,
size_t /* max_dead_capacity */,
size_t /* capacity */)
-// Tells the renderer to cleat the cache.
+// Tells the renderer to clear the cache.
IPC_MESSAGE_CONTROL0(ViewMsg_ClearCache)
// Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget.
@@ -129,6 +128,11 @@ IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt,
IPC_MESSAGE_ROUTED0(ViewMsg_PrintNodeUnderContextMenu)
+// Tells the renderer to print the print preview tab's PDF plugin without
+// showing the print dialog.
+IPC_MESSAGE_ROUTED1(ViewMsg_PrintForPrintPreview,
+ DictionaryValue /* settings*/)
+
// Tells the render view to close.
IPC_MESSAGE_ROUTED0(ViewMsg_Close)
@@ -274,6 +278,10 @@ IPC_MESSAGE_ROUTED0(ViewMsg_ToggleSpellCheck)
IPC_MESSAGE_ROUTED0(ViewMsg_Delete)
IPC_MESSAGE_ROUTED0(ViewMsg_SelectAll)
IPC_MESSAGE_ROUTED1(ViewMsg_ToggleSpellPanel, bool)
+IPC_MESSAGE_ROUTED3(ViewMsg_SpellChecker_RespondTextCheck,
+ int /* request identifier given by WebKit */,
+ int /* document tag */,
+ std::vector<WebKit::WebTextCheckingResult>)
// This message tells the renderer to advance to the next misspelling. It is
// sent when the user clicks the "Find Next" button on the spelling panel.
@@ -316,51 +324,6 @@ IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteCodeFinished,
int, /* request id */
bool /* whether the script ran successfully */)
-// Sent when the headers are available for a resource request.
-IPC_MESSAGE_ROUTED2(ViewMsg_Resource_ReceivedResponse,
- int /* request_id */,
- ResourceResponseHead)
-
-// Sent when cached metadata from a resource request is ready.
-IPC_MESSAGE_ROUTED2(ViewMsg_Resource_ReceivedCachedMetadata,
- int /* request_id */,
- std::vector<char> /* data */)
-
-// Sent as upload progress is being made.
-IPC_MESSAGE_ROUTED3(ViewMsg_Resource_UploadProgress,
- int /* request_id */,
- int64 /* position */,
- int64 /* size */)
-
-// Sent when the request has been redirected. The receiver is expected to
-// respond with either a FollowRedirect message (if the redirect is to be
-// followed) or a CancelRequest message (if it should not be followed).
-IPC_MESSAGE_ROUTED3(ViewMsg_Resource_ReceivedRedirect,
- int /* request_id */,
- GURL /* new_url */,
- ResourceResponseHead)
-
-// Sent when some data from a resource request is ready. The handle should
-// already be mapped into the process that receives this message.
-IPC_MESSAGE_ROUTED3(ViewMsg_Resource_DataReceived,
- int /* request_id */,
- base::SharedMemoryHandle /* data */,
- int /* data_len */)
-
-// Sent when some data from a resource request has been downloaded to
-// file. This is only called in the 'download_to_file' case and replaces
-// ViewMsg_Resource_DataReceived in the call sequence in that case.
-IPC_MESSAGE_ROUTED2(ViewMsg_Resource_DataDownloaded,
- int /* request_id */,
- int /* data_len */)
-
-// Sent when the request has been completed.
-IPC_MESSAGE_ROUTED4(ViewMsg_Resource_RequestComplete,
- int /* request_id */,
- net::URLRequestStatus /* status */,
- std::string /* security info */,
- base::Time /* completion_time */)
-
// Sent when user prompting is required before a ViewHostMsg_GetCookies
// message can complete. This message indicates that the renderer should
// pump messages while waiting for cookies.
@@ -645,8 +608,9 @@ IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
// The browser sends this to a renderer process in response to a
// GpuHostMsg_EstablishGpuChannel message.
-IPC_MESSAGE_CONTROL2(ViewMsg_GpuChannelEstablished,
+IPC_MESSAGE_CONTROL3(ViewMsg_GpuChannelEstablished,
IPC::ChannelHandle /* handle to channel */,
+ base::ProcessHandle /* renderer_process_for_gpu */,
GPUInfo /* stats about GPU process*/)
// Notifies the renderer of the appcache that has been selected for a
@@ -901,39 +865,6 @@ IPC_MESSAGE_ROUTED1(ViewMsg_NotifyRenderViewType,
IPC_MESSAGE_ROUTED1(ViewMsg_ExecuteCode,
ViewMsg_ExecuteCode_Params)
-#if defined(IPC_MESSAGE_LOG_ENABLED)
-// Tell the renderer process to begin or end IPC message logging.
-IPC_MESSAGE_CONTROL1(ViewMsg_SetIPCLoggingEnabled,
- bool /* on or off */)
-#endif
-
-// Socket Stream messages:
-// These are messages from the browser to the SocketStreamHandle on
-// a renderer.
-
-// A |socket_id| is assigned by ViewHostMsg_SocketStream_Connect.
-// The Socket Stream is connected. The SocketStreamHandle should keep track
-// of how much it has pending (how much it has requested to be sent) and
-// shouldn't go over |max_pending_send_allowed| bytes.
-IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_Connected,
- int /* socket_id */,
- int /* max_pending_send_allowed */)
-
-// |data| is received on the Socket Stream.
-IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_ReceivedData,
- int /* socket_id */,
- std::vector<char> /* data */)
-
-// |amount_sent| bytes of data requested by
-// ViewHostMsg_SocketStream_SendData has been sent on the Socket Stream.
-IPC_MESSAGE_CONTROL2(ViewMsg_SocketStream_SentData,
- int /* socket_id */,
- int /* amount_sent */)
-
-// The Socket Stream is closed.
-IPC_MESSAGE_CONTROL1(ViewMsg_SocketStream_Closed,
- int /* socket_id */)
-
// SpellChecker messages.
// Passes some initialization params to the renderer's spellchecker. This can
@@ -1010,32 +941,6 @@ IPC_MESSAGE_ROUTED0(ViewMsg_AccessibilityNotifications_ACK)
IPC_MESSAGE_ROUTED1(ViewMsg_DeviceOrientationUpdated,
ViewMsg_DeviceOrientationUpdated_Params)
-// WebFrameClient::openFileSystem response messages.
-IPC_MESSAGE_CONTROL4(ViewMsg_OpenFileSystemRequest_Complete,
- int /* request_id */,
- bool /* accepted */,
- std::string /* name */,
- FilePath /* root_path */)
-
-// WebFileSystem response messages.
-IPC_MESSAGE_CONTROL1(ViewMsg_FileSystem_DidSucceed,
- int /* request_id */)
-IPC_MESSAGE_CONTROL2(ViewMsg_FileSystem_DidReadMetadata,
- int /* request_id */,
- base::PlatformFileInfo)
-IPC_MESSAGE_CONTROL3(ViewMsg_FileSystem_DidReadDirectory,
- int /* request_id */,
- std::vector<base::FileUtilProxy::Entry> /* entries */,
- bool /* has_more */)
-
-IPC_MESSAGE_CONTROL3(ViewMsg_FileSystem_DidWrite,
- int /* request_id */,
- int64 /* byte count */,
- bool /* complete */)
-IPC_MESSAGE_CONTROL2(ViewMsg_FileSystem_DidFail,
- int /* request_id */,
- base::PlatformFileError /* error_code */)
-
// The response to ViewHostMsg_AsyncOpenFile.
IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenFile_ACK,
base::PlatformFileError /* error_code */,
@@ -1048,6 +953,9 @@ IPC_MESSAGE_ROUTED3(ViewMsg_AsyncOpenFile_ACK,
IPC_MESSAGE_CONTROL1(ViewMsg_SetPhishingModel,
IPC::PlatformFileForTransit /* model_file */)
+// Request a DOM tree when a malware interstitial is shown.
+IPC_MESSAGE_ROUTED0(ViewMsg_GetMalwareDOMDetails)
+
// Tells the renderer to begin phishing detection for the given toplevel URL
// which it has started loading.
IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL)
@@ -1056,15 +964,16 @@ IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL)
IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
int /* selected index, -1 means no selection */)
-// Indicate whether speech input API is enabled or not.
-IPC_MESSAGE_CONTROL1(ViewMsg_SpeechInput_SetFeatureEnabled,
- bool /* enabled */)
-
// Sent in response to a ViewHostMsg_ContextMenu to let the renderer know that
// the menu has been closed.
IPC_MESSAGE_ROUTED1(ViewMsg_ContextMenuClosed,
webkit_glue::CustomContextMenuContext /* custom_context */)
+// Tells the renderer that the network state has changed and that
+// window.navigator.onLine should be updated for all WebViews.
+IPC_MESSAGE_ROUTED1(ViewMsg_NetworkStateChanged,
+ bool /* online */)
+
//-----------------------------------------------------------------------------
// TabContents messages
// These are messages sent from the renderer to the browser process.
@@ -1211,10 +1120,8 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
// The security info is non empty if the resource was originally loaded over
// a secure connection.
// Note: May only be sent once per URL per frame per committed load.
-IPC_MESSAGE_ROUTED4(ViewHostMsg_DidLoadResourceFromMemoryCache,
+IPC_MESSAGE_ROUTED2(ViewHostMsg_DidLoadResourceFromMemoryCache,
GURL /* url */,
- std::string /* frame_origin */,
- std::string /* main_frame_origin */,
std::string /* security info */)
// Sent when the renderer displays insecure content in a secure page.
@@ -1294,28 +1201,6 @@ IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
int /* active_match_ordinal */,
bool /* final_update */)
-// Makes a resource request via the browser.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_RequestResource,
- int /* request_id */,
- ViewHostMsg_Resource_Request)
-
-// Cancels a resource request with the ID given as the parameter.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_CancelRequest,
- int /* request_id */)
-
-// Follows a redirect that occured for the resource request with the ID given
-// as the parameter.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_FollowRedirect,
- int /* request_id */,
- bool /* has_new_first_party_for_cookies */,
- GURL /* new_first_party_for_cookies */)
-
-// Makes a synchronous resource request via the browser.
-IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_SyncLoad,
- int /* request_id */,
- ViewHostMsg_Resource_Request,
- SyncLoadResult)
-
// Used to set a cookie. The cookie is set asynchronously, but will be
// available to a subsequent ViewHostMsg_GetCookies request.
IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie,
@@ -1702,6 +1587,13 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_DidPrintPage,
IPC_SYNC_MESSAGE_ROUTED0_1(ViewHostMsg_GetDefaultPrintSettings,
ViewMsg_Print_Params /* default_settings */)
+// The renderer wants to update the current print settings with new
+// |job_settings|.
+IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_UpdatePrintSettings,
+ int /* document_cookie */,
+ DictionaryValue /* job_settings */,
+ ViewMsg_Print_Params /* current_settings */)
+
// It's the renderer that controls the printing process when it is generated
// by javascript. This step is about showing UI to the user to select the
// final print settings. The output parameter is the same as
@@ -1851,33 +1743,15 @@ IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadFavIcon,
IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPBrowsingContext,
uint32 /* context */)
-// Sent when the renderer process is done processing a DataReceived
-// message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DataReceived_ACK,
- int /* request_id */)
-
IPC_MESSAGE_CONTROL1(ViewHostMsg_RevealFolderInOS,
FilePath /* path */)
-// Sent when the renderer has processed a DataDownloaded message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DataDownloaded_ACK,
- int /* request_id */)
-
-// Sent when the renderer process deletes a resource loader.
-IPC_MESSAGE_CONTROL1(ViewHostMsg_ReleaseDownloadedFile,
- int /* request_id */)
-
// Sent when a provisional load on the main frame redirects.
IPC_MESSAGE_ROUTED3(ViewHostMsg_DidRedirectProvisionalLoad,
int /* page_id */,
GURL /* last url */,
GURL /* url redirected to */)
-// Sent by the renderer process to acknowledge receipt of a
-// UploadProgress message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_UploadProgress_ACK,
- int /* request_id */)
-
// Sent when the renderer changes the zoom level for a particular url, so the
// browser can update its records. If remember is true, then url is used to
// update the zoom level for all pages in that site. Otherwise, the render
@@ -1905,13 +1779,11 @@ IPC_MESSAGE_CONTROL1(ViewHostMsg_TempFileForPrintingWritten,
int /* fd in browser */)
#endif
-#if defined(OS_POSIX)
// Asks the browser to create a block of shared memory for the renderer to
// fill in and pass back to the browser.
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_AllocateSharedMemoryBuffer,
uint32 /* buffer size */,
base::SharedMemoryHandle /* browser handle */)
-#endif
// Provide the browser process with information about the WebCore resource
// cache.
@@ -2232,6 +2104,10 @@ IPC_MESSAGE_ROUTED1(
ViewHostMsg_AccessibilityNotifications,
std::vector<ViewHostMsg_AccessibilityNotification_Params>)
+// Send part of the DOM to the browser, to be used in a malware report.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_MalwareDOMDetails,
+ ViewHostMsg_MalwareDOMDetails_Params)
+
// Message sent from the renderer to the browser to request that the browser
// close all sockets. Used for debugging/testing.
IPC_MESSAGE_CONTROL0(ViewHostMsg_CloseCurrentConnections)
@@ -2243,8 +2119,12 @@ IPC_MESSAGE_CONTROL1(ViewHostMsg_SetCacheMode,
// Message sent from the renderer to the browser to request that the browser
// clear the cache. Used for debugging/testing.
-IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_ClearCache,
- int /* result */)
+// |preserve_ssl_host_info| controls whether clearing the cache will preserve
+// persisted SSL information stored in the cache.
+// |result| is the returned status from the operation.
+IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_ClearCache,
+ bool /* preserve_ssl_host_info */,
+ int /* result */)
// Message sent from the renderer to the browser to request that the browser
// enable or disable spdy. Used for debugging/testing/benchmarking.
@@ -2282,39 +2162,6 @@ IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated,
TranslateErrors::Type /* the error type if available */)
//---------------------------------------------------------------------------
-// Socket Stream messages:
-// These are messages from the SocketStreamHandle to the browser.
-
-// Open new Socket Stream for the |socket_url| identified by |socket_id|
-// in the renderer process.
-// The browser starts connecting asynchronously.
-// Once Socket Stream connection is established, the browser will send
-// ViewMsg_SocketStream_Connected back.
-IPC_MESSAGE_CONTROL2(ViewHostMsg_SocketStream_Connect,
- GURL /* socket_url */,
- int /* socket_id */)
-
-// Request to send data on the Socket Stream.
-// SocketStreamHandle can send data at most |max_pending_send_allowed| bytes,
-// which is given by ViewMsg_SocketStream_Connected at any time.
-// The number of pending bytes can be tracked by size of |data| sent
-// and |amount_sent| parameter of ViewMsg_SocketStream_DataSent.
-// That is, the following constraints is applied:
-// (accumulated total of |data|) - (accumulated total of |amount_sent|)
-// <= |max_pending_send_allowed|
-// If the SocketStreamHandle ever tries to exceed the
-// |max_pending_send_allowed|, the connection will be closed.
-IPC_MESSAGE_CONTROL2(ViewHostMsg_SocketStream_SendData,
- int /* socket_id */,
- std::vector<char> /* data */)
-
-// Request to close the Socket Stream.
-// The browser will send ViewMsg_SocketStream_Closed back when the Socket
-// Stream is completely closed.
-IPC_MESSAGE_CONTROL1(ViewHostMsg_SocketStream_Close,
- int /* socket_id */)
-
-//---------------------------------------------------------------------------
// Request for cryptographic operation messages:
// These are messages from the renderer to the browser to perform a
// cryptographic operation.
@@ -2343,6 +2190,12 @@ IPC_SYNC_MESSAGE_CONTROL1_1(
string16 /* word */,
std::vector<string16> /* suggestions */)
+IPC_MESSAGE_CONTROL4(ViewHostMsg_SpellChecker_PlatformRequestTextCheck,
+ int /* route_id for response */,
+ int /* request identifier given by WebKit */,
+ int /* document tag */,
+ string16 /* sentence */)
+
//---------------------------------------------------------------------------
// Geolocation services messages
@@ -2397,85 +2250,6 @@ IPC_MESSAGE_CONTROL1(ViewHostMsg_DeviceOrientation_StopUpdating,
int /* render_view_id */)
//---------------------------------------------------------------------------
-// FileSystem API messages
-// These are messages sent from the renderer to the browser process.
-
-// WebFrameClient::openFileSystem() message.
-IPC_MESSAGE_CONTROL5(ViewHostMsg_OpenFileSystemRequest,
- int /* request_id */,
- GURL /* origin_url */,
- fileapi::FileSystemType /* type */,
- int64 /* requested_size */,
- bool /* create */)
-
-// WebFileSystem::move() message.
-IPC_MESSAGE_CONTROL3(ViewHostMsg_FileSystem_Move,
- int /* request_id */,
- FilePath /* src path */,
- FilePath /* dest path */)
-
-// WebFileSystem::copy() message.
-IPC_MESSAGE_CONTROL3(ViewHostMsg_FileSystem_Copy,
- int /* request_id */,
- FilePath /* src path */,
- FilePath /* dest path */)
-
-// WebFileSystem::remove() message.
-IPC_MESSAGE_CONTROL3(ViewHostMsg_FileSystem_Remove,
- int /* request_id */,
- FilePath /* path */,
- bool /* recursive */)
-
-// WebFileSystem::readMetadata() message.
-IPC_MESSAGE_CONTROL2(ViewHostMsg_FileSystem_ReadMetadata,
- int /* request_id */,
- FilePath /* path */)
-
-// WebFileSystem::create() message.
-IPC_MESSAGE_CONTROL5(ViewHostMsg_FileSystem_Create,
- int /* request_id */,
- FilePath /* path */,
- bool /* exclusive */,
- bool /* is_directory */,
- bool /* recursive */)
-
-// WebFileSystem::exists() messages.
-IPC_MESSAGE_CONTROL3(ViewHostMsg_FileSystem_Exists,
- int /* request_id */,
- FilePath /* path */,
- bool /* is_directory */)
-
-// WebFileSystem::readDirectory() message.
-IPC_MESSAGE_CONTROL2(ViewHostMsg_FileSystem_ReadDirectory,
- int /* request_id */,
- FilePath /* path */)
-
-// WebFileWriter::write() message.
-IPC_MESSAGE_CONTROL4(ViewHostMsg_FileSystem_Write,
- int /* request id */,
- FilePath /* file path */,
- GURL /* blob URL */,
- int64 /* position */)
-
-// WebFileWriter::truncate() message.
-IPC_MESSAGE_CONTROL3(ViewHostMsg_FileSystem_Truncate,
- int /* request id */,
- FilePath /* file path */,
- int64 /* length */)
-
-// Pepper's Touch() message.
-IPC_MESSAGE_CONTROL4(ViewHostMsg_FileSystem_TouchFile,
- int /* request_id */,
- FilePath /* path */,
- base::Time /* last_access_time */,
- base::Time /* last_modified_time */)
-
-// WebFileWriter::cancel() message.
-IPC_MESSAGE_CONTROL2(ViewHostMsg_FileSystem_CancelWrite,
- int /* request id */,
- int /* id of request to cancel */)
-
-//---------------------------------------------------------------------------
// Blob messages:
// Registers a blob URL referring to the specified blob data.
@@ -2502,13 +2276,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_InstantSupportDetermined,
int32 /* page_id */,
bool /* result */)
-// Client-Side Phishing Detector ---------------------------------------------
-// Inform the browser that the current URL is phishing according to the
-// client-side phishing detector.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DetectedPhishingSite,
- GURL /* phishing_url */,
- double /* phishing_score */)
-
// Response from ViewMsg_ScriptEvalRequest. The ID is the parameter supplied
// to ViewMsg_ScriptEvalRequest. The result has the value returned by the
// script as it's only element, one of Null, Boolean, Integer, Real, Date, or
@@ -2531,3 +2298,9 @@ IPC_MESSAGE_ROUTED0(ViewHostMsg_PDFHasUnsupportedFeature)
IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl,
int /* cmd */,
int /* param */)
+
+// Register a new handler for URL requests with the given scheme.
+IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler,
+ std::string /* scheme */,
+ GURL /* url */,
+ string16 /* title */)
diff --git a/chrome/common/render_messages_params.cc b/chrome/common/render_messages_params.cc
index 3362704..02ac083 100644
--- a/chrome/common/render_messages_params.cc
+++ b/chrome/common/render_messages_params.cc
@@ -29,9 +29,9 @@ ViewHostMsg_FrameNavigate_Params::ViewHostMsg_FrameNavigate_Params()
should_update_history(false),
gesture(NavigationGestureUser),
is_post(false),
- is_content_filtered(false),
was_within_same_page(false),
- http_status_code(0) {
+ http_status_code(0),
+ was_fetched_via_proxy(false) {
}
ViewHostMsg_FrameNavigate_Params::~ViewHostMsg_FrameNavigate_Params() {
@@ -59,21 +59,6 @@ ViewMsg_ClosePage_Params::ViewMsg_ClosePage_Params()
ViewMsg_ClosePage_Params::~ViewMsg_ClosePage_Params() {
}
-ViewHostMsg_Resource_Request::ViewHostMsg_Resource_Request()
- : load_flags(0),
- origin_pid(0),
- resource_type(ResourceType::MAIN_FRAME),
- request_context(0),
- appcache_host_id(0),
- download_to_file(false),
- has_user_gesture(false),
- host_renderer_id(0),
- host_render_view_id(0) {
-}
-
-ViewHostMsg_Resource_Request::~ViewHostMsg_Resource_Request() {
-}
-
ViewMsg_Print_Params::ViewMsg_Print_Params()
: margin_top(0),
margin_left(0),
@@ -123,7 +108,7 @@ ViewMsg_PrintPages_Params::~ViewMsg_PrintPages_Params() {
}
ViewHostMsg_DidPreviewDocument_Params::ViewHostMsg_DidPreviewDocument_Params()
- : data_size(0) {
+ : data_size(0), expected_pages_count(0) {
#if defined(OS_WIN)
// Initialize |metafile_data_handle| only on Windows because it maps
// base::SharedMemoryHandle to HANDLE. We do not need to initialize this
@@ -272,6 +257,18 @@ ViewHostMsg_DomMessage_Params::ViewHostMsg_DomMessage_Params()
ViewHostMsg_DomMessage_Params::~ViewHostMsg_DomMessage_Params() {
}
+ViewHostMsg_MalwareDOMDetails_Node::ViewHostMsg_MalwareDOMDetails_Node() {
+}
+
+ViewHostMsg_MalwareDOMDetails_Node::~ViewHostMsg_MalwareDOMDetails_Node() {
+}
+
+ViewHostMsg_MalwareDOMDetails_Params::ViewHostMsg_MalwareDOMDetails_Params() {
+}
+
+ViewHostMsg_MalwareDOMDetails_Params::~ViewHostMsg_MalwareDOMDetails_Params() {
+}
+
ViewMsg_ExtensionLoaded_Params::ViewMsg_ExtensionLoaded_Params() {
}
@@ -315,10 +312,15 @@ scoped_refptr<Extension>
ViewMsg_ExtensionLoaded_Params::ConvertToExtension() const {
// Extensions that are loaded unpacked won't have a key.
const bool kRequireKey = false;
+
+ // The extension may have been loaded in a way that does not require
+ // strict error checks to pass. Do not do strict checks here.
+ const bool kStrictErrorChecks = false;
std::string error;
scoped_refptr<Extension> extension(
- Extension::Create(path, location, *manifest, kRequireKey, &error));
+ Extension::Create(path, location, *manifest, kRequireKey,
+ kStrictErrorChecks, &error));
if (!extension.get())
LOG(ERROR) << "Error deserializing extension: " << error;
@@ -373,46 +375,6 @@ struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> {
}
};
-template <>
-struct ParamTraits<ResourceType::Type> {
- typedef ResourceType::Type param_type;
- static void Write(Message* m, const param_type& p) {
- m->WriteInt(p);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- int type;
- if (!m->ReadInt(iter, &type) || !ResourceType::ValidType(type))
- return false;
- *p = ResourceType::FromInt(type);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- std::string type;
- switch (p) {
- case ResourceType::MAIN_FRAME:
- type = "MAIN_FRAME";
- break;
- case ResourceType::SUB_FRAME:
- type = "SUB_FRAME";
- break;
- case ResourceType::SUB_RESOURCE:
- type = "SUB_RESOURCE";
- break;
- case ResourceType::OBJECT:
- type = "OBJECT";
- break;
- case ResourceType::MEDIA:
- type = "MEDIA";
- break;
- default:
- type = "UNKNOWN";
- break;
- }
-
- LogParam(type, l);
- }
-};
-
template<>
struct ParamTraits<NavigationGesture> {
typedef NavigationGesture param_type;
@@ -757,9 +719,11 @@ void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Write(Message* m,
WriteParam(m, p.gesture);
WriteParam(m, p.contents_mime_type);
WriteParam(m, p.is_post);
- WriteParam(m, p.is_content_filtered);
WriteParam(m, p.was_within_same_page);
WriteParam(m, p.http_status_code);
+ WriteParam(m, p.socket_address);
+ WriteParam(m, p.was_fetched_via_proxy);
+ WriteParam(m, p.content_state);
}
bool ParamTraits<ViewHostMsg_FrameNavigate_Params>::Read(const Message* m,
@@ -780,9 +744,11 @@ bool ParamTraits<ViewHostMsg_FrameNavigate_Params>::Read(const Message* m,
ReadParam(m, iter, &p->gesture) &&
ReadParam(m, iter, &p->contents_mime_type) &&
ReadParam(m, iter, &p->is_post) &&
- ReadParam(m, iter, &p->is_content_filtered) &&
ReadParam(m, iter, &p->was_within_same_page) &&
- ReadParam(m, iter, &p->http_status_code);
+ ReadParam(m, iter, &p->http_status_code) &&
+ ReadParam(m, iter, &p->socket_address) &&
+ ReadParam(m, iter, &p->was_fetched_via_proxy) &&
+ ReadParam(m, iter, &p->content_state);
}
void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Log(const param_type& p,
@@ -816,11 +782,13 @@ void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Log(const param_type& p,
l->append(", ");
LogParam(p.is_post, l);
l->append(", ");
- LogParam(p.is_content_filtered, l);
- l->append(", ");
LogParam(p.was_within_same_page, l);
l->append(", ");
LogParam(p.http_status_code, l);
+ l->append(", ");
+ LogParam(p.socket_address, l);
+ l->append(", ");
+ LogParam(p.was_fetched_via_proxy, l);
l->append(")");
}
@@ -914,83 +882,6 @@ void ParamTraits<ViewMsg_ClosePage_Params>::Log(const param_type& p,
l->append(")");
}
-void ParamTraits<ViewHostMsg_Resource_Request>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.method);
- WriteParam(m, p.url);
- WriteParam(m, p.first_party_for_cookies);
- WriteParam(m, p.referrer);
- WriteParam(m, p.frame_origin);
- WriteParam(m, p.main_frame_origin);
- WriteParam(m, p.headers);
- WriteParam(m, p.load_flags);
- WriteParam(m, p.origin_pid);
- WriteParam(m, p.resource_type);
- WriteParam(m, p.request_context);
- WriteParam(m, p.appcache_host_id);
- WriteParam(m, p.upload_data);
- WriteParam(m, p.download_to_file);
- WriteParam(m, p.has_user_gesture);
- WriteParam(m, p.host_renderer_id);
- WriteParam(m, p.host_render_view_id);
-}
-
-bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m,
- void** iter,
- param_type* r) {
- return
- ReadParam(m, iter, &r->method) &&
- ReadParam(m, iter, &r->url) &&
- ReadParam(m, iter, &r->first_party_for_cookies) &&
- ReadParam(m, iter, &r->referrer) &&
- ReadParam(m, iter, &r->frame_origin) &&
- ReadParam(m, iter, &r->main_frame_origin) &&
- ReadParam(m, iter, &r->headers) &&
- ReadParam(m, iter, &r->load_flags) &&
- ReadParam(m, iter, &r->origin_pid) &&
- ReadParam(m, iter, &r->resource_type) &&
- ReadParam(m, iter, &r->request_context) &&
- ReadParam(m, iter, &r->appcache_host_id) &&
- ReadParam(m, iter, &r->upload_data) &&
- ReadParam(m, iter, &r->download_to_file) &&
- ReadParam(m, iter, &r->has_user_gesture) &&
- ReadParam(m, iter, &r->host_renderer_id) &&
- ReadParam(m, iter, &r->host_render_view_id);
-}
-
-void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.method, l);
- l->append(", ");
- LogParam(p.url, l);
- l->append(", ");
- LogParam(p.referrer, l);
- l->append(", ");
- LogParam(p.frame_origin, l);
- l->append(", ");
- LogParam(p.main_frame_origin, l);
- l->append(", ");
- LogParam(p.load_flags, l);
- l->append(", ");
- LogParam(p.origin_pid, l);
- l->append(", ");
- LogParam(p.resource_type, l);
- l->append(", ");
- LogParam(p.request_context, l);
- l->append(", ");
- LogParam(p.appcache_host_id, l);
- l->append(", ");
- LogParam(p.download_to_file, l);
- l->append(", ");
- LogParam(p.has_user_gesture, l);
- l->append(", ");
- LogParam(p.host_renderer_id, l);
- l->append(", ");
- LogParam(p.host_render_view_id, l);
- l->append(")");
-}
-
void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) {
WriteParam(m, p.page_size);
WriteParam(m, p.printable_size);
@@ -1067,6 +958,7 @@ void ParamTraits<ViewHostMsg_DidPreviewDocument_Params>::Write(Message* m,
WriteParam(m, p.metafile_data_handle);
WriteParam(m, p.data_size);
WriteParam(m, p.document_cookie);
+ WriteParam(m, p.expected_pages_count);
}
bool ParamTraits<ViewHostMsg_DidPreviewDocument_Params>::Read(const Message* m,
@@ -1074,7 +966,8 @@ bool ParamTraits<ViewHostMsg_DidPreviewDocument_Params>::Read(const Message* m,
param_type* p) {
return ReadParam(m, iter, &p->metafile_data_handle) &&
ReadParam(m, iter, &p->data_size) &&
- ReadParam(m, iter, &p->document_cookie);
+ ReadParam(m, iter, &p->document_cookie) &&
+ ReadParam(m, iter, &p->expected_pages_count);
}
void ParamTraits<ViewHostMsg_DidPreviewDocument_Params>::Log(
@@ -1597,55 +1490,84 @@ void ParamTraits<ViewHostMsg_DomMessage_Params>::Log(const param_type& p,
l->append(")");
}
-void ParamTraits<base::FileUtilProxy::Entry>::Write(
+void ParamTraits<ViewHostMsg_AccessibilityNotification_Params>::Write(
Message* m,
const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.is_directory);
+ WriteParam(m, p.notification_type);
+ WriteParam(m, p.acc_obj);
}
-bool ParamTraits<base::FileUtilProxy::Entry>::Read(
+bool ParamTraits<ViewHostMsg_AccessibilityNotification_Params>::Read(
const Message* m,
void** iter,
param_type* p) {
return
- ReadParam(m, iter, &p->name) &&
- ReadParam(m, iter, &p->is_directory);
+ ReadParam(m, iter, &p->notification_type) &&
+ ReadParam(m, iter, &p->acc_obj);
}
-void ParamTraits<base::FileUtilProxy::Entry>::Log(
+void ParamTraits<ViewHostMsg_AccessibilityNotification_Params>::Log(
const param_type& p,
std::string* l) {
l->append("(");
- LogParam(p.name, l);
+ LogParam(p.notification_type, l);
l->append(", ");
- LogParam(p.is_directory, l);
+ LogParam(p.acc_obj, l);
l->append(")");
}
-void ParamTraits<ViewHostMsg_AccessibilityNotification_Params>::Write(
+void ParamTraits<ViewHostMsg_MalwareDOMDetails_Params>::Write(
Message* m,
const param_type& p) {
- WriteParam(m, p.notification_type);
- WriteParam(m, p.acc_obj);
+ WriteParam(m, p.nodes);
}
-bool ParamTraits<ViewHostMsg_AccessibilityNotification_Params>::Read(
+bool ParamTraits<ViewHostMsg_MalwareDOMDetails_Params>::Read(
+ const Message* m,
+ void** iter,
+ param_type* p) {
+ return ReadParam(m, iter, &p->nodes);
+}
+
+void ParamTraits<ViewHostMsg_MalwareDOMDetails_Params>::Log(
+ const param_type& p,
+ std::string* l) {
+ l->append("(");
+ LogParam(p.nodes, l);
+ l->append(")");
+}
+
+void ParamTraits<ViewHostMsg_MalwareDOMDetails_Node>::Write(
+ Message* m,
+ const param_type& p) {
+ WriteParam(m, p.url);
+ WriteParam(m, p.tag_name);
+ WriteParam(m, p.parent);
+ WriteParam(m, p.children);
+}
+
+bool ParamTraits<ViewHostMsg_MalwareDOMDetails_Node>::Read(
const Message* m,
void** iter,
param_type* p) {
return
- ReadParam(m, iter, &p->notification_type) &&
- ReadParam(m, iter, &p->acc_obj);
+ ReadParam(m, iter, &p->url) &&
+ ReadParam(m, iter, &p->tag_name) &&
+ ReadParam(m, iter, &p->parent) &&
+ ReadParam(m, iter, &p->children);
}
-void ParamTraits<ViewHostMsg_AccessibilityNotification_Params>::Log(
+void ParamTraits<ViewHostMsg_MalwareDOMDetails_Node>::Log(
const param_type& p,
std::string* l) {
l->append("(");
- LogParam(p.notification_type, l);
+ LogParam(p.url, l);
l->append(", ");
- LogParam(p.acc_obj, l);
+ LogParam(p.tag_name, l);
+ l->append(", ");
+ LogParam(p.parent, l);
+ l->append(", ");
+ LogParam(p.children, l);
l->append(")");
}
diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h
index 7bf95e0..fb4b432 100644
--- a/chrome/common/render_messages_params.h
+++ b/chrome/common/render_messages_params.h
@@ -11,7 +11,6 @@
#include "app/surface/transport_dib.h"
#include "base/file_path.h"
-#include "base/file_util_proxy.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
#include "base/time.h"
@@ -28,11 +27,11 @@
#include "googleurl/src/gurl.h"
#include "ipc/ipc_param_traits.h"
#include "media/audio/audio_parameters.h"
+#include "net/base/host_port_pair.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "webkit/glue/password_form.h"
-#include "webkit/glue/resource_type.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webmenuitem.h"
#include "webkit/glue/webpreferences.h"
@@ -292,10 +291,6 @@ struct ViewHostMsg_FrameNavigate_Params {
// True if this was a post request.
bool is_post;
- // Whether the content of the frame was replaced with some alternate content
- // (this can happen if the resource was insecure).
- bool is_content_filtered;
-
// Whether the frame navigation resulted in no change to the documents within
// the page. For example, the navigation may have just resulted in scrolling
// to a named anchor.
@@ -303,6 +298,16 @@ struct ViewHostMsg_FrameNavigate_Params {
// The status code of the HTTP request.
int http_status_code;
+
+ // Remote address of the socket which fetched this resource.
+ net::HostPortPair socket_address;
+
+ // True if the connection was proxied. In this case, socket_address
+ // will represent the address of the proxy, rather than the remote host.
+ bool was_fetched_via_proxy;
+
+ // Serialized history item state to store in the navigation entry.
+ std::string content_state;
};
// Values that may be OR'd together to form the 'flags' parameter of a
@@ -345,7 +350,7 @@ struct ViewHostMsg_UpdateRect_Params {
gfx::Rect scroll_rect;
// The scroll offset of the render view.
- gfx::Size scroll_offset;
+ gfx::Point scroll_offset;
// The regions of the bitmap (in view coords) that contain updated pixels.
// In the case of scrolling, this includes the scroll damage rect.
@@ -421,74 +426,6 @@ struct ViewMsg_ClosePage_Params {
int new_request_id;
};
-// Parameters for a resource request.
-struct ViewHostMsg_Resource_Request {
- ViewHostMsg_Resource_Request();
- ~ViewHostMsg_Resource_Request();
-
- // The request method: GET, POST, etc.
- std::string method;
-
- // The requested URL.
- GURL url;
-
- // Usually the URL of the document in the top-level window, which may be
- // checked by the third-party cookie blocking policy. Leaving it empty may
- // lead to undesired cookie blocking. Third-party cookie blocking can be
- // bypassed by setting first_party_for_cookies = url, but this should ideally
- // only be done if there really is no way to determine the correct value.
- GURL first_party_for_cookies;
-
- // The referrer to use (may be empty).
- GURL referrer;
-
- // The origin of the frame that is associated with this request. This is used
- // to update our insecure content state.
- std::string frame_origin;
-
- // The origin of the main frame (top-level frame) that is associated with this
- // request. This is used to update our insecure content state.
- std::string main_frame_origin;
-
- // Additional HTTP request headers.
- std::string headers;
-
- // net::URLRequest load flags (0 by default).
- int load_flags;
-
- // Process ID from which this request originated, or zero if it originated
- // in the renderer itself.
- int origin_pid;
-
- // What this resource load is for (main frame, sub-frame, sub-resource,
- // object).
- ResourceType::Type resource_type;
-
- // Used by plugin->browser requests to get the correct net::URLRequestContext.
- uint32 request_context;
-
- // Indicates which frame (or worker context) the request is being loaded into,
- // or kNoHostId.
- int appcache_host_id;
-
- // Optional upload data (may be null).
- scoped_refptr<net::UploadData> upload_data;
-
- bool download_to_file;
-
- // True if the request was user initiated.
- bool has_user_gesture;
-
- // The following two members are specified if the request is initiated by
- // a plugin like Gears.
-
- // Contains the id of the host renderer.
- int host_renderer_id;
-
- // Contains the id of the host render view.
- int host_render_view_id;
-};
-
// Parameters for a render request.
struct ViewMsg_Print_Params {
ViewMsg_Print_Params();
@@ -573,6 +510,9 @@ struct ViewHostMsg_DidPreviewDocument_Params {
// Cookie for the document to ensure correctness.
int document_cookie;
+
+ // Store the expected pages count.
+ int expected_pages_count;
};
// Parameters to describe a rendered page.
@@ -926,6 +866,36 @@ struct ViewHostMsg_AccessibilityNotification_Params {
webkit_glue::WebAccessibility acc_obj;
};
+// A node is essentially a frame.
+struct ViewHostMsg_MalwareDOMDetails_Node {
+ ViewHostMsg_MalwareDOMDetails_Node();
+ ~ViewHostMsg_MalwareDOMDetails_Node();
+
+ // URL of this resource. Can be empty.
+ GURL url;
+
+ // If this resource was in the "src" attribute of a tag, this is the tagname
+ // (eg "IFRAME"). Can be empty.
+ std::string tag_name;
+
+ // URL of the parent node. Can be empty.
+ GURL parent;
+
+ // children of this node. Can be emtpy.
+ std::vector<GURL> children;
+};
+
+// Parameters to describe interesting details from a rendered page that lead
+// to a malware warning.
+struct ViewHostMsg_MalwareDOMDetails_Params {
+ ViewHostMsg_MalwareDOMDetails_Params();
+ ~ViewHostMsg_MalwareDOMDetails_Params();
+
+ // All the nodes we extracted.
+ std::vector<ViewHostMsg_MalwareDOMDetails_Node> nodes;
+};
+
+
namespace IPC {
class Message;
@@ -996,14 +966,6 @@ struct ParamTraits<ViewMsg_ClosePage_Params> {
};
template <>
-struct ParamTraits<ViewHostMsg_Resource_Request> {
- typedef ViewHostMsg_Resource_Request param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-
-template <>
struct ParamTraits<ViewMsg_Print_Params> {
typedef ViewMsg_Print_Params param_type;
static void Write(Message* m, const param_type& p);
@@ -1140,16 +1102,24 @@ struct ParamTraits<ViewHostMsg_DomMessage_Params> {
};
template <>
-struct ParamTraits<base::FileUtilProxy::Entry> {
- typedef base::FileUtilProxy::Entry param_type;
+struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> {
+ typedef ViewHostMsg_AccessibilityNotification_Params param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, void** iter, param_type* p);
static void Log(const param_type& p, std::string* l);
};
template <>
-struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> {
- typedef ViewHostMsg_AccessibilityNotification_Params param_type;
+struct ParamTraits<ViewHostMsg_MalwareDOMDetails_Params> {
+ typedef ViewHostMsg_MalwareDOMDetails_Params param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* p);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
+struct ParamTraits<ViewHostMsg_MalwareDOMDetails_Node> {
+ typedef ViewHostMsg_MalwareDOMDetails_Node param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, void** iter, param_type* p);
static void Log(const param_type& p, std::string* l);
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc
deleted file mode 100644
index 86321b5..0000000
--- a/chrome/common/resource_dispatcher.cc
+++ /dev/null
@@ -1,623 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading
-
-#include "chrome/common/resource_dispatcher.h"
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/file_path.h"
-#include "base/message_loop.h"
-#include "base/shared_memory.h"
-#include "base/string_util.h"
-#include "chrome/common/extensions/extension_localization_peer.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
-#include "chrome/common/resource_response.h"
-#include "chrome/common/security_filter_peer.h"
-#include "net/base/net_errors.h"
-#include "net/base/net_util.h"
-#include "net/base/upload_data.h"
-#include "net/http/http_response_headers.h"
-#include "webkit/glue/resource_type.h"
-#include "webkit/glue/webkit_glue.h"
-
-// Each resource request is assigned an ID scoped to this process.
-static int MakeRequestID() {
- // NOTE: The resource_dispatcher_host also needs probably unique
- // request_ids, so they count down from -2 (-1 is a special we're
- // screwed value), while the renderer process counts up.
- static int next_request_id = 0;
- return next_request_id++;
-}
-
-// ResourceLoaderBridge implementation ----------------------------------------
-
-namespace webkit_glue {
-
-class IPCResourceLoaderBridge : public ResourceLoaderBridge {
- public:
- IPCResourceLoaderBridge(ResourceDispatcher* dispatcher,
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id);
- virtual ~IPCResourceLoaderBridge();
-
- // ResourceLoaderBridge
- virtual void AppendDataToUpload(const char* data, int data_len);
- virtual void AppendFileRangeToUpload(
- const FilePath& path,
- uint64 offset,
- uint64 length,
- const base::Time& expected_modification_time);
- virtual void AppendBlobToUpload(const GURL& blob_url);
- virtual void SetUploadIdentifier(int64 identifier);
- virtual bool Start(Peer* peer);
- virtual void Cancel();
- virtual void SetDefersLoading(bool value);
- virtual void SyncLoad(SyncLoadResponse* response);
-
- private:
- ResourceLoaderBridge::Peer* peer_;
-
- // The resource dispatcher for this loader. The bridge doesn't own it, but
- // it's guaranteed to outlive the bridge.
- ResourceDispatcher* dispatcher_;
-
- // The request to send, created on initialization for modification and
- // appending data.
- ViewHostMsg_Resource_Request request_;
-
- // ID for the request, valid once Start()ed, -1 if not valid yet.
- int request_id_;
-
- // The routing id used when sending IPC messages.
- int routing_id_;
-
- // The following two members are specified if the request is initiated by
- // a plugin like Gears.
-
- // Contains the id of the host renderer.
- int host_renderer_id_;
-
- // Contains the id of the host render view.
- int host_render_view_id_;
-};
-
-IPCResourceLoaderBridge::IPCResourceLoaderBridge(
- ResourceDispatcher* dispatcher,
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id)
- : peer_(NULL),
- dispatcher_(dispatcher),
- request_id_(-1),
- routing_id_(request_info.routing_id),
- host_renderer_id_(host_renderer_id),
- host_render_view_id_(host_render_view_id) {
- DCHECK(dispatcher_) << "no resource dispatcher";
- request_.method = request_info.method;
- request_.url = request_info.url;
- request_.first_party_for_cookies = request_info.first_party_for_cookies;
- request_.referrer = request_info.referrer;
- request_.frame_origin = request_info.frame_origin;
- request_.main_frame_origin = request_info.main_frame_origin;
- request_.headers = request_info.headers;
- request_.load_flags = request_info.load_flags;
- request_.origin_pid = request_info.requestor_pid;
- request_.resource_type = request_info.request_type;
- request_.request_context = request_info.request_context;
- request_.appcache_host_id = request_info.appcache_host_id;
- request_.download_to_file = request_info.download_to_file;
- request_.has_user_gesture = request_info.has_user_gesture;
- request_.host_renderer_id = host_renderer_id_;
- request_.host_render_view_id = host_render_view_id_;
-}
-
-IPCResourceLoaderBridge::~IPCResourceLoaderBridge() {
- // we remove our hook for the resource dispatcher only when going away, since
- // it doesn't keep track of whether we've force terminated the request
- if (request_id_ >= 0) {
- // this operation may fail, as the dispatcher will have preemptively
- // removed us when the renderer sends the ReceivedAllData message.
- dispatcher_->RemovePendingRequest(request_id_);
-
- if (request_.download_to_file) {
- dispatcher_->message_sender()->Send(
- new ViewHostMsg_ReleaseDownloadedFile(request_id_));
- }
- }
-}
-
-void IPCResourceLoaderBridge::AppendDataToUpload(const char* data,
- int data_len) {
- DCHECK(request_id_ == -1) << "request already started";
-
- // don't bother appending empty data segments
- if (data_len == 0)
- return;
-
- if (!request_.upload_data)
- request_.upload_data = new net::UploadData();
- request_.upload_data->AppendBytes(data, data_len);
-}
-
-void IPCResourceLoaderBridge::AppendFileRangeToUpload(
- const FilePath& path, uint64 offset, uint64 length,
- const base::Time& expected_modification_time) {
- DCHECK(request_id_ == -1) << "request already started";
-
- if (!request_.upload_data)
- request_.upload_data = new net::UploadData();
- request_.upload_data->AppendFileRange(path, offset, length,
- expected_modification_time);
-}
-
-void IPCResourceLoaderBridge::AppendBlobToUpload(const GURL& blob_url) {
- DCHECK(request_id_ == -1) << "request already started";
-
- if (!request_.upload_data)
- request_.upload_data = new net::UploadData();
- request_.upload_data->AppendBlob(blob_url);
-}
-
-void IPCResourceLoaderBridge::SetUploadIdentifier(int64 identifier) {
- DCHECK(request_id_ == -1) << "request already started";
-
- if (!request_.upload_data)
- request_.upload_data = new net::UploadData();
- request_.upload_data->set_identifier(identifier);
-}
-
-// Writes a footer on the message and sends it
-bool IPCResourceLoaderBridge::Start(Peer* peer) {
- if (request_id_ != -1) {
- NOTREACHED() << "Starting a request twice";
- return false;
- }
-
- peer_ = peer;
-
- // generate the request ID, and append it to the message
- request_id_ = dispatcher_->AddPendingRequest(
- peer_, request_.resource_type, request_.url);
-
- return dispatcher_->message_sender()->Send(
- new ViewHostMsg_RequestResource(routing_id_, request_id_, request_));
-}
-
-void IPCResourceLoaderBridge::Cancel() {
- if (request_id_ < 0) {
- NOTREACHED() << "Trying to cancel an unstarted request";
- return;
- }
-
- dispatcher_->CancelPendingRequest(routing_id_, request_id_);
-
- // We can't remove the request ID from the resource dispatcher because more
- // data might be pending. Sending the cancel message may cause more data
- // to be flushed, and will then cause a complete message to be sent.
-}
-
-void IPCResourceLoaderBridge::SetDefersLoading(bool value) {
- if (request_id_ < 0) {
- NOTREACHED() << "Trying to (un)defer an unstarted request";
- return;
- }
-
- dispatcher_->SetDefersLoading(request_id_, value);
-}
-
-void IPCResourceLoaderBridge::SyncLoad(SyncLoadResponse* response) {
- if (request_id_ != -1) {
- NOTREACHED() << "Starting a request twice";
- response->status.set_status(net::URLRequestStatus::FAILED);
- return;
- }
-
- request_id_ = MakeRequestID();
-
- SyncLoadResult result;
- IPC::SyncMessage* msg = new ViewHostMsg_SyncLoad(routing_id_, request_id_,
- request_, &result);
- // NOTE: This may pump events (see RenderThread::Send).
- if (!dispatcher_->message_sender()->Send(msg)) {
- response->status.set_status(net::URLRequestStatus::FAILED);
- return;
- }
-
- response->status = result.status;
- response->url = result.final_url;
- response->headers = result.headers;
- response->mime_type = result.mime_type;
- response->charset = result.charset;
- response->request_time = result.request_time;
- response->response_time = result.response_time;
- response->connection_id = result.connection_id;
- response->connection_reused = result.connection_reused;
- response->load_timing = result.load_timing;
- response->devtools_info = result.devtools_info;
- response->data.swap(result.data);
- response->download_file_path = result.download_file_path;
-}
-
-} // namespace webkit_glue
-
-// ResourceDispatcher ---------------------------------------------------------
-
-ResourceDispatcher::ResourceDispatcher(IPC::Message::Sender* sender)
- : message_sender_(sender),
- ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
-}
-
-ResourceDispatcher::~ResourceDispatcher() {
-}
-
-// ResourceDispatcher implementation ------------------------------------------
-
-bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
- if (!IsResourceDispatcherMessage(message)) {
- return false;
- }
-
- int request_id;
-
- void* iter = NULL;
- if (!message.ReadInt(&iter, &request_id)) {
- NOTREACHED() << "malformed resource message";
- return true;
- }
-
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info) {
- // Release resources in the message if it is a data message.
- ReleaseResourcesInDataMessage(message);
- return true;
- }
-
- if (request_info->is_deferred) {
- request_info->deferred_message_queue.push_back(new IPC::Message(message));
- return true;
- }
- // Make sure any deferred messages are dispatched before we dispatch more.
- if (!request_info->deferred_message_queue.empty()) {
- FlushDeferredMessages(request_id);
- // The request could have been deferred now. If yes then the current
- // message has to be queued up. The request_info instance should remain
- // valid here as there are pending messages for it.
- DCHECK(pending_requests_.find(request_id) != pending_requests_.end());
- if (request_info->is_deferred) {
- request_info->deferred_message_queue.push_back(new IPC::Message(message));
- return true;
- }
- }
-
- DispatchMessage(message);
- return true;
-}
-
-ResourceDispatcher::PendingRequestInfo*
-ResourceDispatcher::GetPendingRequestInfo(int request_id) {
- PendingRequestList::iterator it = pending_requests_.find(request_id);
- if (it == pending_requests_.end()) {
- // This might happen for kill()ed requests on the webkit end, so perhaps it
- // shouldn't be a warning...
- DLOG(WARNING) << "Received message for a nonexistent or finished request";
- return NULL;
- }
- return &(it->second);
-}
-
-void ResourceDispatcher::OnUploadProgress(
- const IPC::Message& message, int request_id, int64 position, int64 size) {
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
-
- request_info->peer->OnUploadProgress(position, size);
-
- // Acknowledge receipt
- message_sender()->Send(
- new ViewHostMsg_UploadProgress_ACK(message.routing_id(), request_id));
-}
-
-void ResourceDispatcher::OnReceivedResponse(
- int request_id, const ResourceResponseHead& response_head) {
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
-
- if (response_head.replace_extension_localization_templates) {
- webkit_glue::ResourceLoaderBridge::Peer* new_peer =
- ExtensionLocalizationPeer::CreateExtensionLocalizationPeer(
- request_info->peer, message_sender(), response_head.mime_type,
- request_info->url);
- if (new_peer)
- request_info->peer = new_peer;
- }
-
- request_info->peer->OnReceivedResponse(response_head, false);
-}
-
-void ResourceDispatcher::OnReceivedCachedMetadata(
- int request_id, const std::vector<char>& data) {
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
-
- if (data.size())
- request_info->peer->OnReceivedCachedMetadata(&data.front(), data.size());
-}
-
-void ResourceDispatcher::OnReceivedData(const IPC::Message& message,
- int request_id,
- base::SharedMemoryHandle shm_handle,
- int data_len) {
- // Acknowledge the reception of this data.
- message_sender()->Send(
- new ViewHostMsg_DataReceived_ACK(message.routing_id(), request_id));
-
- const bool shm_valid = base::SharedMemory::IsHandleValid(shm_handle);
- DCHECK((shm_valid && data_len > 0) || (!shm_valid && !data_len));
- base::SharedMemory shared_mem(shm_handle, true); // read only
-
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
-
- if (data_len > 0 && shared_mem.Map(data_len)) {
- const char* data = static_cast<char*>(shared_mem.memory());
- request_info->peer->OnReceivedData(data, data_len);
- }
-}
-
-void ResourceDispatcher::OnDownloadedData(const IPC::Message& message,
- int request_id,
- int data_len) {
- // Acknowledge the reception of this message.
- message_sender()->Send(
- new ViewHostMsg_DataDownloaded_ACK(message.routing_id(), request_id));
-
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
-
- request_info->peer->OnDownloadedData(data_len);
-}
-
-void ResourceDispatcher::OnReceivedRedirect(
- const IPC::Message& message,
- int request_id,
- const GURL& new_url,
- const webkit_glue::ResourceResponseInfo& info) {
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
-
- int32 routing_id = message.routing_id();
- bool has_new_first_party_for_cookies = false;
- GURL new_first_party_for_cookies;
- if (request_info->peer->OnReceivedRedirect(new_url, info,
- &has_new_first_party_for_cookies,
- &new_first_party_for_cookies)) {
- // Double-check if the request is still around. The call above could
- // potentially remove it.
- request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
- request_info->pending_redirect_message.reset(
- new ViewHostMsg_FollowRedirect(routing_id, request_id,
- has_new_first_party_for_cookies,
- new_first_party_for_cookies));
- if (!request_info->is_deferred) {
- FollowPendingRedirect(request_id, *request_info);
- }
- } else {
- CancelPendingRequest(routing_id, request_id);
- }
-}
-
-void ResourceDispatcher::FollowPendingRedirect(
- int request_id,
- PendingRequestInfo& request_info) {
- IPC::Message* msg = request_info.pending_redirect_message.release();
- if (msg)
- message_sender()->Send(msg);
-}
-
-void ResourceDispatcher::OnRequestComplete(int request_id,
- const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time) {
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info)
- return;
-
- webkit_glue::ResourceLoaderBridge::Peer* peer = request_info->peer;
-
- if (status.status() == net::URLRequestStatus::CANCELED &&
- status.os_error() != net::ERR_ABORTED) {
- // Resource canceled with a specific error are filtered.
- SecurityFilterPeer* new_peer =
- SecurityFilterPeer::CreateSecurityFilterPeerForDeniedRequest(
- request_info->resource_type,
- request_info->peer,
- status.os_error());
- if (new_peer) {
- request_info->peer = new_peer;
- peer = new_peer;
- }
- }
-
- // The request ID will be removed from our pending list in the destructor.
- // Normally, dispatching this message causes the reference-counted request to
- // die immediately.
- peer->OnCompletedRequest(status, security_info, completion_time);
-
- webkit_glue::NotifyCacheStats();
-}
-
-int ResourceDispatcher::AddPendingRequest(
- webkit_glue::ResourceLoaderBridge::Peer* callback,
- ResourceType::Type resource_type,
- const GURL& request_url) {
- // Compute a unique request_id for this renderer process.
- int id = MakeRequestID();
- pending_requests_[id] =
- PendingRequestInfo(callback, resource_type, request_url);
- return id;
-}
-
-bool ResourceDispatcher::RemovePendingRequest(int request_id) {
- PendingRequestList::iterator it = pending_requests_.find(request_id);
- if (it == pending_requests_.end())
- return false;
-
- PendingRequestInfo& request_info = it->second;
- ReleaseResourcesInMessageQueue(&request_info.deferred_message_queue);
- pending_requests_.erase(it);
-
- return true;
-}
-
-void ResourceDispatcher::CancelPendingRequest(int routing_id,
- int request_id) {
- PendingRequestList::iterator it = pending_requests_.find(request_id);
- if (it == pending_requests_.end()) {
- DLOG(WARNING) << "unknown request";
- return;
- }
-
- PendingRequestInfo& request_info = it->second;
- ReleaseResourcesInMessageQueue(&request_info.deferred_message_queue);
- pending_requests_.erase(it);
-
- message_sender()->Send(
- new ViewHostMsg_CancelRequest(routing_id, request_id));
-}
-
-void ResourceDispatcher::SetDefersLoading(int request_id, bool value) {
- PendingRequestList::iterator it = pending_requests_.find(request_id);
- if (it == pending_requests_.end()) {
- DLOG(ERROR) << "unknown request";
- return;
- }
- PendingRequestInfo& request_info = it->second;
- if (value) {
- request_info.is_deferred = value;
- } else if (request_info.is_deferred) {
- request_info.is_deferred = false;
-
- FollowPendingRedirect(request_id, request_info);
-
- MessageLoop::current()->PostTask(FROM_HERE,
- method_factory_.NewRunnableMethod(
- &ResourceDispatcher::FlushDeferredMessages, request_id));
- }
-}
-
-void ResourceDispatcher::DispatchMessage(const IPC::Message& message) {
- IPC_BEGIN_MESSAGE_MAP(ResourceDispatcher, message)
- IPC_MESSAGE_HANDLER(ViewMsg_Resource_UploadProgress, OnUploadProgress)
- IPC_MESSAGE_HANDLER(ViewMsg_Resource_ReceivedResponse, OnReceivedResponse)
- IPC_MESSAGE_HANDLER(
- ViewMsg_Resource_ReceivedCachedMetadata, OnReceivedCachedMetadata)
- IPC_MESSAGE_HANDLER(ViewMsg_Resource_ReceivedRedirect, OnReceivedRedirect)
- IPC_MESSAGE_HANDLER(ViewMsg_Resource_DataReceived, OnReceivedData)
- IPC_MESSAGE_HANDLER(ViewMsg_Resource_DataDownloaded, OnDownloadedData)
- IPC_MESSAGE_HANDLER(ViewMsg_Resource_RequestComplete, OnRequestComplete)
- IPC_END_MESSAGE_MAP()
-}
-
-void ResourceDispatcher::FlushDeferredMessages(int request_id) {
- PendingRequestList::iterator it = pending_requests_.find(request_id);
- if (it == pending_requests_.end()) // The request could have become invalid.
- return;
- PendingRequestInfo& request_info = it->second;
- if (request_info.is_deferred)
- return;
- // Because message handlers could result in request_info being destroyed,
- // we need to work with a stack reference to the deferred queue.
- MessageQueue q;
- q.swap(request_info.deferred_message_queue);
- while (!q.empty()) {
- IPC::Message* m = q.front();
- q.pop_front();
- DispatchMessage(*m);
- delete m;
- // If this request is deferred in the context of the above message, then
- // we should honor the same and stop dispatching further messages.
- // We need to find the request again in the list as it may have completed
- // by now and the request_info instance above may be invalid.
- PendingRequestList::iterator index = pending_requests_.find(request_id);
- if (index != pending_requests_.end()) {
- PendingRequestInfo& pending_request = index->second;
- if (pending_request.is_deferred) {
- pending_request.deferred_message_queue.swap(q);
- return;
- }
- }
- }
-}
-
-webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id) {
- return new webkit_glue::IPCResourceLoaderBridge(this, request_info,
- host_renderer_id,
- host_render_view_id);
-}
-
-bool ResourceDispatcher::IsResourceDispatcherMessage(
- const IPC::Message& message) {
- switch (message.type()) {
- case ViewMsg_Resource_UploadProgress::ID:
- case ViewMsg_Resource_ReceivedResponse::ID:
- case ViewMsg_Resource_ReceivedCachedMetadata::ID:
- case ViewMsg_Resource_ReceivedRedirect::ID:
- case ViewMsg_Resource_DataReceived::ID:
- case ViewMsg_Resource_DataDownloaded::ID:
- case ViewMsg_Resource_RequestComplete::ID:
- return true;
-
- default:
- break;
- }
-
- return false;
-}
-
-// static
-void ResourceDispatcher::ReleaseResourcesInDataMessage(
- const IPC::Message& message) {
- void* iter = NULL;
- int request_id;
- if (!message.ReadInt(&iter, &request_id)) {
- NOTREACHED() << "malformed resource message";
- return;
- }
-
- // If the message contains a shared memory handle, we should close the
- // handle or there will be a memory leak.
- if (message.type() == ViewMsg_Resource_DataReceived::ID) {
- base::SharedMemoryHandle shm_handle;
- if (IPC::ParamTraits<base::SharedMemoryHandle>::Read(&message,
- &iter,
- &shm_handle)) {
- base::SharedMemory::CloseHandle(shm_handle);
- }
- }
-}
-
-// static
-void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
- while (!queue->empty()) {
- IPC::Message* message = queue->front();
- ReleaseResourcesInDataMessage(*message);
- queue->pop_front();
- delete message;
- }
-}
diff --git a/chrome/common/resource_dispatcher.h b/chrome/common/resource_dispatcher.h
deleted file mode 100644
index c9c4be5..0000000
--- a/chrome/common/resource_dispatcher.h
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading
-
-#ifndef CHROME_COMMON_RESOURCE_DISPATCHER_H_
-#define CHROME_COMMON_RESOURCE_DISPATCHER_H_
-#pragma once
-
-#include <deque>
-#include <string>
-
-#include "base/hash_tables.h"
-#include "base/linked_ptr.h"
-#include "base/shared_memory.h"
-#include "base/task.h"
-#include "ipc/ipc_channel.h"
-#include "webkit/glue/resource_loader_bridge.h"
-
-struct ResourceResponseHead;
-
-// This class serves as a communication interface between the
-// ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in
-// the child process. It can be used from any child process.
-class ResourceDispatcher : public IPC::Channel::Listener {
- public:
- explicit ResourceDispatcher(IPC::Message::Sender* sender);
- ~ResourceDispatcher();
-
- // IPC::Channel::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& message);
-
- // Creates a ResourceLoaderBridge for this type of dispatcher, this is so
- // this can be tested regardless of the ResourceLoaderBridge::Create
- // implementation.
- webkit_glue::ResourceLoaderBridge* CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id);
-
- // Adds a request from the pending_requests_ list, returning the new
- // requests' ID
- int AddPendingRequest(webkit_glue::ResourceLoaderBridge::Peer* callback,
- ResourceType::Type resource_type,
- const GURL& request_url);
-
- // Removes a request from the pending_requests_ list, returning true if the
- // request was found and removed.
- bool RemovePendingRequest(int request_id);
-
- // Cancels a request in the pending_requests_ list.
- void CancelPendingRequest(int routing_id, int request_id);
-
- IPC::Message::Sender* message_sender() const {
- return message_sender_;
- }
-
- // Toggles the is_deferred attribute for the specified request.
- void SetDefersLoading(int request_id, bool value);
-
- private:
- friend class ResourceDispatcherTest;
-
- typedef std::deque<IPC::Message*> MessageQueue;
- struct PendingRequestInfo {
- PendingRequestInfo() { }
- PendingRequestInfo(webkit_glue::ResourceLoaderBridge::Peer* peer,
- ResourceType::Type resource_type,
- const GURL& request_url)
- : peer(peer),
- resource_type(resource_type),
- is_deferred(false),
- url(request_url) {
- }
- ~PendingRequestInfo() { }
- webkit_glue::ResourceLoaderBridge::Peer* peer;
- ResourceType::Type resource_type;
- MessageQueue deferred_message_queue;
- bool is_deferred;
- GURL url;
- linked_ptr<IPC::Message> pending_redirect_message;
- };
- typedef base::hash_map<int, PendingRequestInfo> PendingRequestList;
-
- // Helper to lookup the info based on the request_id.
- // May return NULL if the request as been canceled from the client side.
- PendingRequestInfo* GetPendingRequestInfo(int request_id);
-
- // Follows redirect, if any, for the given request.
- void FollowPendingRedirect(int request_id, PendingRequestInfo& request_info);
-
- // Message response handlers, called by the message handler for this process.
- void OnUploadProgress(
- const IPC::Message& message,
- int request_id,
- int64 position,
- int64 size);
- void OnReceivedResponse(int request_id, const ResourceResponseHead&);
- void OnReceivedCachedMetadata(int request_id, const std::vector<char>& data);
- void OnReceivedRedirect(
- const IPC::Message& message,
- int request_id,
- const GURL& new_url,
- const webkit_glue::ResourceResponseInfo& info);
- void OnReceivedData(
- const IPC::Message& message,
- int request_id,
- base::SharedMemoryHandle data,
- int data_len);
- void OnDownloadedData(
- const IPC::Message& message,
- int request_id,
- int data_len);
- void OnRequestComplete(
- int request_id,
- const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time);
-
- // Dispatch the message to one of the message response handlers.
- void DispatchMessage(const IPC::Message& message);
-
- // Dispatch any deferred messages for the given request, provided it is not
- // again in the deferred state.
- void FlushDeferredMessages(int request_id);
-
- // Returns true if the message passed in is a resource related message.
- static bool IsResourceDispatcherMessage(const IPC::Message& message);
-
- // ViewHostMsg_Resource_DataReceived is not POD, it has a shared memory
- // handle in it that we should cleanup it up nicely. This method accepts any
- // message and determine whether the message is
- // ViewHostMsg_Resource_DataReceived and clean up the shared memory handle.
- static void ReleaseResourcesInDataMessage(const IPC::Message& message);
-
- // Iterate through a message queue and clean up the messages by calling
- // ReleaseResourcesInDataMessage and removing them from the queue. Intended
- // for use on deferred message queues that are no longer needed.
- static void ReleaseResourcesInMessageQueue(MessageQueue* queue);
-
- IPC::Message::Sender* message_sender_;
-
- // All pending requests issued to the host
- PendingRequestList pending_requests_;
-
- ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
-};
-
-#endif // CHROME_COMMON_RESOURCE_DISPATCHER_H_
diff --git a/chrome/common/resource_dispatcher_dummy.cc b/chrome/common/resource_dispatcher_dummy.cc
deleted file mode 100644
index f047b34..0000000
--- a/chrome/common/resource_dispatcher_dummy.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading
-
-#include "chrome/common/resource_dispatcher.h"
-
-#include "base/compiler_specific.h"
-
-// ResourceDispatcher ---------------------------------------------------------
-
-ResourceDispatcher::ResourceDispatcher(IPC::Message::Sender* sender)
- : message_sender_(sender),
- ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
-}
-
-ResourceDispatcher::~ResourceDispatcher() {
-}
-
-// ResourceDispatcher implementation ------------------------------------------
-
-bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
- return false;
-}
-
-webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge(
- const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info,
- int host_renderer_id,
- int host_render_view_id) {
- // This function is used only by plugin and renderer code, so it should
- // never be called in a 64-bit Windows process.
- NOTREACHED();
- return NULL;
-}
diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc
deleted file mode 100644
index 3e846f9..0000000
--- a/chrome/common/resource_dispatcher_unittest.cc
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <string>
-#include <vector>
-
-#include "base/message_loop.h"
-#include "base/process.h"
-#include "base/process_util.h"
-#include "base/scoped_ptr.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
-#include "chrome/common/resource_dispatcher.h"
-#include "chrome/common/resource_response.h"
-#include "net/base/upload_data.h"
-#include "net/http/http_response_headers.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/appcache/appcache_interfaces.h"
-
-using webkit_glue::ResourceLoaderBridge;
-using webkit_glue::ResourceResponseInfo;
-
-static const char test_page_url[] = "http://www.google.com/";
-static const char test_page_headers[] =
- "HTTP/1.1 200 OK\nContent-Type:text/html\n\n";
-static const char test_page_mime_type[] = "text/html";
-static const char test_page_charset[] = "";
-static const char test_page_contents[] =
- "<html><head><title>Google</title></head><body><h1>Google</h1></body></html>";
-static const uint32 test_page_contents_len = arraysize(test_page_contents) - 1;
-
-static const char kShmemSegmentName[] = "DeferredResourceLoaderTest";
-
-// Listens for request response data and stores it so that it can be compared
-// to the reference data.
-class TestRequestCallback : public ResourceLoaderBridge::Peer {
- public:
- TestRequestCallback() : complete_(false) {
- }
-
- virtual void OnUploadProgress(uint64 position, uint64 size) {
- }
-
- virtual bool OnReceivedRedirect(
- const GURL& new_url,
- const ResourceResponseInfo& info,
- bool* has_new_first_party_for_cookies,
- GURL* new_first_party_for_cookies) {
- *has_new_first_party_for_cookies = false;
- return true;
- }
-
- virtual void OnReceivedResponse(
- const ResourceResponseInfo& info,
- bool content_filtered) {
- }
-
- virtual void OnDownloadedData(int len) {
- }
-
- virtual void OnReceivedData(const char* data, int len) {
- EXPECT_FALSE(complete_);
- data_.append(data, len);
- }
-
- virtual void OnCompletedRequest(const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time) {
- EXPECT_FALSE(complete_);
- complete_ = true;
- }
-
- const std::string& data() const {
- return data_;
- }
- bool complete() const {
- return complete_;
- }
-
- private:
- bool complete_;
- std::string data_;
-};
-
-
-// Sets up the message sender override for the unit test
-class ResourceDispatcherTest : public testing::Test,
- public IPC::Message::Sender {
- public:
- // Emulates IPC send operations (IPC::Message::Sender) by adding
- // pending messages to the queue.
- virtual bool Send(IPC::Message* msg) {
- message_queue_.push_back(IPC::Message(*msg));
- delete msg;
- return true;
- }
-
- // Emulates the browser process and processes the pending IPC messages,
- // returning the hardcoded file contents.
- void ProcessMessages() {
- while (!message_queue_.empty()) {
- int request_id;
- ViewHostMsg_Resource_Request request;
- ASSERT_TRUE(ViewHostMsg_RequestResource::Read(
- &message_queue_[0], &request_id, &request));
-
- // check values
- EXPECT_EQ(test_page_url, request.url.spec());
-
- // received response message
- ResourceResponseHead response;
- std::string raw_headers(test_page_headers);
- std::replace(raw_headers.begin(), raw_headers.end(), '\n', '\0');
- response.headers = new net::HttpResponseHeaders(raw_headers);
- response.mime_type = test_page_mime_type;
- response.charset = test_page_charset;
- dispatcher_->OnReceivedResponse(request_id, response);
-
- // received data message with the test contents
- base::SharedMemory shared_mem;
- EXPECT_TRUE(shared_mem.CreateAndMapAnonymous(test_page_contents_len));
- char* put_data_here = static_cast<char*>(shared_mem.memory());
- memcpy(put_data_here, test_page_contents, test_page_contents_len);
- base::SharedMemoryHandle dup_handle;
- EXPECT_TRUE(shared_mem.GiveToProcess(
- base::Process::Current().handle(), &dup_handle));
- dispatcher_->OnReceivedData(
- message_queue_[0], request_id, dup_handle, test_page_contents_len);
-
- message_queue_.erase(message_queue_.begin());
-
- // read the ack message.
- Tuple1<int> request_ack;
- ASSERT_TRUE(ViewHostMsg_DataReceived_ACK::Read(
- &message_queue_[0], &request_ack));
-
- ASSERT_EQ(request_ack.a, request_id);
-
- message_queue_.erase(message_queue_.begin());
- }
- }
-
- protected:
- // testing::Test
- virtual void SetUp() {
- dispatcher_.reset(new ResourceDispatcher(this));
- }
- virtual void TearDown() {
- dispatcher_.reset();
- }
-
- ResourceLoaderBridge* CreateBridge() {
- webkit_glue::ResourceLoaderBridge::RequestInfo request_info;
- request_info.method = "GET";
- request_info.url = GURL(test_page_url);
- request_info.first_party_for_cookies = GURL(test_page_url);
- request_info.referrer = GURL();
- request_info.frame_origin = "null";
- request_info.main_frame_origin = "null";
- request_info.headers = std::string();
- request_info.load_flags = 0;
- request_info.requestor_pid = 0;
- request_info.request_type = ResourceType::SUB_RESOURCE;
- request_info.appcache_host_id = appcache::kNoHostId;
- request_info.routing_id = 0;
-
- return dispatcher_->CreateBridge(request_info, -1, -1);
- }
-
- std::vector<IPC::Message> message_queue_;
- static scoped_ptr<ResourceDispatcher> dispatcher_;
-};
-
-/*static*/
-scoped_ptr<ResourceDispatcher> ResourceDispatcherTest::dispatcher_;
-
-// Does a simple request and tests that the correct data is received.
-TEST_F(ResourceDispatcherTest, RoundTrip) {
- TestRequestCallback callback;
- ResourceLoaderBridge* bridge = CreateBridge();
-
- bridge->Start(&callback);
-
- ProcessMessages();
-
- // FIXME(brettw) when the request complete messages are actually handledo
- // and dispatched, uncomment this.
- //EXPECT_TRUE(callback.complete());
- //EXPECT_STREQ(test_page_contents, callback.data().c_str());
-
- delete bridge;
-}
-
-// Tests that the request IDs are straight when there are multiple requests.
-TEST_F(ResourceDispatcherTest, MultipleRequests) {
- // FIXME
-}
-
-// Tests that the cancel method prevents other messages from being received
-TEST_F(ResourceDispatcherTest, Cancel) {
- // FIXME
-}
-
-TEST_F(ResourceDispatcherTest, Cookies) {
- // FIXME
-}
-
-TEST_F(ResourceDispatcherTest, SerializedPostData) {
- // FIXME
-}
-
-// This class provides functionality to validate whether the ResourceDispatcher
-// object honors the deferred loading contract correctly, i.e. if deferred
-// loading is enabled it should queue up any responses received. If deferred
-// loading is enabled/disabled in the context of a dispatched message, other
-// queued messages should not be dispatched until deferred load is turned off.
-class DeferredResourceLoadingTest : public ResourceDispatcherTest,
- public ResourceLoaderBridge::Peer {
- public:
- DeferredResourceLoadingTest()
- : defer_loading_(false) {
- }
-
- virtual bool Send(IPC::Message* msg) {
- delete msg;
- return true;
- }
-
- void InitMessages() {
- set_defer_loading(true);
-
- ResourceResponseHead response_head;
- response_head.status.set_status(net::URLRequestStatus::SUCCESS);
-
- IPC::Message* response_message =
- new ViewMsg_Resource_ReceivedResponse(0, 0, response_head);
-
- dispatcher_->OnMessageReceived(*response_message);
-
- delete response_message;
-
- // Duplicate the shared memory handle so both the test and the callee can
- // close their copy.
- base::SharedMemoryHandle duplicated_handle;
- EXPECT_TRUE(shared_handle_.ShareToProcess(base::GetCurrentProcessHandle(),
- &duplicated_handle));
-
- response_message =
- new ViewMsg_Resource_DataReceived(0, 0, duplicated_handle, 100);
-
- dispatcher_->OnMessageReceived(*response_message);
-
- delete response_message;
-
- set_defer_loading(false);
- }
-
- // ResourceLoaderBridge::Peer methods.
- virtual void OnUploadProgress(uint64 position, uint64 size) {
- }
-
- virtual bool OnReceivedRedirect(
- const GURL& new_url,
- const ResourceResponseInfo& info,
- bool* has_new_first_party_for_cookies,
- GURL* new_first_party_for_cookies) {
- *has_new_first_party_for_cookies = false;
- return true;
- }
-
- virtual void OnReceivedResponse(
- const ResourceResponseInfo& info,
- bool content_filtered) {
- EXPECT_EQ(defer_loading_, false);
- set_defer_loading(true);
- }
-
- virtual void OnDownloadedData(int len) {
- }
-
- virtual void OnReceivedData(const char* data, int len) {
- EXPECT_EQ(defer_loading_, false);
- set_defer_loading(false);
- }
-
- virtual void OnCompletedRequest(const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time) {
- }
-
- protected:
- virtual void SetUp() {
- ResourceDispatcherTest::SetUp();
- shared_handle_.Delete(kShmemSegmentName);
- EXPECT_TRUE(shared_handle_.CreateNamed(kShmemSegmentName, false, 100));
- }
-
- virtual void TearDown() {
- shared_handle_.Close();
- EXPECT_TRUE(shared_handle_.Delete(kShmemSegmentName));
- ResourceDispatcherTest::TearDown();
- }
-
- private:
- void set_defer_loading(bool defer) {
- defer_loading_ = defer;
- dispatcher_->SetDefersLoading(0, defer);
- }
-
- bool defer_loading() const {
- return defer_loading_;
- }
-
- bool defer_loading_;
- base::SharedMemory shared_handle_;
-};
-
-TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) {
- MessageLoop message_loop(MessageLoop::TYPE_IO);
-
- ResourceLoaderBridge* bridge = CreateBridge();
-
- bridge->Start(this);
- InitMessages();
-
- // Dispatch deferred messages.
- message_loop.RunAllPending();
- delete bridge;
-}
diff --git a/chrome/common/resource_response.cc b/chrome/common/resource_response.cc
deleted file mode 100644
index ad8f184..0000000
--- a/chrome/common/resource_response.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/resource_response.h"
-
-ResourceResponseHead::ResourceResponseHead()
- : replace_extension_localization_templates(false) {
-}
-
-ResourceResponseHead::~ResourceResponseHead() {}
-
-SyncLoadResult::SyncLoadResult() {}
-
-SyncLoadResult::~SyncLoadResult() {}
-
-ResourceResponse::ResourceResponse() {}
-
-ResourceResponse::~ResourceResponse() {}
diff --git a/chrome/common/resource_response.h b/chrome/common/resource_response.h
deleted file mode 100644
index a5284df..0000000
--- a/chrome/common/resource_response.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading
-
-#ifndef CHROME_COMMON_RESOURCE_RESPONSE_H_
-#define CHROME_COMMON_RESOURCE_RESPONSE_H_
-#pragma once
-
-#include <string>
-
-#include "base/ref_counted.h"
-#include "googleurl/src/gurl.h"
-#include "net/url_request/url_request_status.h"
-#include "webkit/glue/resource_loader_bridge.h"
-
-// Parameters for a resource response header.
-struct ResourceResponseHead : webkit_glue::ResourceResponseInfo {
- ResourceResponseHead();
- ~ResourceResponseHead();
-
- // The response status.
- net::URLRequestStatus status;
-
- // Whether we should apply a filter to this resource that replaces
- // localization templates with the appropriate localized strings. This is set
- // for CSS resources used by extensions.
- bool replace_extension_localization_templates;
-};
-
-// Parameters for a synchronous resource response.
-struct SyncLoadResult : ResourceResponseHead {
- SyncLoadResult();
- ~SyncLoadResult();
-
- // The final URL after any redirects.
- GURL final_url;
-
- // The response data.
- std::string data;
-};
-
-// Simple wrapper that refcounts ResourceResponseHead.
-struct ResourceResponse : public base::RefCounted<ResourceResponse> {
- ResourceResponseHead response_head;
-
- ResourceResponse();
- private:
- friend class base::RefCounted<ResourceResponse>;
-
- virtual ~ResourceResponse();
-};
-
-#endif // CHROME_COMMON_RESOURCE_RESPONSE_H_
diff --git a/chrome/common/safebrowsing_messages.h b/chrome/common/safebrowsing_messages.h
new file mode 100644
index 0000000..71877ad
--- /dev/null
+++ b/chrome/common/safebrowsing_messages.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Multiply-included message file, so no include guard.
+
+#include "chrome/common/common_param_traits.h"
+#include "googleurl/src/gurl.h"
+#include "ipc/ipc_message_macros.h"
+
+#define IPC_MESSAGE_START SafeBrowsingMsgStart
+
+// SafeBrowsing client-side detection messages sent from the renderer to the
+// browser.
+
+// Inform the browser that the current URL is phishing according to the
+// client-side phishing detector.
+IPC_MESSAGE_ROUTED2(SafeBrowsingDetectionHostMsg_DetectedPhishingSite,
+ GURL /* phishing_url */,
+ double /* phishing_score */)
+
+// SafeBrowsing client-side detection messages sent from the browser to the
+// renderer. TODO(noelutz): move other IPC messages here.
+
diff --git a/chrome/common/sandbox_init_wrapper_win.cc b/chrome/common/sandbox_init_wrapper_win.cc
index a18632e..ec9ef54 100644
--- a/chrome/common/sandbox_init_wrapper_win.cc
+++ b/chrome/common/sandbox_init_wrapper_win.cc
@@ -10,13 +10,23 @@
#include "chrome/common/chrome_switches.h"
void SandboxInitWrapper::SetServices(sandbox::SandboxInterfaceInfo* info) {
- if (info) {
+ if (!info)
+ return;
+ if (info->legacy) {
+ // Looks like we are in the case when the new chrome.dll is being launched
+ // by the old chrome.exe, the old chrome exe has SandboxInterfaceInfo as a
+ // union, while now we have a struct.
+ // TODO(cpu): Remove this nasty hack after M10 release.
+ broker_services_ = reinterpret_cast<sandbox::BrokerServices*>(info->legacy);
+ target_services_ = reinterpret_cast<sandbox::TargetServices*>(info->legacy);
+ } else {
+ // Normal case, both the exe and the dll are the same version. Both
+ // interface pointers cannot be non-zero. A process can either be a target
+ // or a broker but not both.
broker_services_ = info->broker_services;
target_services_ = info->target_services;
+ DCHECK(!(target_services_ && broker_services_));
}
- // Both interface pointers cannot be non-zero. A process can either
- // be a target or a broker but not both.
- DCHECK(!(target_services_ && broker_services_));
}
bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
diff --git a/chrome/common/sandbox_mac.mm b/chrome/common/sandbox_mac.mm
index 78941e8..0ae572c 100644
--- a/chrome/common/sandbox_mac.mm
+++ b/chrome/common/sandbox_mac.mm
@@ -231,15 +231,13 @@ void Sandbox::SandboxWarmup(SandboxProcessType sandbox_type) {
CGImageSourceGetStatus(img);
}
+ {
+ // Allow access to /dev/urandom.
+ GetUrandomFD();
+ }
+
// Process-type dependent warm-up.
switch (sandbox_type) {
- case SANDBOX_TYPE_NACL_LOADER:
- {
- // Native Client access to /dev/random.
- GetUrandomFD();
- }
- break;
-
case SANDBOX_TYPE_GPU:
{ // GPU-related stuff is very slow without this, probably because
// the sandbox prevents loading graphics drivers or some such.
@@ -256,11 +254,6 @@ void Sandbox::SandboxWarmup(SandboxProcessType sandbox_type) {
// --use-gl flag.
gfx::GLContext::InitializeOneOff();
}
-
- {
- // Access to /dev/random is required for the field trial code.
- GetUrandomFD();
- }
break;
default:
diff --git a/chrome/common/sandbox_mac_unittest_helper.h b/chrome/common/sandbox_mac_unittest_helper.h
index 674b246..ace4767 100644
--- a/chrome/common/sandbox_mac_unittest_helper.h
+++ b/chrome/common/sandbox_mac_unittest_helper.h
@@ -75,7 +75,7 @@ class MacSandboxTestCase {
// Code that runs in the sandboxed subprocess before the sandbox is
// initialized.
// Returning false from this function will cause the entire test case to fail.
- virtual bool BeforeSandboxInit() { return true; };
+ virtual bool BeforeSandboxInit();
// Code that runs in the sandboxed subprocess when the sandbox has been
// enabled.
@@ -84,7 +84,7 @@ class MacSandboxTestCase {
// The data that's passed in the |user_data| parameter of
// RunTest[s]InSandbox() is passed to this function.
- virtual void SetTestData(const char* test_data) { test_data_ = test_data; }
+ virtual void SetTestData(const char* test_data);
protected:
std::string test_data_;
diff --git a/chrome/common/sandbox_mac_unittest_helper.mm b/chrome/common/sandbox_mac_unittest_helper.mm
index aff7471..e437289 100644
--- a/chrome/common/sandbox_mac_unittest_helper.mm
+++ b/chrome/common/sandbox_mac_unittest_helper.mm
@@ -89,6 +89,14 @@ bool MacSandboxTest::RunTestInSandbox(Sandbox::SandboxProcessType sandbox_type,
return code == 0;
}
+bool MacSandboxTestCase::BeforeSandboxInit() {
+ return true;
+}
+
+void MacSandboxTestCase::SetTestData(const char* test_data) {
+ test_data_ = test_data;
+}
+
// Given a test name specified by |name| return that test case.
// If no test case is found for the given name, return NULL.
MacSandboxTestCase *SandboxTestForName(const char* name) {
diff --git a/chrome/common/sandbox_policy.cc b/chrome/common/sandbox_policy.cc
index 16049e8..0c2d977 100644
--- a/chrome/common/sandbox_policy.cc
+++ b/chrome/common/sandbox_policy.cc
@@ -461,6 +461,28 @@ bool AddPolicyForPlugin(CommandLine* cmd_line,
return false;
}
+// For the GPU process we gotten as far as USER_LIMITED. The next level
+// which is USER_RESTRICTED breaks both the DirectX backend and the OpenGL
+// backend. Note that the GPU process is connected to the interactive
+// desktop.
+// TODO(cpu): Lock down the sandbox more if possible.
+// TODO(apatrick): Use D3D9Ex to render windowless.
+bool AddPolicyForGPU(CommandLine*, sandbox::TargetPolicy* policy) {
+ policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0);
+
+ if (base::win::GetVersion() > base::win::VERSION_XP) {
+ policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS,
+ sandbox::USER_LIMITED);
+ policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
+ } else {
+ policy->SetTokenLevel(sandbox::USER_UNPROTECTED,
+ sandbox::USER_LIMITED);
+ }
+
+ AddDllEvictionPolicy(policy);
+ return true;
+}
+
void AddPolicyForRenderer(sandbox::TargetPolicy* policy,
bool* on_sandbox_desktop) {
policy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0);
@@ -534,11 +556,10 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
TRACE_EVENT_BEGIN("StartProcessWithAccess", 0, type_str);
// To decide if the process is going to be sandboxed we have two cases.
- // First case: all process types except the nacl broker, gpu process and
- // the plugin process are sandboxed by default.
+ // First case: all process types except the nacl broker, and the plugin
+ // process are sandboxed by default.
bool in_sandbox =
(type != ChildProcessInfo::NACL_BROKER_PROCESS) &&
- (type != ChildProcessInfo::GPU_PROCESS) &&
(type != ChildProcessInfo::PLUGIN_PROCESS);
// Second case: If it is the plugin process then it depends on it being
@@ -551,6 +572,14 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
!browser_command_line.HasSwitch(switches::kDisableFlashSandbox));
}
+ // Third case: If it is the GPU process then it can be disabled by a
+ // command line flag.
+ if ((type == ChildProcessInfo::GPU_PROCESS) &&
+ (browser_command_line.HasSwitch(switches::kDisableGpuSandbox))) {
+ in_sandbox = false;
+ VLOG(1) << "GPU sandbox is disabled";
+ }
+
if (browser_command_line.HasSwitch(switches::kNoSandbox)) {
// The user has explicity opted-out from all sandboxing.
in_sandbox = false;
@@ -597,6 +626,9 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
if (type == ChildProcessInfo::PLUGIN_PROCESS) {
if (!AddPolicyForPlugin(cmd_line, policy))
return 0;
+ } else if (type == ChildProcessInfo::GPU_PROCESS) {
+ if (!AddPolicyForGPU(cmd_line, policy))
+ return 0;
} else {
AddPolicyForRenderer(policy, &on_sandbox_desktop);
diff --git a/chrome/common/security_filter_peer.cc b/chrome/common/security_filter_peer.cc
deleted file mode 100644
index 93277a8..0000000
--- a/chrome/common/security_filter_peer.cc
+++ /dev/null
@@ -1,213 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/security_filter_peer.h"
-
-#include "grit/generated_resources.h"
-#include "net/base/net_errors.h"
-#include "net/http/http_response_headers.h"
-#include "ui/base/l10n/l10n_util.h"
-
-SecurityFilterPeer::SecurityFilterPeer(
- webkit_glue::ResourceLoaderBridge* resource_loader_bridge,
- webkit_glue::ResourceLoaderBridge::Peer* peer)
- : original_peer_(peer),
- resource_loader_bridge_(resource_loader_bridge) {
-}
-
-SecurityFilterPeer::~SecurityFilterPeer() {
-}
-
-// static
-SecurityFilterPeer*
- SecurityFilterPeer::CreateSecurityFilterPeerForDeniedRequest(
- ResourceType::Type resource_type,
- webkit_glue::ResourceLoaderBridge::Peer* peer,
- int os_error) {
- // Create a filter for SSL and CERT errors.
- switch (os_error) {
- case net::ERR_SSL_PROTOCOL_ERROR:
- case net::ERR_CERT_COMMON_NAME_INVALID:
- case net::ERR_CERT_DATE_INVALID:
- case net::ERR_CERT_AUTHORITY_INVALID:
- case net::ERR_CERT_CONTAINS_ERRORS:
- case net::ERR_CERT_NO_REVOCATION_MECHANISM:
- case net::ERR_CERT_UNABLE_TO_CHECK_REVOCATION:
- case net::ERR_CERT_REVOKED:
- case net::ERR_CERT_INVALID:
- case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM:
- case net::ERR_INSECURE_RESPONSE:
- if (ResourceType::IsFrame(resource_type))
- return CreateSecurityFilterPeerForFrame(peer, os_error);
- // Any other content is entirely filtered-out.
- return new ReplaceContentPeer(NULL, peer, std::string(), std::string());
- default:
- // For other errors, we use our normal error handling.
- return NULL;
- }
-}
-
-// static
-SecurityFilterPeer* SecurityFilterPeer::CreateSecurityFilterPeerForFrame(
- webkit_glue::ResourceLoaderBridge::Peer* peer, int os_error) {
- // TODO(jcampan): use a different message when getting a phishing/malware
- // error.
- std::string html = base::StringPrintf(
- "<html><meta charset='UTF-8'>"
- "<body style='background-color:#990000;color:white;'>"
- "%s</body></html>",
- l10n_util::GetStringUTF8(IDS_UNSAFE_FRAME_MESSAGE).c_str());
- return new ReplaceContentPeer(NULL, peer, "text/html", html);
-}
-
-void SecurityFilterPeer::OnUploadProgress(uint64 position, uint64 size) {
- original_peer_->OnUploadProgress(position, size);
-}
-
-bool SecurityFilterPeer::OnReceivedRedirect(
- const GURL& new_url,
- const webkit_glue::ResourceResponseInfo& info,
- bool* has_new_first_party_for_cookies,
- GURL* new_first_party_for_cookies) {
- NOTREACHED();
- return false;
-}
-
-void SecurityFilterPeer::OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered) {
- NOTREACHED();
-}
-
-void SecurityFilterPeer::OnReceivedData(const char* data, int len) {
- NOTREACHED();
-}
-
-void SecurityFilterPeer::OnCompletedRequest(const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time) {
- NOTREACHED();
-}
-
-// static
-void ProcessResponseInfo(
- const webkit_glue::ResourceResponseInfo& info_in,
- webkit_glue::ResourceResponseInfo* info_out,
- const std::string& mime_type) {
- DCHECK(info_out);
- *info_out = info_in;
- info_out->mime_type = mime_type;
- // Let's create our own HTTP headers.
- std::string raw_headers;
- raw_headers.append("HTTP/1.1 200 OK");
- raw_headers.push_back('\0');
- // Don't cache the data we are serving, it is not the real data for that URL
- // (if the filtered resource were to make it into the WebCore cache, then the
- // same URL loaded in a safe scenario would still return the filtered
- // resource).
- raw_headers.append("cache-control: no-cache");
- raw_headers.push_back('\0');
- if (!mime_type.empty()) {
- raw_headers.append("content-type: ");
- raw_headers.append(mime_type);
- raw_headers.push_back('\0');
- }
- raw_headers.push_back('\0');
- net::HttpResponseHeaders* new_headers =
- new net::HttpResponseHeaders(raw_headers);
- info_out->headers = new_headers;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// BufferedPeer
-
-BufferedPeer::BufferedPeer(
- webkit_glue::ResourceLoaderBridge* resource_loader_bridge,
- webkit_glue::ResourceLoaderBridge::Peer* peer,
- const std::string& mime_type)
- : SecurityFilterPeer(resource_loader_bridge, peer),
- mime_type_(mime_type) {
-}
-
-BufferedPeer::~BufferedPeer() {
-}
-
-void BufferedPeer::OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool response_filtered) {
- ProcessResponseInfo(info, &response_info_, mime_type_);
-}
-
-void BufferedPeer::OnReceivedData(const char* data, int len) {
- data_.append(data, len);
-}
-
-void BufferedPeer::OnCompletedRequest(const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time) {
- // Make sure we delete ourselves at the end of this call.
- scoped_ptr<BufferedPeer> this_deleter(this);
-
- // Give sub-classes a chance at altering the data.
- if (status.status() != net::URLRequestStatus::SUCCESS || !DataReady()) {
- // Pretend we failed to load the resource.
- original_peer_->OnReceivedResponse(response_info_, true);
- net::URLRequestStatus status(net::URLRequestStatus::CANCELED,
- net::ERR_ABORTED);
- original_peer_->OnCompletedRequest(status, security_info, completion_time);
- return;
- }
-
- original_peer_->OnReceivedResponse(response_info_, true);
- if (!data_.empty())
- original_peer_->OnReceivedData(data_.data(),
- static_cast<int>(data_.size()));
- original_peer_->OnCompletedRequest(status, security_info, completion_time);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ReplaceContentPeer
-
-ReplaceContentPeer::ReplaceContentPeer(
- webkit_glue::ResourceLoaderBridge* resource_loader_bridge,
- webkit_glue::ResourceLoaderBridge::Peer* peer,
- const std::string& mime_type,
- const std::string& data)
- : SecurityFilterPeer(resource_loader_bridge, peer),
- mime_type_(mime_type),
- data_(data) {
-}
-
-ReplaceContentPeer::~ReplaceContentPeer() {
-}
-
-void ReplaceContentPeer::OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered) {
- // Ignore this, we'll serve some alternate content in OnCompletedRequest.
-}
-
-void ReplaceContentPeer::OnReceivedData(const char* data, int len) {
- // Ignore this, we'll serve some alternate content in OnCompletedRequest.
-}
-
-void ReplaceContentPeer::OnCompletedRequest(
- const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time) {
- webkit_glue::ResourceResponseInfo info;
- ProcessResponseInfo(info, &info, mime_type_);
- info.security_info = security_info;
- info.content_length = static_cast<int>(data_.size());
- original_peer_->OnReceivedResponse(info, true);
- if (!data_.empty())
- original_peer_->OnReceivedData(data_.data(),
- static_cast<int>(data_.size()));
- original_peer_->OnCompletedRequest(net::URLRequestStatus(),
- security_info,
- completion_time);
-
- // The request processing is complete, we must delete ourselves.
- delete this;
-}
diff --git a/chrome/common/security_filter_peer.h b/chrome/common/security_filter_peer.h
deleted file mode 100644
index 53d0559..0000000
--- a/chrome/common/security_filter_peer.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_SECURITY_FILTER_PEER_H_
-#define CHROME_COMMON_SECURITY_FILTER_PEER_H_
-#pragma once
-
-#include "webkit/glue/resource_loader_bridge.h"
-
-// The SecurityFilterPeer is a proxy to a
-// webkit_glue::ResourceLoaderBridge::Peer instance. It is used to pre-process
-// unsafe resources (such as mixed-content resource).
-// Call the factory method CreateSecurityFilterPeer() to obtain an instance of
-// SecurityFilterPeer based on the original Peer.
-// NOTE: subclasses should insure they delete themselves at the end of the
-// OnReceiveComplete call.
-class SecurityFilterPeer : public webkit_glue::ResourceLoaderBridge::Peer {
- public:
- virtual ~SecurityFilterPeer();
-
- static SecurityFilterPeer* CreateSecurityFilterPeerForDeniedRequest(
- ResourceType::Type resource_type,
- webkit_glue::ResourceLoaderBridge::Peer* peer,
- int os_error);
-
- static SecurityFilterPeer* CreateSecurityFilterPeerForFrame(
- webkit_glue::ResourceLoaderBridge::Peer* peer,
- int os_error);
-
- // ResourceLoaderBridge::Peer methods.
- virtual void OnUploadProgress(uint64 position, uint64 size);
- virtual bool OnReceivedRedirect(
- const GURL& new_url,
- const webkit_glue::ResourceResponseInfo& info,
- bool* has_new_first_party_for_cookies,
- GURL* new_first_party_for_cookies);
- virtual void OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered);
- virtual void OnDownloadedData(int len) {}
- virtual void OnReceivedData(const char* data, int len);
- virtual void OnCompletedRequest(const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time);
-
- protected:
- SecurityFilterPeer(webkit_glue::ResourceLoaderBridge* resource_loader_bridge,
- webkit_glue::ResourceLoaderBridge::Peer* peer);
-
- webkit_glue::ResourceLoaderBridge::Peer* original_peer_;
- webkit_glue::ResourceLoaderBridge* resource_loader_bridge_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SecurityFilterPeer);
-};
-
-// The BufferedPeer reads all the data of the request into an internal buffer.
-// Subclasses should implement DataReady() to process the data as necessary.
-class BufferedPeer : public SecurityFilterPeer {
- public:
- BufferedPeer(webkit_glue::ResourceLoaderBridge* resource_loader_bridge,
- webkit_glue::ResourceLoaderBridge::Peer* peer,
- const std::string& mime_type);
- virtual ~BufferedPeer();
-
- // ResourceLoaderBridge::Peer Implementation.
- virtual void OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered);
- virtual void OnReceivedData(const char* data, int len);
- virtual void OnCompletedRequest(const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time);
-
- protected:
- // Invoked when the entire request has been processed before the data is sent
- // to the original peer, giving an opportunity to subclasses to process the
- // data in data_. If this method returns true, the data is fed to the
- // original peer, if it returns false, an error is sent instead.
- virtual bool DataReady() = 0;
-
- webkit_glue::ResourceResponseInfo response_info_;
- std::string data_;
-
- private:
- std::string mime_type_;
-
- DISALLOW_COPY_AND_ASSIGN(BufferedPeer);
-};
-
-// The ReplaceContentPeer cancels the request and serves the provided data as
-// content instead.
-// TODO(jcampan): we do not as of now cancel the request, as we do not have
-// access to the resource_loader_bridge in the SecurityFilterPeer factory
-// method. For now the resource is still being fetched, but ignored, as once
-// we have provided the replacement content, the associated pending request
-// in ResourceDispatcher is removed and further OnReceived* notifications are
-// ignored.
-class ReplaceContentPeer : public SecurityFilterPeer {
- public:
- ReplaceContentPeer(webkit_glue::ResourceLoaderBridge* resource_loader_bridge,
- webkit_glue::ResourceLoaderBridge::Peer* peer,
- const std::string& mime_type,
- const std::string& data);
- virtual ~ReplaceContentPeer();
-
- // ResourceLoaderBridge::Peer Implementation.
- virtual void OnReceivedResponse(
- const webkit_glue::ResourceResponseInfo& info,
- bool content_filtered);
- virtual void OnReceivedData(const char* data, int len);
- virtual void OnCompletedRequest(const net::URLRequestStatus& status,
- const std::string& security_info,
- const base::Time& completion_time);
-
- private:
- webkit_glue::ResourceResponseInfo response_info_;
- std::string mime_type_;
- std::string data_;
-
- DISALLOW_COPY_AND_ASSIGN(ReplaceContentPeer);
-};
-
-#endif // CHROME_COMMON_SECURITY_FILTER_PEER_H_
diff --git a/chrome/common/service_process_util.cc b/chrome/common/service_process_util.cc
index 458f662..89e9e9a 100644
--- a/chrome/common/service_process_util.cc
+++ b/chrome/common/service_process_util.cc
@@ -4,6 +4,7 @@
#include <algorithm>
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -16,11 +17,15 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/version.h"
+#include "chrome/common/child_process_host.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/service_process_util.h"
+#if !defined(OS_MACOSX)
+
namespace {
// This should be more than enough to hold a version string assuming each part
@@ -49,7 +54,7 @@ enum ServiceProcessRunningState {
ServiceProcessRunningState GetServiceProcessRunningState(
std::string* service_version_out, base::ProcessId* pid_out) {
std::string version;
- if (!GetServiceProcessSharedData(&version, pid_out))
+ if (!GetServiceProcessData(&version, pid_out))
return SERVICE_NOT_RUNNING;
#if defined(OS_POSIX)
@@ -125,14 +130,9 @@ std::string GetServiceProcessScopedVersionedName(
return GetServiceProcessScopedName(versioned_str);
}
-// Gets the name of the service process IPC channel.
-std::string GetServiceProcessChannelName() {
- return GetServiceProcessScopedVersionedName("_service_ipc");
-}
-
// Reads the named shared memory to get the shared data. Returns false if no
// matching shared memory was found.
-bool GetServiceProcessSharedData(std::string* version, base::ProcessId* pid) {
+bool GetServiceProcessData(std::string* version, base::ProcessId* pid) {
scoped_ptr<base::SharedMemory> shared_mem_service_data;
shared_mem_service_data.reset(new base::SharedMemory());
ServiceProcessSharedData* service_data = NULL;
@@ -153,17 +153,23 @@ bool GetServiceProcessSharedData(std::string* version, base::ProcessId* pid) {
return false;
}
+// Gets the name of the service process IPC channel.
+IPC::ChannelHandle GetServiceProcessChannel() {
+ return GetServiceProcessScopedVersionedName("_service_ipc");
+}
+
+#endif // !OS_MACOSX
+
ServiceProcessState::ServiceProcessState() : state_(NULL) {
+ CreateAutoRunCommandLine();
}
ServiceProcessState::~ServiceProcessState() {
+#if !defined(OS_MACOSX)
if (shared_mem_service_data_.get()) {
- // Delete needs a pool wrapped around it because it calls some Obj-C on Mac,
- // and since ServiceProcessState is a singleton, it gets destructed after
- // the standard NSAutoreleasePools have already been cleaned up.
- base::mac::ScopedNSAutoreleasePool pool;
shared_mem_service_data_->Delete(GetServiceProcessSharedMemName());
}
+#endif // !OS_MACOSX
TearDownState();
}
@@ -172,7 +178,16 @@ ServiceProcessState* ServiceProcessState::GetInstance() {
return Singleton<ServiceProcessState>::get();
}
+void ServiceProcessState::SignalStopped() {
+ TearDownState();
+ shared_mem_service_data_.reset();
+}
+
+#if !defined(OS_MACOSX)
bool ServiceProcessState::Initialize() {
+ if (!InitializeState()) {
+ return false;
+ }
if (!TakeSingletonLock()) {
return false;
}
@@ -242,11 +257,27 @@ bool ServiceProcessState::CreateSharedData() {
return true;
}
-std::string ServiceProcessState::GetAutoRunKey() {
- return GetServiceProcessScopedName("_service_run");
+IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() {
+ return ::GetServiceProcessChannel();
}
-void ServiceProcessState::SignalStopped() {
- TearDownState();
- shared_mem_service_data_.reset();
+#endif // !OS_MACOSX
+
+void ServiceProcessState::CreateAutoRunCommandLine() {
+ FilePath exe_path = ChildProcessHost::GetChildPath(false);
+ if (exe_path.empty()) {
+ NOTREACHED() << "Unable to get service process binary name.";
+ }
+ autorun_command_line_.reset(new CommandLine(exe_path));
+ autorun_command_line_->AppendSwitchASCII(switches::kProcessType,
+ switches::kServiceProcess);
+
+ // The user data directory is the only other flag we currently want to
+ // possibly store.
+ const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
+ FilePath user_data_dir =
+ browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
+ if (!user_data_dir.empty())
+ autorun_command_line_->AppendSwitchPath(switches::kUserDataDir,
+ user_data_dir);
}
diff --git a/chrome/common/service_process_util.h b/chrome/common/service_process_util.h
index 175499d..1ec9d65 100644
--- a/chrome/common/service_process_util.h
+++ b/chrome/common/service_process_util.h
@@ -7,11 +7,14 @@
#include <string>
+#include "base/basictypes.h"
#include "base/process.h"
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
+#include "ipc/ipc_channel_handle.h"
class Task;
+class CommandLine;
namespace base {
class MessageLoopProxy;
@@ -20,9 +23,9 @@ namespace base {
template <typename T> struct DefaultSingletonTraits;
// Return the IPC channel to connect to the service process.
-//
-std::string GetServiceProcessChannelName();
+IPC::ChannelHandle GetServiceProcessChannel();
+#if !defined(OS_MACOSX)
// Return a name that is scoped to this instance of the service process. We
// use the user-data-dir as a scoping prefix.
std::string GetServiceProcessScopedName(const std::string& append_str);
@@ -30,6 +33,7 @@ std::string GetServiceProcessScopedName(const std::string& append_str);
// Return a name that is scoped to this instance of the service process. We
// use the user-data-dir and the version as a scoping prefix.
std::string GetServiceProcessScopedVersionedName(const std::string& append_str);
+#endif // OS_MACOSX
// The following methods are used in a process that acts as a client to the
// service process (typically the browser process).
@@ -43,7 +47,7 @@ bool CheckServiceProcessReady();
// a true return value only means that some process shared data was available,
// and not that the process is ready to receive IPC commands, or even running.
// This method is only exposed for testing.
-bool GetServiceProcessSharedData(std::string* version, base::ProcessId* pid);
+bool GetServiceProcessData(std::string* version, base::ProcessId* pid);
// --------------------------------------------------------------------------
// Forces a service process matching the specified version to shut down.
@@ -81,10 +85,14 @@ class ServiceProcessState {
// Unregister the service process to run on startup.
bool RemoveFromAutoRun();
+ // Return the channel handle used for communicating with the service.
+ IPC::ChannelHandle GetServiceProcessChannel();
+
private:
ServiceProcessState();
~ServiceProcessState();
+#if !defined(OS_MACOSX)
// Create the shared memory data for the service process.
bool CreateSharedData();
@@ -95,18 +103,24 @@ class ServiceProcessState {
// Acquires a singleton lock for the service process. A return value of false
// means that a service process instance is already running.
bool TakeSingletonLock();
+#endif // !OS_MACOSX
- // Key used to register the service process to auto-run.
- std::string GetAutoRunKey();
+ // Initialize the platform specific state.
+ bool InitializeState();
// Tear down the platform specific state.
void TearDownState();
+ // Initializes the command-line that can be used to autorun the service
+ // process.
+ void CreateAutoRunCommandLine();
+
// An opaque object that maintains state. The actual definition of this is
// platform dependent.
struct StateData;
StateData* state_;
scoped_ptr<base::SharedMemory> shared_mem_service_data_;
+ scoped_ptr<CommandLine> autorun_command_line_;
friend struct DefaultSingletonTraits<ServiceProcessState>;
};
diff --git a/chrome/common/service_process_util_linux.cc b/chrome/common/service_process_util_linux.cc
new file mode 100644
index 0000000..d51654b
--- /dev/null
+++ b/chrome/common/service_process_util_linux.cc
@@ -0,0 +1,97 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/service_process_util_posix.h"
+
+#include <signal.h>
+#include <unistd.h>
+
+#include "base/command_line.h"
+#include "base/file_util.h"
+#include "base/logging.h"
+#include "base/threading/platform_thread.h"
+#include "chrome/common/auto_start_linux.h"
+#include "chrome/common/multi_process_lock.h"
+
+namespace {
+
+// Attempts to take a lock named |name|. If |waiting| is true then this will
+// make multiple attempts to acquire the lock.
+// Caller is responsible for ownership of the MultiProcessLock.
+MultiProcessLock* TakeNamedLock(const std::string& name, bool waiting) {
+ scoped_ptr<MultiProcessLock> lock(MultiProcessLock::Create(name));
+ if (lock == NULL) return NULL;
+ bool got_lock = false;
+ for (int i = 0; i < 10; ++i) {
+ if (lock->TryLock()) {
+ got_lock = true;
+ break;
+ }
+ if (!waiting) break;
+ base::PlatformThread::Sleep(100 * i);
+ }
+ if (!got_lock) {
+ lock.reset();
+ }
+ return lock.release();
+}
+
+MultiProcessLock* TakeServiceInitializingLock(bool waiting) {
+ std::string lock_name =
+ GetServiceProcessScopedName("_service_initializing");
+ return TakeNamedLock(lock_name, waiting);
+}
+
+std::string GetBaseDesktopName() {
+#if defined(GOOGLE_CHROME_BUILD)
+ return "google-chrome-service.desktop";
+#else // CHROMIUM_BUILD
+ return "chromium-service.desktop";
+#endif
+}
+} // namespace
+
+MultiProcessLock* TakeServiceRunningLock(bool waiting) {
+ std::string lock_name =
+ GetServiceProcessScopedName("_service_running");
+ return TakeNamedLock(lock_name, waiting);
+}
+
+bool ForceServiceProcessShutdown(const std::string& version,
+ base::ProcessId process_id) {
+ if (kill(process_id, SIGTERM) < 0) {
+ PLOG(ERROR) << "kill";
+ return false;
+ }
+ return true;
+}
+
+bool CheckServiceProcessReady() {
+ scoped_ptr<MultiProcessLock> running_lock(TakeServiceRunningLock(false));
+ return running_lock.get() == NULL;
+}
+
+bool ServiceProcessState::TakeSingletonLock() {
+ state_->initializing_lock_.reset(TakeServiceInitializingLock(true));
+ return state_->initializing_lock_.get();
+}
+
+bool ServiceProcessState::AddToAutoRun() {
+ DCHECK(autorun_command_line_.get());
+#if defined(GOOGLE_CHROME_BUILD)
+ std::string app_name = "Google Chrome Service";
+#else // CHROMIUM_BUILD
+ std::string app_name = "Chromium Service";
+#endif
+ return AutoStart::AddApplication(
+ GetServiceProcessScopedName(GetBaseDesktopName()),
+ app_name,
+ autorun_command_line_->command_line_string(),
+ false);
+}
+
+bool ServiceProcessState::RemoveFromAutoRun() {
+ return AutoStart::Remove(
+ GetServiceProcessScopedName(GetBaseDesktopName()));
+}
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
new file mode 100644
index 0000000..0f5746f
--- /dev/null
+++ b/chrome/common/service_process_util_mac.mm
@@ -0,0 +1,304 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/service_process_util_posix.h"
+
+#import <Foundation/Foundation.h>
+#include <launch.h>
+
+#include "base/command_line.h"
+#include "base/file_path.h"
+#include "base/mac/foundation_util.h"
+#include "base/mac/mac_util.h"
+#include "base/mac/scoped_nsautorelease_pool.h"
+#include "base/path_service.h"
+#include "base/scoped_nsobject.h"
+#include "base/string_util.h"
+#include "base/sys_string_conversions.h"
+#include "base/threading/thread_restrictions.h"
+#include "base/version.h"
+#include "chrome/common/child_process_host.h"
+#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
+#include "third_party/GTM/Foundation/GTMServiceManagement.h"
+
+namespace {
+
+NSString* GetServiceProcessLaunchDFileName() {
+ NSString *bundle_id = [base::mac::MainAppBundle() bundleIdentifier];
+ NSString *label = [bundle_id stringByAppendingPathExtension:@"plist"];
+ return label;
+}
+
+NSString* GetServiceProcessLaunchDLabel() {
+ NSString *bundle_id = [base::mac::MainAppBundle() bundleIdentifier];
+ NSString *label = [bundle_id stringByAppendingString:@".service_process"];
+ FilePath user_data_dir;
+ PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
+ std::string user_data_dir_path = user_data_dir.value();
+ NSString *ns_path = base::SysUTF8ToNSString(user_data_dir_path);
+ ns_path = [ns_path stringByReplacingOccurrencesOfString:@" "
+ withString:@"_"];
+ label = [label stringByAppendingString:ns_path];
+ return label;
+}
+
+NSString* GetServiceProcessLaunchDSocketKey() {
+ return @"ServiceProcessSocket";
+}
+
+NSString* GetServiceProcessLaunchDSocketEnvVar() {
+ NSString *label = GetServiceProcessLaunchDLabel();
+ NSString *env_var = [label stringByReplacingOccurrencesOfString:@"."
+ withString:@"_"];
+ env_var = [env_var stringByAppendingString:@"_SOCKET"];
+ env_var = [env_var uppercaseString];
+ return env_var;
+}
+
+// Creates the path that it returns. Must be called on the FILE thread.
+NSURL* GetUserAgentPath() {
+ NSArray* library_paths = NSSearchPathForDirectoriesInDomains(
+ NSLibraryDirectory, NSUserDomainMask, true);
+ DCHECK_EQ([library_paths count], 1U);
+ NSString* library_path = [library_paths objectAtIndex:0];
+ NSString* launch_agents_path =
+ [library_path stringByAppendingPathComponent:@"LaunchAgents"];
+
+ NSError* err;
+ if (![[NSFileManager defaultManager] createDirectoryAtPath:launch_agents_path
+ withIntermediateDirectories:YES
+ attributes:nil
+ error:&err]) {
+ LOG(ERROR) << "GetUserAgentPath: " << err;
+ }
+
+ NSString* plist_file_path =
+ [launch_agents_path
+ stringByAppendingPathComponent:GetServiceProcessLaunchDFileName()];
+ return [NSURL fileURLWithPath:plist_file_path isDirectory:NO];
+}
+
+}
+
+// Gets the name of the service process IPC channel.
+IPC::ChannelHandle GetServiceProcessChannel() {
+ std::string socket_path;
+ scoped_nsobject<NSDictionary> dictionary(
+ base::mac::CFToNSCast(GTMCopyLaunchdExports()));
+ NSString *ns_socket_path =
+ [dictionary objectForKey:GetServiceProcessLaunchDSocketEnvVar()];
+ if (ns_socket_path) {
+ socket_path = base::SysNSStringToUTF8(ns_socket_path);
+ }
+ return IPC::ChannelHandle(socket_path);
+}
+
+bool ForceServiceProcessShutdown(const std::string& /* version */,
+ base::ProcessId /* process_id */) {
+ NSString* label = GetServiceProcessLaunchDLabel();
+ CFErrorRef err = NULL;
+ bool ret = GTMSMJobRemove(reinterpret_cast<CFStringRef>(label), &err);
+ if (!ret) {
+ LOG(ERROR) << "ForceServiceProcessShutdown: " << err;
+ CFRelease(err);
+ }
+ return ret;
+}
+
+bool GetServiceProcessData(std::string* version, base::ProcessId* pid) {
+ CFStringRef label =
+ reinterpret_cast<CFStringRef>(GetServiceProcessLaunchDLabel());
+ scoped_nsobject<NSDictionary> launchd_conf(
+ base::mac::CFToNSCast(GTMSMJobCopyDictionary(label)));
+ if (!launchd_conf.get()) {
+ return false;
+ }
+ // Anything past here will return true in that there does appear
+ // to be a service process of some sort registered with launchd.
+ if (version) {
+ *version = "0";
+ NSString *exe_path = [launchd_conf objectForKey:@ LAUNCH_JOBKEY_PROGRAM];
+ if (exe_path) {
+ NSString *bundle_path = [[[exe_path stringByDeletingLastPathComponent]
+ stringByDeletingLastPathComponent]
+ stringByDeletingLastPathComponent];
+ NSBundle *bundle = [NSBundle bundleWithPath:bundle_path];
+ if (bundle) {
+ NSString *ns_version =
+ [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
+ if (ns_version) {
+ *version = base::SysNSStringToUTF8(ns_version);
+ } else {
+ LOG(ERROR) << "Unable to get version at: "
+ << reinterpret_cast<CFStringRef>(bundle_path);
+ }
+ } else {
+ // The bundle has been deleted out from underneath the registered
+ // job.
+ LOG(ERROR) << "Unable to get bundle at: "
+ << reinterpret_cast<CFStringRef>(bundle_path);
+ }
+ } else {
+ LOG(ERROR) << "Unable to get executable path for service process";
+ }
+ }
+ if (pid) {
+ *pid = -1;
+ NSNumber* ns_pid = [launchd_conf objectForKey:@ LAUNCH_JOBKEY_PID];
+ if (ns_pid) {
+ *pid = [ns_pid intValue];
+ }
+ }
+ return true;
+}
+
+bool ServiceProcessState::Initialize() {
+ if (!InitializeState()) {
+ return false;
+ }
+ CFErrorRef err = NULL;
+ state_->launchd_conf_.reset(GTMSMJobCheckIn(&err));
+ if (!state_->launchd_conf_.get()) {
+ LOG(ERROR) << "InitializePlatformState: " << err;
+ CFRelease(err);
+ return false;
+ }
+ return true;
+}
+
+IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() {
+ CHECK(state_);
+ NSDictionary *ns_launchd_conf = base::mac::CFToNSCast(state_->launchd_conf_);
+ NSDictionary* socket_dict =
+ [ns_launchd_conf objectForKey:@ LAUNCH_JOBKEY_SOCKETS];
+ NSArray* sockets =
+ [socket_dict objectForKey:GetServiceProcessLaunchDSocketKey()];
+ CHECK_EQ([sockets count], 1U);
+ int socket = [[sockets objectAtIndex:0] intValue];
+ base::FileDescriptor fd(socket, false);
+ return IPC::ChannelHandle(std::string(), fd);
+}
+
+bool CheckServiceProcessReady() {
+ std::string version;
+ pid_t pid;
+ if (!GetServiceProcessData(&version, &pid)) {
+ return false;
+ }
+ scoped_ptr<Version> service_version(Version::GetVersionFromString(version));
+ bool ready = true;
+ if (!service_version.get()) {
+ ready = false;
+ } else {
+ chrome::VersionInfo version_info;
+ if (!version_info.is_valid()) {
+ // Our own version is invalid. This is an error case. Pretend that we
+ // are out of date.
+ NOTREACHED() << "Failed to get current file version";
+ ready = true;
+ }
+ else {
+ scoped_ptr<Version> running_version(Version::GetVersionFromString(
+ version_info.Version()));
+ if (!running_version.get()) {
+ // Our own version is invalid. This is an error case. Pretend that we
+ // are out of date.
+ NOTREACHED() << "Failed to parse version info";
+ ready = true;
+ } else if (running_version->CompareTo(*service_version) > 0) {
+ ready = false;
+ } else {
+ ready = true;
+ }
+ }
+ }
+ if (!ready) {
+ ForceServiceProcessShutdown(version, pid);
+ }
+ return ready;
+}
+
+CFDictionaryRef CreateServiceProcessLaunchdPlist(CommandLine* cmd_line,
+ bool for_auto_launch) {
+ base::mac::ScopedNSAutoreleasePool pool;
+
+ NSString *program =
+ base::SysUTF8ToNSString(cmd_line->GetProgram().value());
+
+ std::vector<std::string> args = cmd_line->argv();
+ NSMutableArray *ns_args = [NSMutableArray arrayWithCapacity:args.size()];
+
+ for (std::vector<std::string>::iterator iter = args.begin();
+ iter < args.end();
+ ++iter) {
+ [ns_args addObject:base::SysUTF8ToNSString(*iter)];
+ }
+
+ NSDictionary *socket =
+ [NSDictionary dictionaryWithObject:GetServiceProcessLaunchDSocketEnvVar()
+ forKey:@ LAUNCH_JOBSOCKETKEY_SECUREWITHKEY];
+ NSDictionary *sockets =
+ [NSDictionary dictionaryWithObject:socket
+ forKey:GetServiceProcessLaunchDSocketKey()];
+
+ // See the man page for launchd.plist.
+ NSMutableDictionary *launchd_plist =
+ [[NSMutableDictionary alloc] initWithObjectsAndKeys:
+ GetServiceProcessLaunchDLabel(), @ LAUNCH_JOBKEY_LABEL,
+ program, @ LAUNCH_JOBKEY_PROGRAM,
+ ns_args, @ LAUNCH_JOBKEY_PROGRAMARGUMENTS,
+ sockets, @ LAUNCH_JOBKEY_SOCKETS,
+ nil];
+
+ if (for_auto_launch) {
+ // We want the service process to be able to exit if there are no services
+ // enabled. With a value of NO in the SuccessfulExit key, launchd will
+ // relaunch the service automatically in any other case than exiting
+ // cleanly with a 0 return code.
+ NSDictionary *keep_alive =
+ [NSDictionary
+ dictionaryWithObject:[NSNumber numberWithBool:NO]
+ forKey:@ LAUNCH_JOBKEY_KEEPALIVE_SUCCESSFULEXIT];
+ NSDictionary *auto_launchd_plist =
+ [[NSDictionary alloc] initWithObjectsAndKeys:
+ [NSNumber numberWithBool:YES], @ LAUNCH_JOBKEY_RUNATLOAD,
+ keep_alive, @ LAUNCH_JOBKEY_KEEPALIVE,
+ @"Background", @ LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE,
+ nil];
+ [launchd_plist addEntriesFromDictionary:auto_launchd_plist];
+ }
+ return reinterpret_cast<CFDictionaryRef>(launchd_plist);
+}
+
+// Writes the launchd property list into the user's LaunchAgents directory,
+// creating that directory if needed. This will cause the service process to be
+// auto launched on the next user login.
+bool ServiceProcessState::AddToAutoRun() {
+ // We're creating directories and writing a file.
+ base::ThreadRestrictions::AssertIOAllowed();
+ DCHECK(autorun_command_line_.get());
+
+ base::mac::ScopedNSAutoreleasePool pool;
+ scoped_nsobject<NSDictionary> plist(
+ base::mac::CFToNSCast(CreateServiceProcessLaunchdPlist(
+ autorun_command_line_.get(), true)));
+ NSURL* plist_url = GetUserAgentPath();
+ return [plist writeToURL:plist_url atomically:YES];
+}
+
+bool ServiceProcessState::RemoveFromAutoRun() {
+ // We're killing a file.
+ base::ThreadRestrictions::AssertIOAllowed();
+
+ base::mac::ScopedNSAutoreleasePool pool;
+ NSURL* plist_url = GetUserAgentPath();
+ SInt32 error = 0;
+ if (!CFURLDestroyResource(reinterpret_cast<CFURLRef>(plist_url), &error)) {
+ LOG(ERROR) << "RemoveFromAutoRun: " << error;
+ return false;
+ }
+ return true;
+}
diff --git a/chrome/common/service_process_util_posix.cc b/chrome/common/service_process_util_posix.cc
index 7deebaa..189fd7f 100644
--- a/chrome/common/service_process_util_posix.cc
+++ b/chrome/common/service_process_util_posix.cc
@@ -2,93 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/service_process_util.h"
+#include "chrome/common/service_process_util_posix.h"
-#include <signal.h>
-#include <unistd.h>
-
-#include "base/file_util.h"
-#include "base/logging.h"
-#include "base/message_loop.h"
+#include "base/basictypes.h"
#include "base/message_loop_proxy.h"
-#include "base/message_pump_libevent.h"
-#include "base/path_service.h"
-#include "chrome/common/chrome_paths.h"
-#include "chrome/common/chrome_version_info.h"
-#include "chrome/common/multi_process_lock.h"
namespace {
-
int g_signal_socket = -1;
-
-// Gets the name of the lock file for service process.
-FilePath GetServiceProcessLockFilePath() {
- FilePath user_data_dir;
- PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
- chrome::VersionInfo version_info;
- std::string lock_file_name = version_info.Version() + "Service Process Lock";
- return user_data_dir.Append(lock_file_name);
-}
-
-// Attempts to take a lock named |name|. If |waiting| is true then this will
-// make multiple attempts to acquire the lock.
-// Caller is responsible for ownership of the MultiProcessLock.
-MultiProcessLock* TakeNamedLock(const std::string& name, bool waiting) {
- scoped_ptr<MultiProcessLock> lock(MultiProcessLock::Create(name));
- if (lock == NULL) return NULL;
- bool got_lock = false;
- for (int i = 0; i < 10; ++i) {
- if (lock->TryLock()) {
- got_lock = true;
- break;
- }
- if (!waiting) break;
- base::PlatformThread::Sleep(100 * i);
- }
- if (!got_lock) {
- lock.reset();
- }
- return lock.release();
}
-MultiProcessLock* TakeServiceRunningLock(bool waiting) {
- std::string lock_name =
- GetServiceProcessScopedName("_service_running");
- return TakeNamedLock(lock_name, waiting);
+ServiceProcessShutdownMonitor::ServiceProcessShutdownMonitor(
+ Task* shutdown_task)
+ : shutdown_task_(shutdown_task) {
}
-MultiProcessLock* TakeServiceInitializingLock(bool waiting) {
- std::string lock_name =
- GetServiceProcessScopedName("_service_initializing");
- return TakeNamedLock(lock_name, waiting);
-}
-
-} // namespace
-
-// Watches for |kShutDownMessage| to be written to the file descriptor it is
-// watching. When it reads |kShutDownMessage|, it performs |shutdown_task_|.
-// Used here to monitor the socket listening to g_signal_socket.
-class ServiceProcessShutdownMonitor
- : public base::MessagePumpLibevent::Watcher {
- public:
-
- enum {
- kShutDownMessage = 0xdecea5e
- };
-
- explicit ServiceProcessShutdownMonitor(Task* shutdown_task)
- : shutdown_task_(shutdown_task) {
- }
-
- virtual ~ServiceProcessShutdownMonitor();
-
- virtual void OnFileCanReadWithoutBlocking(int fd);
- virtual void OnFileCanWriteWithoutBlocking(int fd);
-
- private:
- scoped_ptr<Task> shutdown_task_;
-};
-
ServiceProcessShutdownMonitor::~ServiceProcessShutdownMonitor() {
}
@@ -125,66 +52,43 @@ static void SigTermHandler(int sig, siginfo_t* info, void* uap) {
}
}
-// See comment for SigTermHandler.
-bool ForceServiceProcessShutdown(const std::string& version,
- base::ProcessId process_id) {
- if (kill(process_id, SIGTERM) < 0) {
- PLOG(ERROR) << "kill";
- return false;
+ServiceProcessState::StateData::StateData() {}
+
+void ServiceProcessState::StateData::SignalReady() {
+ CHECK(MessageLoopForIO::current()->WatchFileDescriptor(
+ sockets_[0], true, MessageLoopForIO::WATCH_READ,
+ &watcher_, shut_down_monitor_.get()));
+ g_signal_socket = sockets_[1];
+
+ // Set up signal handler for SIGTERM.
+ struct sigaction action;
+ action.sa_sigaction = SigTermHandler;
+ sigemptyset(&action.sa_mask);
+ action.sa_flags = SA_SIGINFO;
+ if (sigaction(SIGTERM, &action, &old_action_) == 0) {
+ // If the old_action is not default, somebody else has installed a
+ // a competing handler. Our handler is going to override it so it
+ // won't be called. If this occurs it needs to be fixed.
+ DCHECK_EQ(old_action_.sa_handler, SIG_DFL);
+ set_action_ = true;
+#if defined(OS_LINUX)
+ initializing_lock_.reset();
+#endif // OS_LINUX
+ } else {
+ PLOG(ERROR) << "sigaction";
}
- return true;
}
-bool CheckServiceProcessReady() {
- scoped_ptr<MultiProcessLock> running_lock(TakeServiceRunningLock(false));
- return running_lock.get() == NULL;
-}
-
-struct ServiceProcessState::StateData
- : public base::RefCountedThreadSafe<ServiceProcessState::StateData> {
- scoped_ptr<MultiProcessLock> initializing_lock_;
- scoped_ptr<MultiProcessLock> running_lock_;
- scoped_ptr<ServiceProcessShutdownMonitor> shut_down_monitor_;
- base::MessagePumpLibevent::FileDescriptorWatcher watcher_;
- int sockets_[2];
- struct sigaction old_action_;
- bool set_action_;
-
- // WatchFileDescriptor needs to be set up by the thread that is going
- // to be monitoring it.
- void SignalReady() {
- CHECK(MessageLoopForIO::current()->WatchFileDescriptor(
- sockets_[0], true, MessageLoopForIO::WATCH_READ,
- &watcher_, shut_down_monitor_.get()));
- g_signal_socket = sockets_[1];
-
- // Set up signal handler for SIGTERM.
- struct sigaction action;
- action.sa_sigaction = SigTermHandler;
- sigemptyset(&action.sa_mask);
- action.sa_flags = SA_SIGINFO;
- if (sigaction(SIGTERM, &action, &old_action_) == 0) {
- // If the old_action is not default, somebody else has installed a
- // a competing handler. Our handler is going to override it so it
- // won't be called. If this occurs it needs to be fixed.
- DCHECK_EQ(old_action_.sa_handler, SIG_DFL);
- set_action_ = true;
- initializing_lock_.reset();
- } else {
- PLOG(ERROR) << "sigaction";
- }
- }
-};
+ServiceProcessState::StateData::~StateData() {}
-bool ServiceProcessState::TakeSingletonLock() {
+bool ServiceProcessState::InitializeState() {
CHECK(!state_);
state_ = new StateData;
state_->AddRef();
state_->sockets_[0] = -1;
state_->sockets_[1] = -1;
state_->set_action_ = false;
- state_->initializing_lock_.reset(TakeServiceInitializingLock(true));
- return state_->initializing_lock_.get();
+ return true;
}
bool ServiceProcessState::SignalReady(
@@ -192,10 +96,12 @@ bool ServiceProcessState::SignalReady(
CHECK(state_);
CHECK_EQ(g_signal_socket, -1);
+#if defined(OS_LINUX)
state_->running_lock_.reset(TakeServiceRunningLock(true));
if (state_->running_lock_.get() == NULL) {
return false;
}
+#endif // OS_LINUX
state_->shut_down_monitor_.reset(
new ServiceProcessShutdownMonitor(shutdown_task));
if (pipe(state_->sockets_) < 0) {
@@ -207,16 +113,6 @@ bool ServiceProcessState::SignalReady(
return true;
}
-bool ServiceProcessState::AddToAutoRun() {
- NOTIMPLEMENTED();
- return false;
-}
-
-bool ServiceProcessState::RemoveFromAutoRun() {
- NOTIMPLEMENTED();
- return false;
-}
-
void ServiceProcessState::TearDownState() {
g_signal_socket = -1;
if (state_) {
diff --git a/chrome/common/service_process_util_posix.h b/chrome/common/service_process_util_posix.h
new file mode 100644
index 0000000..42b0a31
--- /dev/null
+++ b/chrome/common/service_process_util_posix.h
@@ -0,0 +1,77 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_
+#define CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_
+
+#include "service_process_util.h"
+
+#include <signal.h>
+
+#include "base/basictypes.h"
+#include "base/message_loop.h"
+#include "base/message_pump_libevent.h"
+#include "base/scoped_ptr.h"
+
+#if defined(OS_LINUX)
+#include "chrome/common/multi_process_lock.h"
+MultiProcessLock* TakeServiceRunningLock(bool waiting);
+#endif // OS_LINUX
+
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_cftyperef.h"
+class CommandLine;
+CFDictionaryRef CreateServiceProcessLaunchdPlist(CommandLine* cmd_line,
+ bool for_auto_launch);
+#endif // OS_MACOSX
+
+// Watches for |kShutDownMessage| to be written to the file descriptor it is
+// watching. When it reads |kShutDownMessage|, it performs |shutdown_task_|.
+// Used here to monitor the socket listening to g_signal_socket.
+class ServiceProcessShutdownMonitor
+ : public base::MessagePumpLibevent::Watcher {
+ public:
+
+ enum {
+ kShutDownMessage = 0xdecea5e
+ };
+
+ explicit ServiceProcessShutdownMonitor(Task* shutdown_task);
+ virtual ~ServiceProcessShutdownMonitor();
+
+ // base::MessagePumpLibevent::Watcher overrides
+ virtual void OnFileCanReadWithoutBlocking(int fd);
+ virtual void OnFileCanWriteWithoutBlocking(int fd);
+
+ private:
+ scoped_ptr<Task> shutdown_task_;
+};
+
+struct ServiceProcessState::StateData
+ : public base::RefCountedThreadSafe<ServiceProcessState::StateData> {
+ StateData();
+
+ // WatchFileDescriptor needs to be set up by the thread that is going
+ // to be monitoring it.
+ void SignalReady();
+
+#if defined(OS_MACOSX)
+ base::mac::ScopedCFTypeRef<CFDictionaryRef> launchd_conf_;
+#endif // OS_MACOSX
+#if defined(OS_LINUX)
+ scoped_ptr<MultiProcessLock> initializing_lock_;
+ scoped_ptr<MultiProcessLock> running_lock_;
+#endif // OS_LINUX
+ scoped_ptr<ServiceProcessShutdownMonitor> shut_down_monitor_;
+ base::MessagePumpLibevent::FileDescriptorWatcher watcher_;
+ int sockets_[2];
+ struct sigaction old_action_;
+ bool set_action_;
+
+ protected:
+ friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>;
+ virtual ~StateData();
+};
+
+#endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_
diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc
index ad6b257..03827e0 100644
--- a/chrome/common/service_process_util_unittest.cc
+++ b/chrome/common/service_process_util_unittest.cc
@@ -2,16 +2,34 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/basictypes.h"
+
+#if !defined(OS_MACOSX)
+// TODO(dmaclach): Figure out tests that will work with launchd on Mac OS.
+
#include "base/at_exit.h"
+#include "base/command_line.h"
#include "base/process_util.h"
+#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/test/multiprocess_test.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread.h"
+#include "base/utf_string_conversions.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/service_process_util.h"
#include "testing/multiprocess_func_list.h"
+#if defined(OS_WIN)
+#include "base/win/win_util.h"
+#endif
+
+#if defined(OS_LINUX)
+#include <glib.h>
+#include "chrome/common/auto_start_linux.h"
+#endif
+
namespace {
bool g_good_shutdown = false;
@@ -86,6 +104,52 @@ TEST_F(ServiceProcessStateTest, ReadyState) {
LaunchAndWait("ServiceProcessStateTestReadyFalse");
}
+TEST_F(ServiceProcessStateTest, AutoRun) {
+ ServiceProcessState* state = ServiceProcessState::GetInstance();
+ ASSERT_TRUE(state->AddToAutoRun());
+ scoped_ptr<CommandLine> autorun_command_line;
+#if defined(OS_WIN)
+ std::string value_name = GetServiceProcessScopedName("_service_run");
+ string16 value;
+ EXPECT_TRUE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER,
+ UTF8ToWide(value_name),
+ &value));
+ autorun_command_line.reset(new CommandLine(CommandLine::FromString(value)));
+#elif defined(OS_LINUX)
+#if defined(GOOGLE_CHROME_BUILD)
+ std::string base_desktop_name = "google-chrome-service.desktop";
+#else // CHROMIUM_BUILD
+ std::string base_desktop_name = "chromium-service.desktop";
+#endif
+ std::string exec_value;
+ EXPECT_TRUE(AutoStart::GetAutostartFileValue(
+ GetServiceProcessScopedName(base_desktop_name), "Exec", &exec_value));
+ GError *error = NULL;
+ gchar **argv = NULL;
+ gint argc = NULL;
+ if (g_shell_parse_argv(exec_value.c_str(), &argc, &argv, &error)) {
+ autorun_command_line.reset(new CommandLine(argc, argv));
+ g_strfreev(argv);
+ } else {
+ ADD_FAILURE();
+ g_error_free(error);
+ }
+#endif // defined(OS_WIN)
+ if (autorun_command_line.get()) {
+ EXPECT_EQ(autorun_command_line->GetSwitchValueASCII(switches::kProcessType),
+ std::string(switches::kServiceProcess));
+ }
+ ASSERT_TRUE(state->RemoveFromAutoRun());
+#if defined(OS_WIN)
+ EXPECT_FALSE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER,
+ UTF8ToWide(value_name),
+ &value));
+#elif defined(OS_LINUX)
+ EXPECT_FALSE(AutoStart::GetAutostartFileValue(
+ GetServiceProcessScopedName(base_desktop_name), "Exec", &exec_value));
+#endif // defined(OS_WIN)
+}
+
TEST_F(ServiceProcessStateTest, SharedMem) {
std::string version;
base::ProcessId pid;
@@ -95,11 +159,11 @@ TEST_F(ServiceProcessStateTest, SharedMem) {
// GetServiceProcessPid to lie. On Windows, we use a named event so we
// don't have this issue. Until we have a more stable shared memory
// implementation on Posix, this check will only execute on Windows.
- ASSERT_FALSE(GetServiceProcessSharedData(&version, &pid));
+ ASSERT_FALSE(GetServiceProcessData(&version, &pid));
#endif // defined(OS_WIN)
ServiceProcessState* state = ServiceProcessState::GetInstance();
ASSERT_TRUE(state->Initialize());
- ASSERT_TRUE(GetServiceProcessSharedData(&version, &pid));
+ ASSERT_TRUE(GetServiceProcessData(&version, &pid));
ASSERT_EQ(base::GetCurrentProcId(), pid);
}
@@ -113,7 +177,7 @@ TEST_F(ServiceProcessStateTest, ForceShutdown) {
ASSERT_TRUE(CheckServiceProcessReady());
std::string version;
base::ProcessId pid;
- ASSERT_TRUE(GetServiceProcessSharedData(&version, &pid));
+ ASSERT_TRUE(GetServiceProcessData(&version, &pid));
ASSERT_TRUE(ForceServiceProcessShutdown(version, pid));
int exit_code = 0;
ASSERT_TRUE(base::WaitForExitCodeWithTimeout(handle,
@@ -157,3 +221,4 @@ MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestShutdown) {
return 0;
}
+#endif // !OS_MACOSX
diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc
index f9a1816..adc5a72 100644
--- a/chrome/common/service_process_util_win.cc
+++ b/chrome/common/service_process_util_win.cc
@@ -8,12 +8,14 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
+#include "base/scoped_ptr.h"
#include "base/string16.h"
#include "base/task.h"
#include "base/utf_string_conversions.h"
#include "base/win/object_watcher.h"
#include "base/win/scoped_handle.h"
#include "base/win/win_util.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
namespace {
@@ -28,6 +30,22 @@ string16 GetServiceProcessShutdownEventName() {
GetServiceProcessScopedVersionedName("_service_shutdown_evt"));
}
+std::string GetServiceProcessAutoRunKey() {
+ return GetServiceProcessScopedName("_service_run");
+}
+
+// Returns the name of the autotun reg value that we used to use for older
+// versions of Chrome.
+std::string GetObsoleteServiceProcessAutoRunKey() {
+ FilePath user_data_dir;
+ PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
+ std::string scoped_name = WideToUTF8(user_data_dir.value());
+ std::replace(scoped_name.begin(), scoped_name.end(), '\\', '!');
+ std::replace(scoped_name.begin(), scoped_name.end(), '/', '!');
+ scoped_name.append("_service_run");
+ return scoped_name;
+}
+
class ServiceProcessShutdownMonitor
: public base::win::ObjectWatcher::Delegate {
public:
@@ -85,8 +103,14 @@ struct ServiceProcessState::StateData {
scoped_ptr<ServiceProcessShutdownMonitor> shutdown_monitor;
};
-bool ServiceProcessState::TakeSingletonLock() {
+bool ServiceProcessState::InitializeState() {
DCHECK(!state_);
+ state_ = new StateData;
+ return true;
+}
+
+bool ServiceProcessState::TakeSingletonLock() {
+ DCHECK(state_);
string16 event_name = GetServiceProcessReadyEventName();
CHECK(event_name.length() <= MAX_PATH);
base::win::ScopedHandle service_process_ready_event;
@@ -96,7 +120,6 @@ bool ServiceProcessState::TakeSingletonLock() {
if ((error == ERROR_ALREADY_EXISTS) || (error == ERROR_ACCESS_DENIED))
return false;
DCHECK(service_process_ready_event.IsValid());
- state_ = new StateData;
state_->ready_event.Set(service_process_ready_event.Take());
return true;
}
@@ -117,24 +140,24 @@ bool ServiceProcessState::SignalReady(
}
bool ServiceProcessState::AddToAutoRun() {
- FilePath chrome_path;
- if (PathService::Get(base::FILE_EXE, &chrome_path)) {
- CommandLine cmd_line(chrome_path);
- cmd_line.AppendSwitchASCII(switches::kProcessType,
- switches::kServiceProcess);
- // We need a unique name for the command per user-date-dir. Just use the
- // channel name.
- return base::win::AddCommandToAutoRun(
- HKEY_CURRENT_USER,
- UTF8ToWide(GetAutoRunKey()),
- cmd_line.command_line_string());
- }
- return false;
+ DCHECK(autorun_command_line_.get());
+ // Remove the old autorun value first because we changed the naming scheme
+ // for the autorun value name.
+ base::win::RemoveCommandFromAutoRun(
+ HKEY_CURRENT_USER, UTF8ToWide(GetObsoleteServiceProcessAutoRunKey()));
+ return base::win::AddCommandToAutoRun(
+ HKEY_CURRENT_USER,
+ UTF8ToWide(GetServiceProcessAutoRunKey()),
+ autorun_command_line_->command_line_string());
}
bool ServiceProcessState::RemoveFromAutoRun() {
+ // Remove the old autorun value first because we changed the naming scheme
+ // for the autorun value name.
+ base::win::RemoveCommandFromAutoRun(
+ HKEY_CURRENT_USER, UTF8ToWide(GetObsoleteServiceProcessAutoRunKey()));
return base::win::RemoveCommandFromAutoRun(
- HKEY_CURRENT_USER, UTF8ToWide(GetAutoRunKey()));
+ HKEY_CURRENT_USER, UTF8ToWide(GetServiceProcessAutoRunKey()));
}
void ServiceProcessState::TearDownState() {
diff --git a/chrome/common/socket_stream_dispatcher.cc b/chrome/common/socket_stream_dispatcher.cc
deleted file mode 100644
index a7e484a..0000000
--- a/chrome/common/socket_stream_dispatcher.cc
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/socket_stream_dispatcher.h"
-
-#include <vector>
-
-#include "base/id_map.h"
-#include "base/message_loop.h"
-#include "base/ref_counted.h"
-#include "base/task.h"
-#include "chrome/common/child_thread.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/net/socket_stream.h"
-#include "googleurl/src/gurl.h"
-#include "ipc/ipc_message.h"
-#include "webkit/glue/websocketstreamhandle_bridge.h"
-#include "webkit/glue/websocketstreamhandle_delegate.h"
-
-// IPCWebSocketStreamHandleBridge is owned by each SocketStreamHandle.
-// It communicates with the main browser process via SocketStreamDispatcher.
-class IPCWebSocketStreamHandleBridge
- : public webkit_glue::WebSocketStreamHandleBridge {
- public:
- IPCWebSocketStreamHandleBridge(
- ChildThread* child_thread,
- WebKit::WebSocketStreamHandle* handle,
- webkit_glue::WebSocketStreamHandleDelegate* delegate)
- : socket_id_(chrome_common_net::kNoSocketId),
- child_thread_(child_thread),
- handle_(handle),
- delegate_(delegate) {}
-
- // Returns the handle having given id or NULL if there is no such handle.
- static IPCWebSocketStreamHandleBridge* FromSocketId(int id);
-
- // webkit_glue::WebSocketStreamHandleBridge methods.
- virtual void Connect(const GURL& url);
- virtual bool Send(const std::vector<char>& data);
- virtual void Close();
-
- // Called by SocketStreamDispatcher.
- void OnConnected(int max_amount_send_allowed);
- void OnSentData(int amount_sent);
- void OnReceivedData(const std::vector<char>& data);
- void OnClosed();
-
- private:
- virtual ~IPCWebSocketStreamHandleBridge();
-
- void DoConnect(const GURL& url);
- int socket_id_;
-
- ChildThread* child_thread_;
- WebKit::WebSocketStreamHandle* handle_;
- webkit_glue::WebSocketStreamHandleDelegate* delegate_;
-
- static IDMap<IPCWebSocketStreamHandleBridge> all_bridges;
-};
-
-IDMap<IPCWebSocketStreamHandleBridge>
-IPCWebSocketStreamHandleBridge::all_bridges;
-
-/* static */
-IPCWebSocketStreamHandleBridge* IPCWebSocketStreamHandleBridge::FromSocketId(
- int id) {
- return all_bridges.Lookup(id);
-}
-
-IPCWebSocketStreamHandleBridge::~IPCWebSocketStreamHandleBridge() {
- DVLOG(1) << "IPCWebSocketStreamHandleBridge destructor socket_id="
- << socket_id_;
- if (socket_id_ != chrome_common_net::kNoSocketId) {
- child_thread_->Send(new ViewHostMsg_Close(socket_id_));
- socket_id_ = chrome_common_net::kNoSocketId;
- }
-}
-
-void IPCWebSocketStreamHandleBridge::Connect(const GURL& url) {
- DCHECK(child_thread_);
- DVLOG(1) << "Connect url=" << url;
- child_thread_->message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(this, &IPCWebSocketStreamHandleBridge::DoConnect,
- url));
-}
-
-bool IPCWebSocketStreamHandleBridge::Send(
- const std::vector<char>& data) {
- DVLOG(1) << "Send data.size=" << data.size();
- if (child_thread_->Send(
- new ViewHostMsg_SocketStream_SendData(socket_id_, data))) {
- if (delegate_)
- delegate_->WillSendData(handle_, &data[0], data.size());
- return true;
- }
- return false;
-}
-
-void IPCWebSocketStreamHandleBridge::Close() {
- DVLOG(1) << "Close socket_id" << socket_id_;
- child_thread_->Send(new ViewHostMsg_SocketStream_Close(socket_id_));
-}
-
-void IPCWebSocketStreamHandleBridge::OnConnected(int max_pending_send_allowed) {
- DVLOG(1) << "IPCWebSocketStreamHandleBridge::OnConnected socket_id="
- << socket_id_;
- if (delegate_)
- delegate_->DidOpenStream(handle_, max_pending_send_allowed);
-}
-
-void IPCWebSocketStreamHandleBridge::OnSentData(int amount_sent) {
- if (delegate_)
- delegate_->DidSendData(handle_, amount_sent);
-}
-
-void IPCWebSocketStreamHandleBridge::OnReceivedData(
- const std::vector<char>& data) {
- if (delegate_)
- delegate_->DidReceiveData(handle_, &data[0], data.size());
-}
-
-void IPCWebSocketStreamHandleBridge::OnClosed() {
- DVLOG(1) << "IPCWebSocketStreamHandleBridge::OnClosed";
- if (socket_id_ != chrome_common_net::kNoSocketId) {
- all_bridges.Remove(socket_id_);
- socket_id_ = chrome_common_net::kNoSocketId;
- }
- if (delegate_)
- delegate_->DidClose(handle_);
- delegate_ = NULL;
- Release();
-}
-
-void IPCWebSocketStreamHandleBridge::DoConnect(const GURL& url) {
- DCHECK(child_thread_);
- DCHECK_EQ(socket_id_, chrome_common_net::kNoSocketId);
- if (delegate_)
- delegate_->WillOpenStream(handle_, url);
-
- socket_id_ = all_bridges.Add(this);
- DCHECK_NE(socket_id_, chrome_common_net::kNoSocketId);
- AddRef(); // Released in OnClosed().
- if (child_thread_->Send(
- new ViewHostMsg_SocketStream_Connect(url, socket_id_))) {
- DVLOG(1) << "Connect socket_id=" << socket_id_;
- // TODO(ukai): timeout to OnConnected.
- } else {
- LOG(ERROR) << "IPC SocketStream_Connect failed.";
- OnClosed();
- }
-}
-
-SocketStreamDispatcher::SocketStreamDispatcher() {
-}
-
-/* static */
-webkit_glue::WebSocketStreamHandleBridge*
-SocketStreamDispatcher::CreateBridge(
- WebKit::WebSocketStreamHandle* handle,
- webkit_glue::WebSocketStreamHandleDelegate* delegate) {
- return new IPCWebSocketStreamHandleBridge(
- ChildThread::current(), handle, delegate);
-}
-
-bool SocketStreamDispatcher::OnMessageReceived(const IPC::Message& msg) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(SocketStreamDispatcher, msg)
- IPC_MESSAGE_HANDLER(ViewMsg_SocketStream_Connected, OnConnected)
- IPC_MESSAGE_HANDLER(ViewMsg_SocketStream_SentData, OnSentData)
- IPC_MESSAGE_HANDLER(ViewMsg_SocketStream_ReceivedData, OnReceivedData)
- IPC_MESSAGE_HANDLER(ViewMsg_SocketStream_Closed, OnClosed)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-void SocketStreamDispatcher::OnConnected(int socket_id,
- int max_pending_send_allowed) {
- DVLOG(1) << "SocketStreamDispatcher::OnConnected socket_id=" << socket_id
- << " max_pending_send_allowed=" << max_pending_send_allowed;
- IPCWebSocketStreamHandleBridge* bridge =
- IPCWebSocketStreamHandleBridge::FromSocketId(socket_id);
- if (bridge)
- bridge->OnConnected(max_pending_send_allowed);
- else
- DLOG(ERROR) << "No SocketStreamHandleBridge for socket_id=" << socket_id;
-}
-
-void SocketStreamDispatcher::OnSentData(int socket_id, int amount_sent) {
- IPCWebSocketStreamHandleBridge* bridge =
- IPCWebSocketStreamHandleBridge::FromSocketId(socket_id);
- if (bridge)
- bridge->OnSentData(amount_sent);
- else
- DLOG(ERROR) << "No SocketStreamHandleBridge for socket_id=" << socket_id;
-}
-
-void SocketStreamDispatcher::OnReceivedData(
- int socket_id, const std::vector<char>& data) {
- IPCWebSocketStreamHandleBridge* bridge =
- IPCWebSocketStreamHandleBridge::FromSocketId(socket_id);
- if (bridge)
- bridge->OnReceivedData(data);
- else
- DLOG(ERROR) << "No SocketStreamHandleBridge for socket_id=" << socket_id;
-}
-
-void SocketStreamDispatcher::OnClosed(int socket_id) {
- IPCWebSocketStreamHandleBridge* bridge =
- IPCWebSocketStreamHandleBridge::FromSocketId(socket_id);
- if (bridge)
- bridge->OnClosed();
- else
- DLOG(ERROR) << "No SocketStreamHandleBridge for socket_id=" << socket_id;
-}
diff --git a/chrome/common/socket_stream_dispatcher.h b/chrome/common/socket_stream_dispatcher.h
deleted file mode 100644
index 38da8a6..0000000
--- a/chrome/common/socket_stream_dispatcher.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_
-#define CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_
-#pragma once
-
-#include <vector>
-
-#include "base/basictypes.h"
-#include "ipc/ipc_channel.h"
-
-namespace WebKit {
-class WebSocketStreamHandle;
-}
-
-namespace webkit_glue {
-class WebSocketStreamHandleBridge;
-class WebSocketStreamHandleDelegate;
-}
-
-// Dispatches socket stream related messages sent to a child process from the
-// main browser process. There is one instance per child process. Messages
-// are dispatched on the main child thread. The RenderThread class
-// creates an instance of SocketStreamDispatcher and delegates calls to it.
-class SocketStreamDispatcher : public IPC::Channel::Listener {
- public:
- SocketStreamDispatcher();
- virtual ~SocketStreamDispatcher() {}
-
- static webkit_glue::WebSocketStreamHandleBridge* CreateBridge(
- WebKit::WebSocketStreamHandle* handle,
- webkit_glue::WebSocketStreamHandleDelegate* delegate);
-
- // IPC::Channel::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& msg);
-
- private:
- void OnConnected(int socket_id, int max_amount_send_allowed);
- void OnSentData(int socket_id, int amount_sent);
- void OnReceivedData(int socket_id, const std::vector<char>& data);
- void OnClosed(int socket_id);
-
- DISALLOW_COPY_AND_ASSIGN(SocketStreamDispatcher);
-};
-
-#endif // CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_
diff --git a/chrome/common/socket_stream_dispatcher_dummy.cc b/chrome/common/socket_stream_dispatcher_dummy.cc
deleted file mode 100644
index ef49285..0000000
--- a/chrome/common/socket_stream_dispatcher_dummy.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/socket_stream_dispatcher.h"
-
-#include "base/compiler_specific.h"
-
-// SocketStreamDispatcher ------------------------------------------------------
-
-SocketStreamDispatcher::SocketStreamDispatcher() {
-}
-
-// SocketStreamDispatcher implementation ---------------------------------------
-
-bool SocketStreamDispatcher::OnMessageReceived(const IPC::Message& message) {
- return false;
-}
diff --git a/chrome/common/speech_input_messages.cc b/chrome/common/speech_input_messages.cc
deleted file mode 100644
index c93062f..0000000
--- a/chrome/common/speech_input_messages.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/common_param_traits.h"
-
-#define IPC_MESSAGE_IMPL
-#include "chrome/common/speech_input_messages.h"
-
-SpeechInputHostMsg_StartRecognition_Params::
-SpeechInputHostMsg_StartRecognition_Params()
- : render_view_id(0),
- request_id(0) {
-}
-
-SpeechInputHostMsg_StartRecognition_Params::
-~SpeechInputHostMsg_StartRecognition_Params() {
-}
-
-namespace IPC {
-
-void ParamTraits<speech_input::SpeechInputResultItem>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.utterance);
- WriteParam(m, p.confidence);
-}
-
-bool ParamTraits<speech_input::SpeechInputResultItem>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return ReadParam(m, iter, &p->utterance) &&
- ReadParam(m, iter, &p->confidence);
-}
-
-void ParamTraits<speech_input::SpeechInputResultItem>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.utterance, l);
- l->append(":");
- LogParam(p.confidence, l);
- l->append(")");
-}
-
-void ParamTraits<SpeechInputHostMsg_StartRecognition_Params>::Write(
- Message* m,
- const param_type& p) {
- WriteParam(m, p.render_view_id);
- WriteParam(m, p.request_id);
- WriteParam(m, p.element_rect);
- WriteParam(m, p.language);
- WriteParam(m, p.grammar);
- WriteParam(m, p.origin_url);
-}
-
-bool ParamTraits<SpeechInputHostMsg_StartRecognition_Params>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->render_view_id) &&
- ReadParam(m, iter, &p->request_id) &&
- ReadParam(m, iter, &p->element_rect) &&
- ReadParam(m, iter, &p->language) &&
- ReadParam(m, iter, &p->grammar) &&
- ReadParam(m, iter, &p->origin_url);
-}
-
-void ParamTraits<SpeechInputHostMsg_StartRecognition_Params>::Log(
- const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.render_view_id, l);
- l->append(", ");
- LogParam(p.request_id, l);
- l->append(", ");
- LogParam(p.element_rect, l);
- l->append(", ");
- LogParam(p.language, l);
- l->append(", ");
- LogParam(p.grammar, l);
- l->append(", ");
- LogParam(p.origin_url, l);
- l->append(")");
-}
-
-} // namespace IPC
diff --git a/chrome/common/speech_input_messages.h b/chrome/common/speech_input_messages.h
index c46ac02..8080db9 100644
--- a/chrome/common/speech_input_messages.h
+++ b/chrome/common/speech_input_messages.h
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_SPEECH_INPUT_MESSAGES_H_
-#define CHROME_COMMON_SPEECH_INPUT_MESSAGES_H_
-#pragma once
+// Multiply-included message file, hence no include guard.
+#include <string>
+
+#include "chrome/common/common_param_traits.h"
#include "chrome/common/speech_input_result.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
@@ -13,42 +14,26 @@
#define IPC_MESSAGE_START SpeechInputMsgStart
-namespace speech_input {
-struct SpeechInputResultItem;
-}
-
// Used to start a speech recognition session.
-struct SpeechInputHostMsg_StartRecognition_Params {
- SpeechInputHostMsg_StartRecognition_Params();
- ~SpeechInputHostMsg_StartRecognition_Params();
-
- int render_view_id; // The render view requesting speech recognition.
- int request_id; // Request ID used within the render view.
- gfx::Rect element_rect; // Position of the UI element in page coordinates.
- std::string language; // Language to use for speech recognition.
- std::string grammar; // Speech grammar given by the speech input element.
- std::string origin_url; // URL of the page (or iframe if applicable).
-};
-
-namespace IPC {
-
-template <>
-struct ParamTraits<speech_input::SpeechInputResultItem> {
- typedef speech_input::SpeechInputResultItem param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-template <>
-struct ParamTraits<SpeechInputHostMsg_StartRecognition_Params> {
- typedef SpeechInputHostMsg_StartRecognition_Params param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-} // namespace IPC
+IPC_STRUCT_BEGIN(SpeechInputHostMsg_StartRecognition_Params)
+ // The render view requesting speech recognition.
+ IPC_STRUCT_MEMBER(int, render_view_id)
+ // Request ID used within the render view.
+ IPC_STRUCT_MEMBER(int, request_id)
+ // Position of the UI element in page coordinates.
+ IPC_STRUCT_MEMBER(gfx::Rect, element_rect)
+ // Language to use for speech recognition.
+ IPC_STRUCT_MEMBER(std::string, language)
+ // Speech grammar given by the speech input element.
+ IPC_STRUCT_MEMBER(std::string, grammar)
+ // URL of the page (or iframe if applicable).
+ IPC_STRUCT_MEMBER(std::string, origin_url)
+IPC_STRUCT_END()
+
+IPC_STRUCT_TRAITS_BEGIN(speech_input::SpeechInputResultItem)
+ IPC_STRUCT_TRAITS_MEMBER(utterance)
+ IPC_STRUCT_TRAITS_MEMBER(confidence)
+IPC_STRUCT_TRAITS_END()
// Speech input messages sent from the renderer to the browser.
@@ -90,4 +75,3 @@ IPC_MESSAGE_ROUTED1(SpeechInputMsg_RecordingComplete,
IPC_MESSAGE_ROUTED1(SpeechInputMsg_RecognitionComplete,
int /* request_id */)
-#endif // CHROME_COMMON_SPEECH_INPUT_MESSAGES_H_
diff --git a/chrome/common/unix_domain_socket_posix.cc b/chrome/common/unix_domain_socket_posix.cc
index 31f0135..6bd387b 100644
--- a/chrome/common/unix_domain_socket_posix.cc
+++ b/chrome/common/unix_domain_socket_posix.cc
@@ -127,7 +127,7 @@ ssize_t UnixDomainSocket::SendRecvMsg(int fd,
if (reply_len == -1)
return -1;
- if ((fd_vector.size() > 0 && result_fd == NULL) || fd_vector.size() > 1) {
+ if ((!fd_vector.empty() && result_fd == NULL) || fd_vector.size() > 1) {
for (std::vector<int>::const_iterator
i = fd_vector.begin(); i != fd_vector.end(); ++i) {
close(*i);
@@ -138,13 +138,8 @@ ssize_t UnixDomainSocket::SendRecvMsg(int fd,
return -1;
}
- if (result_fd) {
- if (fd_vector.size() == 0) {
- *result_fd = -1;
- } else {
- *result_fd = fd_vector[0];
- }
- }
+ if (result_fd)
+ *result_fd = fd_vector.empty() ? -1 : fd_vector[0];
return reply_len;
}
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 719ffd4..4609ef7 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -67,7 +67,6 @@ const char kAboutShorthangURL[] = "about:shorthang";
const char kAboutSyncURL[] = "about:sync";
const char kAboutSyncInternalsURL[] = "about:sync-internals";
const char kAboutTermsURL[] = "about:terms";
-const char kAboutVaporwareURL[] = "about:vaporware";
const char kAboutVersionURL[] = "about:version";
// Use an obfuscated URL to make this nondiscoverable, we only want this
@@ -82,8 +81,10 @@ const char kChromeUIBookmarksURL[] = "chrome://bookmarks/";
const char kChromeUIBugReportURL[] = "chrome://bugreport/";
const char kChromeUIConflictsURL[] = "chrome://conflicts/";
const char kChromeUIConstrainedHTMLTestURL[] = "chrome://constrained-test/";
+const char kChromeUICrashesURL[] = "chrome://crashes/";
const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/";
const char kChromeUIDownloadsURL[] = "chrome://downloads/";
+const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/";
const char kChromeUIExtensionsURL[] = "chrome://extensions/";
const char kChromeUIFavIconURL[] = "chrome://favicon/";
const char kChromeUIFlagsURL[] = "chrome://flags/";
@@ -108,15 +109,18 @@ const char kChromeUIMobileSetupURL[] = "chrome://mobilesetup/";
const char kChromeUIRegisterPageURL[] = "chrome://register/";
const char kChromeUISlideshowURL[] = "chrome://slideshow/";
const char kChromeUISystemInfoURL[] = "chrome://system/";
+const char kChromeUIUserImageURL[] = "chrome://userimage/";
#endif
// Keep this list sorted please.
const char kChromeUIBookmarksHost[] = "bookmarks";
const char kChromeUIBugReportHost[] = "bugreport";
const char kChromeUIConflictsHost[] = "conflicts";
+const char kChromeUICrashesHost[] = "crashes";
const char kChromeUIDevToolsHost[] = "devtools";
const char kChromeUIDialogHost[] = "dialog";
const char kChromeUIDownloadsHost[] = "downloads";
+const char kChromeUIExtensionIconHost[] = "extension-icon";
const char kChromeUIExtensionsHost[] = "extensions";
const char kChromeUIFavIconHost[] = "favicon";
const char kChromeUIFlagsHost[] = "flags";
@@ -125,7 +129,6 @@ const char kChromeUIHistoryHost[] = "history";
const char kChromeUIHistory2Host[] = "history2";
const char kChromeUIInspectorHost[] = "inspector";
const char kChromeUIKeyboardHost[] = "keyboard";
-const char kChromeUILoginHost[] = "login";
const char kChromeUINetInternalsHost[] = "net-internals";
const char kChromeUINewTabHost[] = "newtab";
const char kChromeUIPluginsHost[] = "plugins";
@@ -154,6 +157,12 @@ const char kChromeUISystemInfoHost[] = "system";
const char kChromeUIMenu[] = "menu";
const char kChromeUIWrenchMenu[] = "wrench-menu";
const char kChromeUINetworkMenu[] = "network-menu";
+const char kChromeUIUserImageHost[] = "userimage";
+#endif
+
+#if defined(OS_CHROMEOS) && defined(TOUCH_UI)
+const char kChromeUILoginContainerHost[] = "login-container";
+const char kChromeUILoginHost[] = "login";
#endif
const char kUnreachableWebDataURL[] = "chrome://chromewebdata/";
@@ -176,19 +185,18 @@ const char kGpuInternalsURL[] = "chrome://gpu-internals/";
// Option sub pages.
const char kAdvancedOptionsSubPage[] = "advanced";
-const char kAutoFillSubPage[] = "autoFillOptions";
+const char kAutoFillSubPage[] = "autofill";
const char kBrowserOptionsSubPage[] = "browser";
-const char kClearBrowserDataSubPage[] = "clearBrowserDataOverlay";
+const char kClearBrowserDataSubPage[] = "clearBrowserData";
const char kContentSettingsSubPage[] = "content";
const char kContentSettingsExceptionsSubPage[] = "contentExceptions";
const char kDefaultOptionsSubPage[] = "";
-const char kImportDataSubPage[] = "importDataOverlay";
+const char kImportDataSubPage[] = "importData";
const char kPersonalOptionsSubPage[] = "personal";
-const char kSearchEnginesOptionsSubPage[] = "editSearchEngineOverlay";
const char kSearchEnginesSubPage[] = "searchEngines";
#if defined(OS_CHROMEOS)
const char kInternetOptionsSubPage[] = "internet";
-const char kLanguageOptionsSubPage[] = "language";
+const char kLanguageOptionsSubPage[] = "languages";
const char kSystemOptionsSubPage[] = "system";
#endif
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 6bc0165..563be8a 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -61,7 +61,6 @@ extern const char kAboutShorthangURL[];
extern const char kAboutSyncURL[];
extern const char kAboutSyncInternalsURL[];
extern const char kAboutTermsURL[];
-extern const char kAboutVaporwareURL[];
extern const char kAboutVersionURL[];
// chrome: URLs (including schemes). Should be kept in sync with the
@@ -74,8 +73,10 @@ extern const char kChromeUIBookmarksURL[];
extern const char kChromeUIBugReportURL[];
extern const char kChromeUIConflictsURL[];
extern const char kChromeUIConstrainedHTMLTestURL[];
+extern const char kChromeUICrashesURL[];
extern const char kChromeUIDevToolsURL[];
extern const char kChromeUIDownloadsURL[];
+extern const char kChromeUIExtensionIconURL[];
extern const char kChromeUIExtensionsURL[];
extern const char kChromeUIFlagsURL[];
extern const char kChromeUIFavIconURL[];
@@ -100,6 +101,7 @@ extern const char kChromeUIMobileSetupURL[];
extern const char kChromeUIRegisterPageURL[];
extern const char kChromeUISlideshowURL[];
extern const char kChromeUISystemInfoURL[];
+extern const char kChromeUIUserImageURL[];
#endif
// chrome components of URLs. Should be kept in sync with the full URLs
@@ -107,9 +109,11 @@ extern const char kChromeUISystemInfoURL[];
extern const char kChromeUIBookmarksHost[];
extern const char kChromeUIBugReportHost[];
extern const char kChromeUIConflictsHost[];
+extern const char kChromeUICrashesHost[];
extern const char kChromeUIDevToolsHost[];
extern const char kChromeUIDialogHost[];
extern const char kChromeUIDownloadsHost[];
+extern const char kChromeUIExtensionIconHost[];
extern const char kChromeUIExtensionsHost[];
extern const char kChromeUIFavIconHost[];
extern const char kChromeUIFlagsHost[];
@@ -117,7 +121,6 @@ extern const char kChromeUIGpuInternalsHost[];
extern const char kChromeUIHistory2Host[];
extern const char kChromeUIHistoryHost[];
extern const char kChromeUIKeyboardHost[];
-extern const char kChromeUILoginHost[];
extern const char kChromeUINetInternalsHost[];
extern const char kChromeUINewTabHost[];
extern const char kChromeUIPluginsHost[];
@@ -146,6 +149,12 @@ extern const char kChromeUISystemInfoHost[];
extern const char kChromeUIMenu[];
extern const char kChromeUIWrenchMenu[];
extern const char kChromeUINetworkMenu[];
+extern const char kChromeUIUserImageHost[];
+#endif
+
+#if defined(OS_CHROMEOS) && defined(TOUCH_UI)
+extern const char kChromeUILoginContainerHost[];
+extern const char kChromeUILoginHost[];
#endif
// Special URL used to start a navigation to an error page.
@@ -179,10 +188,8 @@ extern const char kBrowserOptionsSubPage[];
extern const char kClearBrowserDataSubPage[];
extern const char kContentSettingsSubPage[];
extern const char kContentSettingsExceptionsSubPage[];
-extern const char kDefaultOptionsSubPage[];
extern const char kImportDataSubPage[];
extern const char kPersonalOptionsSubPage[];
-extern const char kSearchEnginesOptionsSubPage[];
extern const char kSearchEnginesSubPage[];
#if defined(OS_CHROMEOS)
extern const char kInternetOptionsSubPage[];
diff --git a/chrome/common/utility_messages.cc b/chrome/common/utility_messages.cc
deleted file mode 100644
index ee079aa..0000000
--- a/chrome/common/utility_messages.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/file_path.h"
-#include "base/values.h"
-#include "chrome/common/common_param_traits.h"
-#include "chrome/common/indexed_db_key.h"
-#include "chrome/common/serialized_script_value.h"
-
-#define IPC_MESSAGE_IMPL
-#include "chrome/common/utility_messages.h"
diff --git a/chrome/common/utility_messages.h b/chrome/common/utility_messages.h
index 3e298d6..c6382ce 100644
--- a/chrome/common/utility_messages.h
+++ b/chrome/common/utility_messages.h
@@ -2,75 +2,186 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_UTILITY_MESSAGES_H_
-#define CHROME_COMMON_UTILITY_MESSAGES_H_
-#pragma once
+// Multiply-included message file, so no include guard.
#include <string>
+#include <vector>
#include "base/basictypes.h"
+#include "base/file_path.h"
+#include "base/platform_file.h"
+#include "base/values.h"
#include "chrome/common/common_param_traits.h"
#include "chrome/common/extensions/update_manifest.h"
+#include "chrome/common/indexed_db_key.h"
#include "chrome/common/indexed_db_param_traits.h"
+#include "chrome/common/serialized_script_value.h"
+#include "content/common/common_param_traits.h"
+#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
+#include "printing/backend/print_backend.h"
+#include "printing/page_range.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/gfx/rect.h"
-namespace IPC {
+#define IPC_MESSAGE_START UtilityMsgStart
+
+class FilePath;
+class IndexedDBKey;
+class SerializedScriptValue;
+class SkBitmap;
// Traits for UpdateManifest::Result.
-template <>
-struct ParamTraits<UpdateManifest::Result> {
- typedef UpdateManifest::Result param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.extension_id);
- WriteParam(m, p.version);
- WriteParam(m, p.browser_min_version);
- WriteParam(m, p.package_hash);
- WriteParam(m, p.crx_url);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- return ReadParam(m, iter, &p->extension_id) &&
- ReadParam(m, iter, &p->version) &&
- ReadParam(m, iter, &p->browser_min_version) &&
- ReadParam(m, iter, &p->package_hash) &&
- ReadParam(m, iter, &p->crx_url);
- }
- static void Log(const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.extension_id, l);
- l->append(", ");
- LogParam(p.version, l);
- l->append(", ");
- LogParam(p.browser_min_version, l);
- l->append(", ");
- LogParam(p.package_hash, l);
- l->append(", ");
- LogParam(p.crx_url, l);
- l->append(")");
- }
-};
-
-template<>
-struct ParamTraits<UpdateManifest::Results> {
- typedef UpdateManifest::Results param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.list);
- WriteParam(m, p.daystart_elapsed_seconds);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- return ReadParam(m, iter, &p->list) &&
- ReadParam(m, iter, &p->daystart_elapsed_seconds);
- }
- static void Log(const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.list, l);
- l->append(", ");
- LogParam(p.daystart_elapsed_seconds, l);
- l->append(")");
- }
-};
-
-} // namespace IPC
-
-#include "chrome/common/utility_messages_internal.h"
-
-#endif // CHROME_COMMON_UTILITY_MESSAGES_H_
+IPC_STRUCT_TRAITS_BEGIN(UpdateManifest::Result)
+ IPC_STRUCT_TRAITS_MEMBER(extension_id)
+ IPC_STRUCT_TRAITS_MEMBER(version)
+ IPC_STRUCT_TRAITS_MEMBER(browser_min_version)
+ IPC_STRUCT_TRAITS_MEMBER(package_hash)
+ IPC_STRUCT_TRAITS_MEMBER(crx_url)
+IPC_STRUCT_TRAITS_END()
+
+// Traits for UpdateManifest::Results
+IPC_STRUCT_TRAITS_BEGIN(UpdateManifest::Results)
+ IPC_STRUCT_TRAITS_MEMBER(list)
+ IPC_STRUCT_TRAITS_MEMBER(daystart_elapsed_seconds)
+IPC_STRUCT_TRAITS_END()
+
+//------------------------------------------------------------------------------
+// Utility process messages:
+// These are messages from the browser to the utility process.
+// Tell the utility process to unpack the given extension file in its
+// directory and verify that it is valid.
+IPC_MESSAGE_CONTROL1(UtilityMsg_UnpackExtension,
+ FilePath /* extension_filename */)
+
+// Tell the utility process to parse the given JSON data and verify its
+// validity.
+IPC_MESSAGE_CONTROL1(UtilityMsg_UnpackWebResource,
+ std::string /* JSON data */)
+
+// Tell the utility process to parse the given xml document.
+IPC_MESSAGE_CONTROL1(UtilityMsg_ParseUpdateManifest,
+ std::string /* xml document contents */)
+
+// Tell the utility process to decode the given image data.
+IPC_MESSAGE_CONTROL1(UtilityMsg_DecodeImage,
+ std::vector<unsigned char>) // encoded image contents
+
+// Tell the utility process to render the given PDF into a metafile.
+IPC_MESSAGE_CONTROL5(UtilityMsg_RenderPDFPagesToMetafile,
+ base::PlatformFile, // PDF file
+ FilePath, // Location for output metafile
+ gfx::Rect, // Render Area
+ int, // DPI
+ std::vector<printing::PageRange>)
+
+// Tell the utility process to extract the given IDBKeyPath from the
+// SerializedScriptValue vector and reply with the corresponding IDBKeys.
+IPC_MESSAGE_CONTROL3(UtilityMsg_IDBKeysFromValuesAndKeyPath,
+ int, // id
+ std::vector<SerializedScriptValue>,
+ string16) // IDBKeyPath
+
+IPC_MESSAGE_CONTROL3(UtilityMsg_InjectIDBKey,
+ IndexedDBKey /* key */,
+ SerializedScriptValue /* value */,
+ string16 /* key path*/);
+
+// Tells the utility process that it's running in batch mode.
+IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Started)
+
+// Tells the utility process that it can shutdown.
+IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Finished)
+
+// Tells the utility process to get capabilities and defaults for the specified
+// printer. Used on Windows to isolate the service process from printer driver
+// crashes by executing this in a separate process. This does not run in a
+// sandbox.
+IPC_MESSAGE_CONTROL1(UtilityMsg_GetPrinterCapsAndDefaults,
+ std::string /* printer name */)
+
+//------------------------------------------------------------------------------
+// Utility process host messages:
+// These are messages from the utility process to the browser.
+// Reply when the utility process is done unpacking an extension. |manifest|
+// is the parsed manifest.json file.
+// The unpacker should also have written out files containing the decoded
+// images and message catalogs from the extension. See ExtensionUnpacker for
+// details.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackExtension_Succeeded,
+ DictionaryValue /* manifest */)
+
+// Reply when the utility process has failed while unpacking an extension.
+// |error_message| is a user-displayable explanation of what went wrong.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackExtension_Failed,
+ std::string /* error_message, if any */)
+
+// Reply when the utility process is done unpacking and parsing JSON data
+// from a web resource.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackWebResource_Succeeded,
+ DictionaryValue /* json data */)
+
+// Reply when the utility process has failed while unpacking and parsing a
+// web resource. |error_message| is a user-readable explanation of what
+// went wrong.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackWebResource_Failed,
+ std::string /* error_message, if any */)
+
+// Reply when the utility process has succeeded in parsing an update manifest
+// xml document.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseUpdateManifest_Succeeded,
+ UpdateManifest::Results /* updates */)
+
+// Reply when an error occured parsing the update manifest. |error_message|
+// is a description of what went wrong suitable for logging.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseUpdateManifest_Failed,
+ std::string /* error_message, if any */)
+
+// Reply when the utility process has succeeded in decoding the image.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_DecodeImage_Succeeded,
+ SkBitmap) // decoded image
+
+// Reply when an error occured decoding the image.
+IPC_MESSAGE_CONTROL0(UtilityHostMsg_DecodeImage_Failed)
+
+// Reply when the utility process has succeeded in rendering the PDF.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded,
+ int) // Highest rendered page number
+
+// Reply when an error occured rendering the PDF.
+IPC_MESSAGE_CONTROL0(UtilityHostMsg_RenderPDFPagesToMetafile_Failed)
+
+#if defined(OS_WIN)
+// Request that the given font be loaded by the host so it's cached by the
+// OS. Please see ChildProcessHost::PreCacheFont for details.
+IPC_SYNC_MESSAGE_CONTROL1_0(UtilityHostMsg_PreCacheFont,
+ LOGFONT /* font data */)
+#endif // defined(OS_WIN)
+
+// Reply when the utility process has succeeded in obtaining the value for
+// IDBKeyPath.
+IPC_MESSAGE_CONTROL2(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded,
+ int /* id */,
+ std::vector<IndexedDBKey> /* value */)
+
+// Reply when the utility process has failed in obtaining the value for
+// IDBKeyPath.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed,
+ int /* id */)
+
+// Reply when the utility process has finished injecting an IDBKey into
+// a SerializedScriptValue.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_InjectIDBKey_Finished,
+ SerializedScriptValue /* new value */)
+
+// Reply when the utility process has succeeded in obtaining the printer
+// capabilities and defaults.
+IPC_MESSAGE_CONTROL2(UtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded,
+ std::string /* printer name */,
+ printing::PrinterCapsAndDefaults)
+
+// Reply when the utility process has failed to obtain the printer
+// capabilities and defaults.
+IPC_MESSAGE_CONTROL1(UtilityHostMsg_GetPrinterCapsAndDefaults_Failed,
+ std::string /* printer name */)
+
diff --git a/chrome/common/utility_messages_internal.h b/chrome/common/utility_messages_internal.h
deleted file mode 100644
index 11e07f2..0000000
--- a/chrome/common/utility_messages_internal.h
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <string>
-#include <vector>
-
-#include "base/platform_file.h"
-#include "ipc/ipc_message_macros.h"
-#include "printing/backend/print_backend.h"
-#include "printing/page_range.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/rect.h"
-
-#define IPC_MESSAGE_START UtilityMsgStart
-
-class FilePath;
-class IndexedDBKey;
-class SerializedScriptValue;
-class SkBitmap;
-
-//------------------------------------------------------------------------------
-// Utility process messages:
-// These are messages from the browser to the utility process.
-// Tell the utility process to unpack the given extension file in its
-// directory and verify that it is valid.
-IPC_MESSAGE_CONTROL1(UtilityMsg_UnpackExtension,
- FilePath /* extension_filename */)
-
-// Tell the utility process to parse the given JSON data and verify its
-// validity.
-IPC_MESSAGE_CONTROL1(UtilityMsg_UnpackWebResource,
- std::string /* JSON data */)
-
-// Tell the utility process to parse the given xml document.
-IPC_MESSAGE_CONTROL1(UtilityMsg_ParseUpdateManifest,
- std::string /* xml document contents */)
-
-// Tell the utility process to decode the given image data.
-IPC_MESSAGE_CONTROL1(UtilityMsg_DecodeImage,
- std::vector<unsigned char>) // encoded image contents
-
-// Tell the utility process to render the given PDF into a metafile.
-IPC_MESSAGE_CONTROL5(UtilityMsg_RenderPDFPagesToMetafile,
- base::PlatformFile, // PDF file
- FilePath, // Location for output metafile
- gfx::Rect, // Render Area
- int, // DPI
- std::vector<printing::PageRange>)
-
-// Tell the utility process to extract the given IDBKeyPath from the
-// SerializedScriptValue vector and reply with the corresponding IDBKeys.
-IPC_MESSAGE_CONTROL3(UtilityMsg_IDBKeysFromValuesAndKeyPath,
- int, // id
- std::vector<SerializedScriptValue>,
- string16) // IDBKeyPath
-
-// Tells the utility process that it's running in batch mode.
-IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Started)
-
-// Tells the utility process that it can shutdown.
-IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Finished)
-
-// Tells the utility process to get capabilities and defaults for the specified
-// printer. Used on Windows to isolate the service process from printer driver
-// crashes by executing this in a separate process. This does not run in a
-// sandbox.
-IPC_MESSAGE_CONTROL1(UtilityMsg_GetPrinterCapsAndDefaults,
- std::string /* printer name */)
-
-//------------------------------------------------------------------------------
-// Utility process host messages:
-// These are messages from the utility process to the browser.
-// Reply when the utility process is done unpacking an extension. |manifest|
-// is the parsed manifest.json file.
-// The unpacker should also have written out files containing the decoded
-// images and message catalogs from the extension. See ExtensionUnpacker for
-// details.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackExtension_Succeeded,
- DictionaryValue /* manifest */)
-
-// Reply when the utility process has failed while unpacking an extension.
-// |error_message| is a user-displayable explanation of what went wrong.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackExtension_Failed,
- std::string /* error_message, if any */)
-
-// Reply when the utility process is done unpacking and parsing JSON data
-// from a web resource.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackWebResource_Succeeded,
- DictionaryValue /* json data */)
-
-// Reply when the utility process has failed while unpacking and parsing a
-// web resource. |error_message| is a user-readable explanation of what
-// went wrong.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackWebResource_Failed,
- std::string /* error_message, if any */)
-
-// Reply when the utility process has succeeded in parsing an update manifest
-// xml document.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseUpdateManifest_Succeeded,
- UpdateManifest::Results /* updates */)
-
-// Reply when an error occured parsing the update manifest. |error_message|
-// is a description of what went wrong suitable for logging.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseUpdateManifest_Failed,
- std::string /* error_message, if any */)
-
-// Reply when the utility process has succeeded in decoding the image.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_DecodeImage_Succeeded,
- SkBitmap) // decoded image
-
-// Reply when an error occured decoding the image.
-IPC_MESSAGE_CONTROL0(UtilityHostMsg_DecodeImage_Failed)
-
-// Reply when the utility process has succeeded in rendering the PDF.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded,
- int) // Highest rendered page number
-
-// Reply when an error occured rendering the PDF.
-IPC_MESSAGE_CONTROL0(UtilityHostMsg_RenderPDFPagesToMetafile_Failed)
-
-#if defined(OS_WIN)
-// Request that the given font be loaded by the host so it's cached by the
-// OS. Please see ChildProcessHost::PreCacheFont for details.
-IPC_SYNC_MESSAGE_CONTROL1_0(UtilityHostMsg_PreCacheFont,
- LOGFONT /* font data */)
-#endif // defined(OS_WIN)
-
-// Reply when the utility process has succeeded in obtaining the value for
-// IDBKeyPath.
-IPC_MESSAGE_CONTROL2(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded,
- int /* id */,
- std::vector<IndexedDBKey> /* value */)
-
-// Reply when the utility process has failed in obtaining the value for
-// IDBKeyPath.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed,
- int /* id */)
-
-// Reply when the utility process has succeeded in obtaining the printer
-// capabilities and defaults.
-IPC_MESSAGE_CONTROL2(UtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded,
- std::string /* printer name */,
- printing::PrinterCapsAndDefaults)
-
-// Reply when the utility process has failed to obtain the printer
-// capabilities and defaults.
-IPC_MESSAGE_CONTROL1(UtilityHostMsg_GetPrinterCapsAndDefaults_Failed,
- std::string /* printer name */)
-
diff --git a/chrome/common/web_apps_unittest.cc b/chrome/common/web_apps_unittest.cc
index fc8b121..de332ac 100644
--- a/chrome/common/web_apps_unittest.cc
+++ b/chrome/common/web_apps_unittest.cc
@@ -178,7 +178,7 @@ TEST(WebAppInfo, ParseIconSizes) {
if (result) {
ASSERT_EQ(data[i].is_any, is_any);
ASSERT_EQ(data[i].expected_size_count, sizes.size());
- if (sizes.size() > 0) {
+ if (!sizes.empty()) {
ASSERT_EQ(data[i].width1, sizes[0].width());
ASSERT_EQ(data[i].height1, sizes[0].height());
}
diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc
index 12c885a..294ef5c 100644
--- a/chrome/common/webkit_param_traits.cc
+++ b/chrome/common/webkit_param_traits.cc
@@ -175,4 +175,45 @@ void ParamTraits<WebKit::WebCompositionUnderline>::Log(const param_type& p,
l->append(")");
}
+void ParamTraits<WebKit::WebTextCheckingResult>::Write(Message* m,
+ const param_type& p) {
+ WriteParam(m, static_cast<int>(p.error()));
+ WriteParam(m, p.position());
+ WriteParam(m, p.length());
+}
+
+bool ParamTraits<WebKit::WebTextCheckingResult>::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ int error = 0;
+ if (!ReadParam(m, iter, &error))
+ return false;
+ if (error != WebKit::WebTextCheckingResult::ErrorSpelling &&
+ error != WebKit::WebTextCheckingResult::ErrorGrammar)
+ return false;
+ int position = 0;
+ if (!ReadParam(m, iter, &position))
+ return false;
+ int length = 0;
+ if (!ReadParam(m, iter, &length))
+ return false;
+
+ *p = WebKit::WebTextCheckingResult(
+ static_cast<WebKit::WebTextCheckingResult::Error>(error),
+ position,
+ length);
+ return true;
+}
+
+void ParamTraits<WebKit::WebTextCheckingResult>::Log(const param_type& p,
+ std::string* l) {
+ l->append("(");
+ LogParam(static_cast<int>(p.error()), l);
+ l->append(", ");
+ LogParam(p.position(), l);
+ l->append(", ");
+ LogParam(p.length(), l);
+ l->append(")");
+}
+
} // namespace IPC
diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h
index 8d540c9..11a3aac 100644
--- a/chrome/common/webkit_param_traits.h
+++ b/chrome/common/webkit_param_traits.h
@@ -32,6 +32,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCheckingResult.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
@@ -273,6 +274,14 @@ struct SimilarTypeTraits<WebKit::WebFileError> {
typedef int Type;
};
+template <>
+struct ParamTraits<WebKit::WebTextCheckingResult> {
+ typedef WebKit::WebTextCheckingResult param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
} // namespace IPC
#endif // CHROME_COMMON_WEBKIT_PARAM_TRAITS_H_
diff --git a/chrome/common/webmessageportchannel_impl.cc b/chrome/common/webmessageportchannel_impl.cc
index 5326983..1fbed44 100644
--- a/chrome/common/webmessageportchannel_impl.cc
+++ b/chrome/common/webmessageportchannel_impl.cc
@@ -4,9 +4,9 @@
#include "chrome/common/webmessageportchannel_impl.h"
-#include "chrome/common/child_process.h"
-#include "chrome/common/child_thread.h"
#include "chrome/common/worker_messages.h"
+#include "content/common/child_process.h"
+#include "content/common/child_thread.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannelClient.h"
diff --git a/chrome/common/win_safe_util.cc b/chrome/common/win_safe_util.cc
index 37cb0a7..693ce35 100644
--- a/chrome/common/win_safe_util.cc
+++ b/chrome/common/win_safe_util.cc
@@ -92,14 +92,16 @@ bool SetInternetZoneIdentifier(const FilePath& full_path) {
if (INVALID_HANDLE_VALUE == file)
return false;
- const char kIdentifier[] = "[ZoneTransfer]\nZoneId=3";
+ static const char kIdentifier[] = "[ZoneTransfer]\nZoneId=3";
+ // Don't include trailing null in data written.
+ static const DWORD kIdentifierSize = arraysize(kIdentifier) - 1;
DWORD written = 0;
- BOOL result = WriteFile(file, kIdentifier, arraysize(kIdentifier), &written,
+ BOOL result = WriteFile(file, kIdentifier, kIdentifierSize, &written,
NULL);
BOOL flush_result = FlushFileBuffers(file);
CloseHandle(file);
- if (!result || !flush_result || written != arraysize(kIdentifier)) {
+ if (!result || !flush_result || written != kIdentifierSize) {
NOTREACHED();
return false;
}
diff --git a/chrome/common/worker_messages.cc b/chrome/common/worker_messages.cc
deleted file mode 100644
index 19b8d23..0000000
--- a/chrome/common/worker_messages.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/common_param_traits.h"
-
-#define IPC_MESSAGE_IMPL
-#include "chrome/common/worker_messages.h"
-
-WorkerHostMsg_PostConsoleMessageToWorkerObject_Params::
-WorkerHostMsg_PostConsoleMessageToWorkerObject_Params()
- : source_identifier(-1),
- message_type(-1),
- message_level(-1),
- line_number(-1) {
-}
-
-WorkerHostMsg_PostConsoleMessageToWorkerObject_Params::
-~WorkerHostMsg_PostConsoleMessageToWorkerObject_Params() {
-}
-
-WorkerProcessMsg_CreateWorker_Params::WorkerProcessMsg_CreateWorker_Params()
- : is_shared(false),
- route_id(-1),
- creator_process_id(-1),
- creator_appcache_host_id(-1),
- shared_worker_appcache_id(-1) {
-}
-
-WorkerProcessMsg_CreateWorker_Params::~WorkerProcessMsg_CreateWorker_Params() {
-}
-
-
-namespace IPC {
-
-void ParamTraits<WorkerHostMsg_PostConsoleMessageToWorkerObject_Params>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.source_identifier);
- WriteParam(m, p.message_type);
- WriteParam(m, p.message_level);
- WriteParam(m, p.message);
- WriteParam(m, p.line_number);
- WriteParam(m, p.source_url);
-}
-
-bool ParamTraits<WorkerHostMsg_PostConsoleMessageToWorkerObject_Params>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->source_identifier) &&
- ReadParam(m, iter, &p->message_type) &&
- ReadParam(m, iter, &p->message_level) &&
- ReadParam(m, iter, &p->message) &&
- ReadParam(m, iter, &p->line_number) &&
- ReadParam(m, iter, &p->source_url);
-}
-
-void ParamTraits<WorkerHostMsg_PostConsoleMessageToWorkerObject_Params>::Log(
- const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.source_identifier, l);
- l->append(", ");
- LogParam(p.message_type, l);
- l->append(", ");
- LogParam(p.message_level, l);
- l->append(", ");
- LogParam(p.message, l);
- l->append(", ");
- LogParam(p.line_number, l);
- l->append(", ");
- LogParam(p.source_url, l);
- l->append(")");
-}
-
-void ParamTraits<WorkerProcessMsg_CreateWorker_Params>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.url);
- WriteParam(m, p.is_shared);
- WriteParam(m, p.name);
- WriteParam(m, p.route_id);
- WriteParam(m, p.creator_process_id);
- WriteParam(m, p.creator_appcache_host_id);
- WriteParam(m, p.shared_worker_appcache_id);
-}
-
-bool ParamTraits<WorkerProcessMsg_CreateWorker_Params>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->is_shared) &&
- ReadParam(m, iter, &p->name) &&
- ReadParam(m, iter, &p->route_id) &&
- ReadParam(m, iter, &p->creator_process_id) &&
- ReadParam(m, iter, &p->creator_appcache_host_id) &&
- ReadParam(m, iter, &p->shared_worker_appcache_id);
-}
-
-void ParamTraits<WorkerProcessMsg_CreateWorker_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.url, l);
- l->append(", ");
- LogParam(p.is_shared, l);
- l->append(", ");
- LogParam(p.name, l);
- l->append(", ");
- LogParam(p.route_id, l);
- l->append(", ");
- LogParam(p.creator_process_id, l);
- l->append(", ");
- LogParam(p.creator_appcache_host_id, l);
- l->append(", ");
- LogParam(p.shared_worker_appcache_id, l);
- l->append(")");
-}
-
-} // namespace IPC
diff --git a/chrome/common/worker_messages.h b/chrome/common/worker_messages.h
index 28fec62..ba33a20 100644
--- a/chrome/common/worker_messages.h
+++ b/chrome/common/worker_messages.h
@@ -5,72 +5,163 @@
// Defines messages between the browser and worker process, as well as between
// the renderer and worker process.
-#ifndef CHROME_COMMON_WORKER_MESSAGES_H_
-#define CHROME_COMMON_WORKER_MESSAGES_H_
-#pragma once
+// Multiply-included message file, hence no include guard.
#include <string>
+#include <utility>
#include <vector>
#include "base/basictypes.h"
+#include "base/string16.h"
#include "googleurl/src/gurl.h"
+#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
typedef std::pair<string16, std::vector<int> > QueuedMessage;
+#define IPC_MESSAGE_START WorkerMsgStart
+
// Parameters structure for WorkerHostMsg_PostConsoleMessageToWorkerObject,
// which has too many data parameters to be reasonably put in a predefined
// IPC message. The data members directly correspond to parameters of
// WebWorkerClient::postConsoleMessageToWorkerObject()
-struct WorkerHostMsg_PostConsoleMessageToWorkerObject_Params {
- WorkerHostMsg_PostConsoleMessageToWorkerObject_Params();
- ~WorkerHostMsg_PostConsoleMessageToWorkerObject_Params();
-
- int source_identifier;
- int message_type;
- int message_level;
- string16 message;
- int line_number;
- string16 source_url;
-};
+IPC_STRUCT_BEGIN(WorkerHostMsg_PostConsoleMessageToWorkerObject_Params)
+ IPC_STRUCT_MEMBER(int, source_identifier)
+ IPC_STRUCT_MEMBER(int, message_type)
+ IPC_STRUCT_MEMBER(int, message_level)
+ IPC_STRUCT_MEMBER(string16, message)
+ IPC_STRUCT_MEMBER(int, line_number)
+ IPC_STRUCT_MEMBER(string16, source_url)
+IPC_STRUCT_END()
// Parameter structure for WorkerProcessMsg_CreateWorker.
-struct WorkerProcessMsg_CreateWorker_Params {
- WorkerProcessMsg_CreateWorker_Params();
- ~WorkerProcessMsg_CreateWorker_Params();
-
- GURL url;
- bool is_shared;
- string16 name;
- int route_id;
- int creator_process_id;
- int creator_appcache_host_id; // Only valid for dedicated workers.
- int64 shared_worker_appcache_id; // Only valid for shared workers.
-};
-
-namespace IPC {
-
-// Traits for WorkerHostMsg_PostConsoleMessageToWorkerObject_Params structure
-// to pack/unpack.
-template <>
-struct ParamTraits<WorkerHostMsg_PostConsoleMessageToWorkerObject_Params> {
- typedef WorkerHostMsg_PostConsoleMessageToWorkerObject_Params param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-// Traits for WorkerProcessMsg_CreateWorker_Params.
-template <>
-struct ParamTraits<WorkerProcessMsg_CreateWorker_Params> {
- typedef WorkerProcessMsg_CreateWorker_Params param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::string* l);
-};
-
-} // namespace IPC
-
-#include "chrome/common/worker_messages_internal.h"
-
-#endif // CHROME_COMMON_WORKER_MESSAGES_H_
+IPC_STRUCT_BEGIN(WorkerProcessMsg_CreateWorker_Params)
+ IPC_STRUCT_MEMBER(GURL, url)
+ IPC_STRUCT_MEMBER(bool, is_shared)
+ IPC_STRUCT_MEMBER(string16, name)
+ IPC_STRUCT_MEMBER(int, route_id)
+ IPC_STRUCT_MEMBER(int, creator_process_id)
+ // Only valid for dedicated workers.
+ IPC_STRUCT_MEMBER(int, creator_appcache_host_id)
+ // Only valid for shared workers.
+ IPC_STRUCT_MEMBER(int64, shared_worker_appcache_id)
+IPC_STRUCT_END()
+
+//-----------------------------------------------------------------------------
+// WorkerProcess messages
+// These are messages sent from the browser to the worker process.
+IPC_MESSAGE_CONTROL1(WorkerProcessMsg_CreateWorker,
+ WorkerProcessMsg_CreateWorker_Params)
+
+// Note: these Message Port related messages can also be sent to the
+// renderer process. Putting them here since we don't have a shared place
+// like common_messages_internal.h
+IPC_MESSAGE_ROUTED3(WorkerProcessMsg_Message,
+ string16 /* message */,
+ std::vector<int> /* sent_message_port_ids */,
+ std::vector<int> /* new_routing_ids */)
+
+// Tells the Message Port Channel object that there are no more in-flight
+// messages arriving.
+IPC_MESSAGE_ROUTED0(WorkerProcessMsg_MessagesQueued)
+
+
+//-----------------------------------------------------------------------------
+// WorkerProcessHost messages
+// These are messages sent from the worker process to the browser process.
+
+// Note: these Message Port related messages can also be sent out from the
+// renderer process. Putting them here since we don't have a shared place
+// like common_messages_internal.h
+
+// Creates a new Message Port Channel object. The first paramaeter is the
+// message port channel's routing id in this process. The second parameter
+// is the process-wide-unique identifier for that port.
+IPC_SYNC_MESSAGE_CONTROL0_2(WorkerProcessHostMsg_CreateMessagePort,
+ int /* route_id */,
+ int /* message_port_id */)
+
+// Sent when a Message Port Channel object is destroyed.
+IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_DestroyMessagePort,
+ int /* message_port_id */)
+
+// Sends a message to a message port. Optionally sends a message port as
+// as well if sent_message_port_id != MSG_ROUTING_NONE.
+IPC_MESSAGE_CONTROL3(WorkerProcessHostMsg_PostMessage,
+ int /* sender_message_port_id */,
+ string16 /* message */,
+ std::vector<int> /* sent_message_port_ids */)
+
+// Causes messages sent to the remote port to be delivered to this local port.
+IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_Entangle,
+ int /* local_message_port_id */,
+ int /* remote_message_port_id */)
+
+// Causes the browser to queue messages sent to this port until the the port
+// has made sure that all in-flight messages were routed to the new
+// destination.
+IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_QueueMessages,
+ int /* message_port_id */)
+
+// Sends the browser all the queued messages that arrived at this message port
+// after it was sent in a postMessage call.
+// NOTE: MSVS can't compile the macro if std::vector<std::pair<string16, int> >
+// is used, so we typedef it in worker_messages.h.
+IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_SendQueuedMessages,
+ int /* message_port_id */,
+ std::vector<QueuedMessage> /* queued_messages */)
+
+// Sent by the worker process to check whether access to web databases is
+// granted by content settings.
+IPC_SYNC_MESSAGE_CONTROL5_1(WorkerProcessHostMsg_AllowDatabase,
+ int /* worker_route_id */,
+ GURL /* origin url */,
+ string16 /* database name */,
+ string16 /* database display name */,
+ unsigned long /* estimated size */,
+ bool /* result */)
+
+//-----------------------------------------------------------------------------
+// Worker messages
+// These are messages sent from the renderer process to the worker process.
+IPC_MESSAGE_ROUTED3(WorkerMsg_StartWorkerContext,
+ GURL /* url */,
+ string16 /* user_agent */,
+ string16 /* source_code */)
+
+IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext)
+
+IPC_MESSAGE_ROUTED3(WorkerMsg_PostMessage,
+ string16 /* message */,
+ std::vector<int> /* sent_message_port_ids */,
+ std::vector<int> /* new_routing_ids */)
+
+IPC_MESSAGE_ROUTED2(WorkerMsg_Connect,
+ int /* sent_message_port_id */,
+ int /* routing_id */)
+
+IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed)
+
+
+//-----------------------------------------------------------------------------
+// WorkerHost messages
+// These are messages sent from the worker process to the renderer process.
+// WorkerMsg_PostMessage is also sent here.
+IPC_MESSAGE_ROUTED3(WorkerHostMsg_PostExceptionToWorkerObject,
+ string16 /* error_message */,
+ int /* line_number */,
+ string16 /* source_url*/)
+
+IPC_MESSAGE_ROUTED1(WorkerHostMsg_PostConsoleMessageToWorkerObject,
+ WorkerHostMsg_PostConsoleMessageToWorkerObject_Params)
+
+IPC_MESSAGE_ROUTED1(WorkerHostMsg_ConfirmMessageFromWorkerObject,
+ bool /* bool has_pending_activity */)
+
+IPC_MESSAGE_ROUTED1(WorkerHostMsg_ReportPendingActivity,
+ bool /* bool has_pending_activity */)
+
+IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed,
+ int /* worker_route_id */)
+IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed)
+
diff --git a/chrome/common/worker_messages_internal.h b/chrome/common/worker_messages_internal.h
deleted file mode 100644
index e661f67..0000000
--- a/chrome/common/worker_messages_internal.h
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <utility>
-#include <vector>
-#include "base/string16.h"
-#include "googleurl/src/gurl.h"
-#include "ipc/ipc_message_macros.h"
-
-#define IPC_MESSAGE_START WorkerMsgStart
-
-//-----------------------------------------------------------------------------
-// WorkerProcess messages
-// These are messages sent from the browser to the worker process.
-IPC_MESSAGE_CONTROL1(WorkerProcessMsg_CreateWorker,
- WorkerProcessMsg_CreateWorker_Params)
-
-// Note: these Message Port related messages can also be sent to the
-// renderer process. Putting them here since we don't have a shared place
-// like common_messages_internal.h
-IPC_MESSAGE_ROUTED3(WorkerProcessMsg_Message,
- string16 /* message */,
- std::vector<int> /* sent_message_port_ids */,
- std::vector<int> /* new_routing_ids */)
-
-// Tells the Message Port Channel object that there are no more in-flight
-// messages arriving.
-IPC_MESSAGE_ROUTED0(WorkerProcessMsg_MessagesQueued)
-
-
-//-----------------------------------------------------------------------------
-// WorkerProcessHost messages
-// These are messages sent from the worker process to the browser process.
-
-// Note: these Message Port related messages can also be sent out from the
-// renderer process. Putting them here since we don't have a shared place
-// like common_messages_internal.h
-
-// Creates a new Message Port Channel object. The first paramaeter is the
-// message port channel's routing id in this process. The second parameter
-// is the process-wide-unique identifier for that port.
-IPC_SYNC_MESSAGE_CONTROL0_2(WorkerProcessHostMsg_CreateMessagePort,
- int /* route_id */,
- int /* message_port_id */)
-
-// Sent when a Message Port Channel object is destroyed.
-IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_DestroyMessagePort,
- int /* message_port_id */)
-
-// Sends a message to a message port. Optionally sends a message port as
-// as well if sent_message_port_id != MSG_ROUTING_NONE.
-IPC_MESSAGE_CONTROL3(WorkerProcessHostMsg_PostMessage,
- int /* sender_message_port_id */,
- string16 /* message */,
- std::vector<int> /* sent_message_port_ids */)
-
-// Causes messages sent to the remote port to be delivered to this local port.
-IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_Entangle,
- int /* local_message_port_id */,
- int /* remote_message_port_id */)
-
-// Causes the browser to queue messages sent to this port until the the port
-// has made sure that all in-flight messages were routed to the new
-// destination.
-IPC_MESSAGE_CONTROL1(WorkerProcessHostMsg_QueueMessages,
- int /* message_port_id */)
-
-// Sends the browser all the queued messages that arrived at this message port
-// after it was sent in a postMessage call.
-// NOTE: MSVS can't compile the macro if std::vector<std::pair<string16, int> >
-// is used, so we typedef it in worker_messages.h.
-IPC_MESSAGE_CONTROL2(WorkerProcessHostMsg_SendQueuedMessages,
- int /* message_port_id */,
- std::vector<QueuedMessage> /* queued_messages */)
-
-// Sent by the worker process to check whether access to web databases is
-// granted by content settings.
-IPC_SYNC_MESSAGE_CONTROL5_1(WorkerProcessHostMsg_AllowDatabase,
- int /* worker_route_id */,
- GURL /* origin url */,
- string16 /* database name */,
- string16 /* database display name */,
- unsigned long /* estimated size */,
- bool /* result */)
-
-//-----------------------------------------------------------------------------
-// Worker messages
-// These are messages sent from the renderer process to the worker process.
-IPC_MESSAGE_ROUTED3(WorkerMsg_StartWorkerContext,
- GURL /* url */,
- string16 /* user_agent */,
- string16 /* source_code */)
-
-IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext)
-
-IPC_MESSAGE_ROUTED3(WorkerMsg_PostMessage,
- string16 /* message */,
- std::vector<int> /* sent_message_port_ids */,
- std::vector<int> /* new_routing_ids */)
-
-IPC_MESSAGE_ROUTED2(WorkerMsg_Connect,
- int /* sent_message_port_id */,
- int /* routing_id */)
-
-IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed)
-
-
-//-----------------------------------------------------------------------------
-// WorkerHost messages
-// These are messages sent from the worker process to the renderer process.
-// WorkerMsg_PostMessage is also sent here.
-IPC_MESSAGE_ROUTED3(WorkerHostMsg_PostExceptionToWorkerObject,
- string16 /* error_message */,
- int /* line_number */,
- string16 /* source_url*/)
-
-IPC_MESSAGE_ROUTED1(WorkerHostMsg_PostConsoleMessageToWorkerObject,
- WorkerHostMsg_PostConsoleMessageToWorkerObject_Params)
-
-IPC_MESSAGE_ROUTED1(WorkerHostMsg_ConfirmMessageFromWorkerObject,
- bool /* bool has_pending_activity */)
-
-IPC_MESSAGE_ROUTED1(WorkerHostMsg_ReportPendingActivity,
- bool /* bool has_pending_activity */)
-
-IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed,
- int /* worker_route_id */)
-IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed)
diff --git a/chrome/common/zip_unittest.cc b/chrome/common/zip_unittest.cc
index afb50c0..d7c73c5 100644
--- a/chrome/common/zip_unittest.cc
+++ b/chrome/common/zip_unittest.cc
@@ -71,7 +71,7 @@ class ZipTest : public PlatformTest {
size_t expected_count = 0;
for (std::set<FilePath>::iterator iter = zip_contents_.begin();
iter != zip_contents_.end(); ++iter) {
- if (expect_hidden_files || iter->BaseName().ToWStringHack()[0] != L'.')
+ if (expect_hidden_files || iter->BaseName().value()[0] != '.')
++expected_count;
}