Import Chromium sources r15462 chromium-import-latest chromium-import-r15462
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 29 Jun 2009 08:35:58 -0400
changeset 35729 6fd4bb500d42
parent 35728 84b7c31ce666
child 35730 6a880cbebe9a
push idunknown
push userunknown
push dateunknown
milestone1.9.2a1pre
Import Chromium sources r15462
ipc/chromium/src/base/DEPS
ipc/chromium/src/base/at_exit.cc
ipc/chromium/src/base/at_exit.h
ipc/chromium/src/base/at_exit_unittest.cc
ipc/chromium/src/base/atomic_ref_count.h
ipc/chromium/src/base/atomic_sequence_num.h
ipc/chromium/src/base/atomicops.h
ipc/chromium/src/base/atomicops_internals_arm_gcc.h
ipc/chromium/src/base/atomicops_internals_x86_gcc.cc
ipc/chromium/src/base/atomicops_internals_x86_gcc.h
ipc/chromium/src/base/atomicops_internals_x86_macosx.h
ipc/chromium/src/base/atomicops_internals_x86_msvc.h
ipc/chromium/src/base/atomicops_unittest.cc
ipc/chromium/src/base/base.gyp
ipc/chromium/src/base/base_drag_source.cc
ipc/chromium/src/base/base_drag_source.h
ipc/chromium/src/base/base_drop_target.cc
ipc/chromium/src/base/base_drop_target.h
ipc/chromium/src/base/base_paths.cc
ipc/chromium/src/base/base_paths.h
ipc/chromium/src/base/base_paths_linux.cc
ipc/chromium/src/base/base_paths_linux.h
ipc/chromium/src/base/base_paths_mac.h
ipc/chromium/src/base/base_paths_mac.mm
ipc/chromium/src/base/base_paths_win.cc
ipc/chromium/src/base/base_paths_win.h
ipc/chromium/src/base/base_switches.cc
ipc/chromium/src/base/base_switches.h
ipc/chromium/src/base/basictypes.h
ipc/chromium/src/base/build/base.vsprops
ipc/chromium/src/base/build/base_gfx.vsprops
ipc/chromium/src/base/build/base_unittests.vsprops
ipc/chromium/src/base/bzip2_error_handler.cc
ipc/chromium/src/base/clipboard.cc
ipc/chromium/src/base/clipboard.h
ipc/chromium/src/base/clipboard_linux.cc
ipc/chromium/src/base/clipboard_mac.mm
ipc/chromium/src/base/clipboard_unittest.cc
ipc/chromium/src/base/clipboard_util.cc
ipc/chromium/src/base/clipboard_util.h
ipc/chromium/src/base/clipboard_win.cc
ipc/chromium/src/base/command_line.cc
ipc/chromium/src/base/command_line.h
ipc/chromium/src/base/command_line_unittest.cc
ipc/chromium/src/base/compiler_specific.h
ipc/chromium/src/base/condition_variable.h
ipc/chromium/src/base/condition_variable_posix.cc
ipc/chromium/src/base/condition_variable_unittest.cc
ipc/chromium/src/base/condition_variable_win.cc
ipc/chromium/src/base/cpu.cc
ipc/chromium/src/base/cpu.h
ipc/chromium/src/base/crypto/cssm_init.cc
ipc/chromium/src/base/crypto/cssm_init.h
ipc/chromium/src/base/crypto/signature_verifier.h
ipc/chromium/src/base/crypto/signature_verifier_mac.cc
ipc/chromium/src/base/crypto/signature_verifier_nss.cc
ipc/chromium/src/base/crypto/signature_verifier_unittest.cc
ipc/chromium/src/base/crypto/signature_verifier_win.cc
ipc/chromium/src/base/data/data_pack_unittest/sample.pak
ipc/chromium/src/base/data/file_util_unittest/binary_file.bin
ipc/chromium/src/base/data/file_util_unittest/binary_file_diff.bin
ipc/chromium/src/base/data/file_util_unittest/binary_file_same.bin
ipc/chromium/src/base/data/file_util_unittest/different.txt
ipc/chromium/src/base/data/file_util_unittest/different_first.txt
ipc/chromium/src/base/data/file_util_unittest/different_last.txt
ipc/chromium/src/base/data/file_util_unittest/empty1.txt
ipc/chromium/src/base/data/file_util_unittest/empty2.txt
ipc/chromium/src/base/data/file_util_unittest/original.txt
ipc/chromium/src/base/data/file_util_unittest/same.txt
ipc/chromium/src/base/data/file_util_unittest/same_length.txt
ipc/chromium/src/base/data/file_util_unittest/shortened.txt
ipc/chromium/src/base/data/file_version_info_unittest/FileVersionInfoTest1.dll
ipc/chromium/src/base/data/file_version_info_unittest/FileVersionInfoTest2.dll
ipc/chromium/src/base/data/purify/base_unittests.exe.gtest.txt
ipc/chromium/src/base/data/purify/base_unittests.exe_MLK.txt
ipc/chromium/src/base/data/purify/base_unittests.exe_MLK_flakey.txt
ipc/chromium/src/base/data/purify/base_unittests.exe_MLK_ignore.txt
ipc/chromium/src/base/data/purify/base_unittests.exe_PAR_ignore.txt
ipc/chromium/src/base/data/purify/base_unittests.exe_UMR.txt
ipc/chromium/src/base/data/valgrind/base_unittests.gtest.txt
ipc/chromium/src/base/data_pack.cc
ipc/chromium/src/base/data_pack.h
ipc/chromium/src/base/data_pack_unittest.cc
ipc/chromium/src/base/debug_message.cc
ipc/chromium/src/base/debug_on_start.cc
ipc/chromium/src/base/debug_on_start.h
ipc/chromium/src/base/debug_util.cc
ipc/chromium/src/base/debug_util.h
ipc/chromium/src/base/debug_util_mac.cc
ipc/chromium/src/base/debug_util_posix.cc
ipc/chromium/src/base/debug_util_unittest.cc
ipc/chromium/src/base/debug_util_win.cc
ipc/chromium/src/base/directory_watcher.h
ipc/chromium/src/base/directory_watcher_inotify.cc
ipc/chromium/src/base/directory_watcher_mac.cc
ipc/chromium/src/base/directory_watcher_stub.cc
ipc/chromium/src/base/directory_watcher_unittest.cc
ipc/chromium/src/base/directory_watcher_win.cc
ipc/chromium/src/base/eintr_wrapper.h
ipc/chromium/src/base/event_recorder.cc
ipc/chromium/src/base/event_recorder.h
ipc/chromium/src/base/event_recorder_stubs.cc
ipc/chromium/src/base/field_trial.cc
ipc/chromium/src/base/field_trial.h
ipc/chromium/src/base/field_trial_unittest.cc
ipc/chromium/src/base/file_descriptor_posix.h
ipc/chromium/src/base/file_descriptor_shuffle.cc
ipc/chromium/src/base/file_descriptor_shuffle.h
ipc/chromium/src/base/file_descriptor_shuffle_unittest.cc
ipc/chromium/src/base/file_path.cc
ipc/chromium/src/base/file_path.h
ipc/chromium/src/base/file_path_unittest.cc
ipc/chromium/src/base/file_util.cc
ipc/chromium/src/base/file_util.h
ipc/chromium/src/base/file_util_icu.cc
ipc/chromium/src/base/file_util_linux.cc
ipc/chromium/src/base/file_util_mac.mm
ipc/chromium/src/base/file_util_posix.cc
ipc/chromium/src/base/file_util_unittest.cc
ipc/chromium/src/base/file_util_win.cc
ipc/chromium/src/base/file_version_info.cc
ipc/chromium/src/base/file_version_info.h
ipc/chromium/src/base/file_version_info_linux.cc
ipc/chromium/src/base/file_version_info_linux.h.version
ipc/chromium/src/base/file_version_info_mac.mm
ipc/chromium/src/base/file_version_info_unittest.cc
ipc/chromium/src/base/fix_wp64.h
ipc/chromium/src/base/float_util.h
ipc/chromium/src/base/foundation_utils_mac.h
ipc/chromium/src/base/gfx/DEPS
ipc/chromium/src/base/gfx/gdi_util.cc
ipc/chromium/src/base/gfx/gdi_util.h
ipc/chromium/src/base/gfx/gtk_native_view_id_manager.cc
ipc/chromium/src/base/gfx/gtk_native_view_id_manager.h
ipc/chromium/src/base/gfx/gtk_util.cc
ipc/chromium/src/base/gfx/gtk_util.h
ipc/chromium/src/base/gfx/jpeg_codec.cc
ipc/chromium/src/base/gfx/jpeg_codec.h
ipc/chromium/src/base/gfx/jpeg_codec_unittest.cc
ipc/chromium/src/base/gfx/native_theme.cc
ipc/chromium/src/base/gfx/native_theme.h
ipc/chromium/src/base/gfx/native_theme_unittest.cc
ipc/chromium/src/base/gfx/native_widget_types.h
ipc/chromium/src/base/gfx/native_widget_types_gtk.cc
ipc/chromium/src/base/gfx/platform_canvas.h
ipc/chromium/src/base/gfx/platform_canvas_linux.h
ipc/chromium/src/base/gfx/platform_canvas_mac.h
ipc/chromium/src/base/gfx/platform_device_linux.h
ipc/chromium/src/base/gfx/platform_device_mac.h
ipc/chromium/src/base/gfx/png_codec_unittest.cc
ipc/chromium/src/base/gfx/png_decoder.cc
ipc/chromium/src/base/gfx/png_decoder.h
ipc/chromium/src/base/gfx/png_encoder.cc
ipc/chromium/src/base/gfx/png_encoder.h
ipc/chromium/src/base/gfx/point.cc
ipc/chromium/src/base/gfx/point.h
ipc/chromium/src/base/gfx/rect.cc
ipc/chromium/src/base/gfx/rect.h
ipc/chromium/src/base/gfx/rect_unittest.cc
ipc/chromium/src/base/gfx/size.cc
ipc/chromium/src/base/gfx/size.h
ipc/chromium/src/base/hash_tables.h
ipc/chromium/src/base/histogram.cc
ipc/chromium/src/base/histogram.h
ipc/chromium/src/base/histogram_unittest.cc
ipc/chromium/src/base/hmac.h
ipc/chromium/src/base/hmac_mac.cc
ipc/chromium/src/base/hmac_nss.cc
ipc/chromium/src/base/hmac_unittest.cc
ipc/chromium/src/base/hmac_win.cc
ipc/chromium/src/base/iat_patch.cc
ipc/chromium/src/base/iat_patch.h
ipc/chromium/src/base/icu_util.cc
ipc/chromium/src/base/icu_util.h
ipc/chromium/src/base/id_map.h
ipc/chromium/src/base/idle_timer.cc
ipc/chromium/src/base/idle_timer.h
ipc/chromium/src/base/idle_timer_none.cc
ipc/chromium/src/base/idletimer_unittest.cc
ipc/chromium/src/base/image_util.cc
ipc/chromium/src/base/image_util.h
ipc/chromium/src/base/json_reader.cc
ipc/chromium/src/base/json_reader.h
ipc/chromium/src/base/json_reader_unittest.cc
ipc/chromium/src/base/json_writer.cc
ipc/chromium/src/base/json_writer.h
ipc/chromium/src/base/json_writer_unittest.cc
ipc/chromium/src/base/keyboard_codes.h
ipc/chromium/src/base/keyboard_codes_posix.h
ipc/chromium/src/base/keyboard_codes_win.h
ipc/chromium/src/base/lazy_instance.cc
ipc/chromium/src/base/lazy_instance.h
ipc/chromium/src/base/lazy_instance_unittest.cc
ipc/chromium/src/base/linked_ptr.h
ipc/chromium/src/base/linked_ptr_unittest.cc
ipc/chromium/src/base/linux_util.cc
ipc/chromium/src/base/linux_util.h
ipc/chromium/src/base/lock.cc
ipc/chromium/src/base/lock.h
ipc/chromium/src/base/lock_impl.h
ipc/chromium/src/base/lock_impl_posix.cc
ipc/chromium/src/base/lock_impl_win.cc
ipc/chromium/src/base/logging.cc
ipc/chromium/src/base/logging.h
ipc/chromium/src/base/mac_util.h
ipc/chromium/src/base/mac_util.mm
ipc/chromium/src/base/mac_util_unittest.cc
ipc/chromium/src/base/md5.cc
ipc/chromium/src/base/md5.h
ipc/chromium/src/base/memory_debug.cc
ipc/chromium/src/base/memory_debug.h
ipc/chromium/src/base/message_loop.cc
ipc/chromium/src/base/message_loop.h
ipc/chromium/src/base/message_loop_unittest.cc
ipc/chromium/src/base/message_pump.h
ipc/chromium/src/base/message_pump_default.cc
ipc/chromium/src/base/message_pump_default.h
ipc/chromium/src/base/message_pump_glib.cc
ipc/chromium/src/base/message_pump_glib.h
ipc/chromium/src/base/message_pump_libevent.cc
ipc/chromium/src/base/message_pump_libevent.h
ipc/chromium/src/base/message_pump_mac.h
ipc/chromium/src/base/message_pump_mac.mm
ipc/chromium/src/base/message_pump_win.cc
ipc/chromium/src/base/message_pump_win.h
ipc/chromium/src/base/multiprocess_test.h
ipc/chromium/src/base/native_library.h
ipc/chromium/src/base/native_library_linux.cc
ipc/chromium/src/base/native_library_mac.mm
ipc/chromium/src/base/native_library_win.cc
ipc/chromium/src/base/no_windows2000_unittest.h
ipc/chromium/src/base/non_thread_safe.cc
ipc/chromium/src/base/non_thread_safe.h
ipc/chromium/src/base/nss_init.cc
ipc/chromium/src/base/nss_init.h
ipc/chromium/src/base/object_watcher.cc
ipc/chromium/src/base/object_watcher.h
ipc/chromium/src/base/object_watcher_unittest.cc
ipc/chromium/src/base/observer_list.h
ipc/chromium/src/base/observer_list_threadsafe.h
ipc/chromium/src/base/observer_list_unittest.cc
ipc/chromium/src/base/path_service.cc
ipc/chromium/src/base/path_service.h
ipc/chromium/src/base/path_service_unittest.cc
ipc/chromium/src/base/pe_image.cc
ipc/chromium/src/base/pe_image.h
ipc/chromium/src/base/pe_image_unittest.cc
ipc/chromium/src/base/perf_test_suite.h
ipc/chromium/src/base/perftimer.cc
ipc/chromium/src/base/perftimer.h
ipc/chromium/src/base/pickle.cc
ipc/chromium/src/base/pickle.h
ipc/chromium/src/base/pickle_unittest.cc
ipc/chromium/src/base/platform_file.h
ipc/chromium/src/base/platform_file_posix.cc
ipc/chromium/src/base/platform_file_win.cc
ipc/chromium/src/base/platform_thread.h
ipc/chromium/src/base/platform_thread_mac.mm
ipc/chromium/src/base/platform_thread_posix.cc
ipc/chromium/src/base/platform_thread_win.cc
ipc/chromium/src/base/port.h
ipc/chromium/src/base/pr_time_unittest.cc
ipc/chromium/src/base/process.h
ipc/chromium/src/base/process_posix.cc
ipc/chromium/src/base/process_util.h
ipc/chromium/src/base/process_util_linux.cc
ipc/chromium/src/base/process_util_mac.mm
ipc/chromium/src/base/process_util_posix.cc
ipc/chromium/src/base/process_util_unittest.cc
ipc/chromium/src/base/process_util_win.cc
ipc/chromium/src/base/process_win.cc
ipc/chromium/src/base/profiler.cc
ipc/chromium/src/base/profiler.h
ipc/chromium/src/base/rand_util.cc
ipc/chromium/src/base/rand_util.h
ipc/chromium/src/base/rand_util_posix.cc
ipc/chromium/src/base/rand_util_unittest.cc
ipc/chromium/src/base/rand_util_win.cc
ipc/chromium/src/base/ref_counted.cc
ipc/chromium/src/base/ref_counted.h
ipc/chromium/src/base/ref_counted_unittest.cc
ipc/chromium/src/base/registry.cc
ipc/chromium/src/base/registry.h
ipc/chromium/src/base/resource_util.cc
ipc/chromium/src/base/resource_util.h
ipc/chromium/src/base/revocable_store.cc
ipc/chromium/src/base/revocable_store.h
ipc/chromium/src/base/run_all_perftests.cc
ipc/chromium/src/base/run_all_unittests.cc
ipc/chromium/src/base/scoped_bstr_win.cc
ipc/chromium/src/base/scoped_bstr_win.h
ipc/chromium/src/base/scoped_bstr_win_unittest.cc
ipc/chromium/src/base/scoped_cftyperef.h
ipc/chromium/src/base/scoped_clipboard_writer.cc
ipc/chromium/src/base/scoped_clipboard_writer.h
ipc/chromium/src/base/scoped_comptr_win.h
ipc/chromium/src/base/scoped_comptr_win_unittest.cc
ipc/chromium/src/base/scoped_handle.h
ipc/chromium/src/base/scoped_handle_win.h
ipc/chromium/src/base/scoped_nsautorelease_pool.h
ipc/chromium/src/base/scoped_nsautorelease_pool.mm
ipc/chromium/src/base/scoped_nsobject.h
ipc/chromium/src/base/scoped_ptr.h
ipc/chromium/src/base/scoped_ptr_unittest.cc
ipc/chromium/src/base/scoped_temp_dir.cc
ipc/chromium/src/base/scoped_temp_dir.h
ipc/chromium/src/base/scoped_temp_dir_unittest.cc
ipc/chromium/src/base/scoped_variant_win.cc
ipc/chromium/src/base/scoped_variant_win.h
ipc/chromium/src/base/scoped_variant_win_unittest.cc
ipc/chromium/src/base/scoped_vector.h
ipc/chromium/src/base/sha2.cc
ipc/chromium/src/base/sha2.h
ipc/chromium/src/base/sha2_unittest.cc
ipc/chromium/src/base/shared_memory.h
ipc/chromium/src/base/shared_memory_posix.cc
ipc/chromium/src/base/shared_memory_unittest.cc
ipc/chromium/src/base/shared_memory_win.cc
ipc/chromium/src/base/simple_thread.cc
ipc/chromium/src/base/simple_thread.h
ipc/chromium/src/base/simple_thread_unittest.cc
ipc/chromium/src/base/singleton.h
ipc/chromium/src/base/singleton_objc.h
ipc/chromium/src/base/singleton_unittest.cc
ipc/chromium/src/base/spin_wait.h
ipc/chromium/src/base/stack_container.h
ipc/chromium/src/base/stack_container_unittest.cc
ipc/chromium/src/base/stats_counters.h
ipc/chromium/src/base/stats_table.cc
ipc/chromium/src/base/stats_table.h
ipc/chromium/src/base/stats_table_unittest.cc
ipc/chromium/src/base/stl_util-inl.h
ipc/chromium/src/base/string16.cc
ipc/chromium/src/base/string16.h
ipc/chromium/src/base/string_escape.cc
ipc/chromium/src/base/string_escape.h
ipc/chromium/src/base/string_escape_unittest.cc
ipc/chromium/src/base/string_piece.cc
ipc/chromium/src/base/string_piece.h
ipc/chromium/src/base/string_piece_unittest.cc
ipc/chromium/src/base/string_tokenizer.h
ipc/chromium/src/base/string_tokenizer_unittest.cc
ipc/chromium/src/base/string_util.cc
ipc/chromium/src/base/string_util.h
ipc/chromium/src/base/string_util_icu.cc
ipc/chromium/src/base/string_util_posix.h
ipc/chromium/src/base/string_util_unittest.cc
ipc/chromium/src/base/string_util_win.h
ipc/chromium/src/base/sys_info.h
ipc/chromium/src/base/sys_info_mac.cc
ipc/chromium/src/base/sys_info_posix.cc
ipc/chromium/src/base/sys_info_unittest.cc
ipc/chromium/src/base/sys_info_win.cc
ipc/chromium/src/base/sys_string_conversions.h
ipc/chromium/src/base/sys_string_conversions_linux.cc
ipc/chromium/src/base/sys_string_conversions_mac.mm
ipc/chromium/src/base/sys_string_conversions_unittest.cc
ipc/chromium/src/base/sys_string_conversions_win.cc
ipc/chromium/src/base/system_monitor.cc
ipc/chromium/src/base/system_monitor.h
ipc/chromium/src/base/system_monitor_posix.cc
ipc/chromium/src/base/system_monitor_unittest.cc
ipc/chromium/src/base/system_monitor_win.cc
ipc/chromium/src/base/task.h
ipc/chromium/src/base/test_file_util.h
ipc/chromium/src/base/test_file_util_linux.cc
ipc/chromium/src/base/test_file_util_mac.cc
ipc/chromium/src/base/test_file_util_posix.cc
ipc/chromium/src/base/test_file_util_win.cc
ipc/chromium/src/base/test_suite.h
ipc/chromium/src/base/third_party/dmg_fp/README.chromium
ipc/chromium/src/base/third_party/dmg_fp/dmg_fp.h
ipc/chromium/src/base/third_party/dmg_fp/dtoa.cc
ipc/chromium/src/base/third_party/dmg_fp/g_fmt.cc
ipc/chromium/src/base/third_party/dmg_fp/gcc_warnings.patch
ipc/chromium/src/base/third_party/nspr/README.chromium
ipc/chromium/src/base/third_party/nspr/prcpucfg.h
ipc/chromium/src/base/third_party/nspr/prcpucfg_linux.h
ipc/chromium/src/base/third_party/nspr/prcpucfg_mac.h
ipc/chromium/src/base/third_party/nspr/prcpucfg_win.h
ipc/chromium/src/base/third_party/nspr/prtime.cc
ipc/chromium/src/base/third_party/nspr/prtime.h
ipc/chromium/src/base/third_party/nspr/prtypes.h
ipc/chromium/src/base/third_party/nss/README.chromium
ipc/chromium/src/base/third_party/nss/blapi.h
ipc/chromium/src/base/third_party/nss/blapit.h
ipc/chromium/src/base/third_party/nss/sha256.h
ipc/chromium/src/base/third_party/nss/sha512.cc
ipc/chromium/src/base/third_party/purify/pure.h
ipc/chromium/src/base/third_party/purify/pure_api.c
ipc/chromium/src/base/thread.cc
ipc/chromium/src/base/thread.h
ipc/chromium/src/base/thread_collision_warner.cc
ipc/chromium/src/base/thread_collision_warner.h
ipc/chromium/src/base/thread_collision_warner_unittest.cc
ipc/chromium/src/base/thread_local.h
ipc/chromium/src/base/thread_local_posix.cc
ipc/chromium/src/base/thread_local_storage.h
ipc/chromium/src/base/thread_local_storage_posix.cc
ipc/chromium/src/base/thread_local_storage_unittest.cc
ipc/chromium/src/base/thread_local_storage_win.cc
ipc/chromium/src/base/thread_local_unittest.cc
ipc/chromium/src/base/thread_local_win.cc
ipc/chromium/src/base/thread_unittest.cc
ipc/chromium/src/base/time.cc
ipc/chromium/src/base/time.h
ipc/chromium/src/base/time_format.cc
ipc/chromium/src/base/time_format.h
ipc/chromium/src/base/time_mac.cc
ipc/chromium/src/base/time_posix.cc
ipc/chromium/src/base/time_unittest.cc
ipc/chromium/src/base/time_win.cc
ipc/chromium/src/base/time_win_unittest.cc
ipc/chromium/src/base/timer.cc
ipc/chromium/src/base/timer.h
ipc/chromium/src/base/timer_unittest.cc
ipc/chromium/src/base/trace_event.cc
ipc/chromium/src/base/trace_event.h
ipc/chromium/src/base/tracked.cc
ipc/chromium/src/base/tracked.h
ipc/chromium/src/base/tracked_objects.cc
ipc/chromium/src/base/tracked_objects.h
ipc/chromium/src/base/tracked_objects_unittest.cc
ipc/chromium/src/base/tuple.h
ipc/chromium/src/base/tuple_unittest.cc
ipc/chromium/src/base/values.cc
ipc/chromium/src/base/values.h
ipc/chromium/src/base/values_unittest.cc
ipc/chromium/src/base/version.cc
ipc/chromium/src/base/version.h
ipc/chromium/src/base/version_unittest.cc
ipc/chromium/src/base/waitable_event.h
ipc/chromium/src/base/waitable_event_posix.cc
ipc/chromium/src/base/waitable_event_unittest.cc
ipc/chromium/src/base/waitable_event_watcher.h
ipc/chromium/src/base/waitable_event_watcher_posix.cc
ipc/chromium/src/base/waitable_event_watcher_unittest.cc
ipc/chromium/src/base/waitable_event_watcher_win.cc
ipc/chromium/src/base/waitable_event_win.cc
ipc/chromium/src/base/watchdog.cc
ipc/chromium/src/base/watchdog.h
ipc/chromium/src/base/watchdog_unittest.cc
ipc/chromium/src/base/win_util.cc
ipc/chromium/src/base/win_util.h
ipc/chromium/src/base/win_util_unittest.cc
ipc/chromium/src/base/windows_message_list.h
ipc/chromium/src/base/wmi_util.cc
ipc/chromium/src/base/wmi_util.h
ipc/chromium/src/base/wmi_util_unittest.cc
ipc/chromium/src/base/word_iterator.cc
ipc/chromium/src/base/word_iterator.h
ipc/chromium/src/base/word_iterator_unittest.cc
ipc/chromium/src/base/worker_pool.h
ipc/chromium/src/base/worker_pool_linux.cc
ipc/chromium/src/base/worker_pool_linux.h
ipc/chromium/src/base/worker_pool_linux_unittest.cc
ipc/chromium/src/base/worker_pool_mac.mm
ipc/chromium/src/base/worker_pool_unittest.cc
ipc/chromium/src/base/worker_pool_win.cc
ipc/chromium/src/build/build_config.h
ipc/chromium/src/chrome/common/DEPS
ipc/chromium/src/chrome/common/accessibility_types.h
ipc/chromium/src/chrome/common/app_cache/app_cache_context_impl.cc
ipc/chromium/src/chrome/common/app_cache/app_cache_context_impl.h
ipc/chromium/src/chrome/common/app_cache/app_cache_dispatcher.cc
ipc/chromium/src/chrome/common/app_cache/app_cache_dispatcher.h
ipc/chromium/src/chrome/common/app_cache/app_cache_dispatcher_host.cc
ipc/chromium/src/chrome/common/app_cache/app_cache_dispatcher_host.h
ipc/chromium/src/chrome/common/bindings_policy.h
ipc/chromium/src/chrome/common/bzip2_unittest.cc
ipc/chromium/src/chrome/common/child_process.cc
ipc/chromium/src/chrome/common/child_process.h
ipc/chromium/src/chrome/common/child_process_host.cc
ipc/chromium/src/chrome/common/child_process_host.h
ipc/chromium/src/chrome/common/child_process_info.cc
ipc/chromium/src/chrome/common/child_process_info.h
ipc/chromium/src/chrome/common/child_thread.cc
ipc/chromium/src/chrome/common/child_thread.h
ipc/chromium/src/chrome/common/chrome_constants.cc
ipc/chromium/src/chrome/common/chrome_constants.h
ipc/chromium/src/chrome/common/chrome_counters.cc
ipc/chromium/src/chrome/common/chrome_counters.h
ipc/chromium/src/chrome/common/chrome_paths.cc
ipc/chromium/src/chrome/common/chrome_paths.h
ipc/chromium/src/chrome/common/chrome_paths_internal.h
ipc/chromium/src/chrome/common/chrome_paths_linux.cc
ipc/chromium/src/chrome/common/chrome_paths_mac.mm
ipc/chromium/src/chrome/common/chrome_paths_win.cc
ipc/chromium/src/chrome/common/chrome_plugin_api.h
ipc/chromium/src/chrome/common/chrome_plugin_lib.cc
ipc/chromium/src/chrome/common/chrome_plugin_lib.h
ipc/chromium/src/chrome/common/chrome_plugin_unittest.cc
ipc/chromium/src/chrome/common/chrome_plugin_util.cc
ipc/chromium/src/chrome/common/chrome_plugin_util.h
ipc/chromium/src/chrome/common/chrome_switches.cc
ipc/chromium/src/chrome/common/chrome_switches.h
ipc/chromium/src/chrome/common/classfactory.cc
ipc/chromium/src/chrome/common/classfactory.h
ipc/chromium/src/chrome/common/common.vcproj
ipc/chromium/src/chrome/common/common.vsprops
ipc/chromium/src/chrome/common/common_glue.cc
ipc/chromium/src/chrome/common/common_resources.grd
ipc/chromium/src/chrome/common/debug_flags.cc
ipc/chromium/src/chrome/common/debug_flags.h
ipc/chromium/src/chrome/common/devtools_messages.h
ipc/chromium/src/chrome/common/devtools_messages_internal.h
ipc/chromium/src/chrome/common/env_vars.cc
ipc/chromium/src/chrome/common/env_vars.h
ipc/chromium/src/chrome/common/extensions/url_pattern.cc
ipc/chromium/src/chrome/common/extensions/url_pattern.h
ipc/chromium/src/chrome/common/extensions/url_pattern_unittest.cc
ipc/chromium/src/chrome/common/extensions/user_script.cc
ipc/chromium/src/chrome/common/extensions/user_script.h
ipc/chromium/src/chrome/common/extensions/user_script_unittest.cc
ipc/chromium/src/chrome/common/extra_defines.vsprops
ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc
ipc/chromium/src/chrome/common/file_descriptor_set_posix.h
ipc/chromium/src/chrome/common/file_descriptor_set_unittest.cc
ipc/chromium/src/chrome/common/filter_policy.h
ipc/chromium/src/chrome/common/gears_api.h
ipc/chromium/src/chrome/common/gfx/DEPS
ipc/chromium/src/chrome/common/gfx/color_utils.cc
ipc/chromium/src/chrome/common/gfx/color_utils.h
ipc/chromium/src/chrome/common/gfx/emf.cc
ipc/chromium/src/chrome/common/gfx/emf.h
ipc/chromium/src/chrome/common/gfx/emf_unittest.cc
ipc/chromium/src/chrome/common/gfx/text_elider.cc
ipc/chromium/src/chrome/common/gfx/text_elider.h
ipc/chromium/src/chrome/common/gfx/text_elider_unittest.cc
ipc/chromium/src/chrome/common/gfx/utils.h
ipc/chromium/src/chrome/common/gtk_util.cc
ipc/chromium/src/chrome/common/gtk_util.h
ipc/chromium/src/chrome/common/important_file_writer.cc
ipc/chromium/src/chrome/common/important_file_writer.h
ipc/chromium/src/chrome/common/important_file_writer_unittest.cc
ipc/chromium/src/chrome/common/ipc_channel.h
ipc/chromium/src/chrome/common/ipc_channel_posix.cc
ipc/chromium/src/chrome/common/ipc_channel_posix.h
ipc/chromium/src/chrome/common/ipc_channel_proxy.cc
ipc/chromium/src/chrome/common/ipc_channel_proxy.h
ipc/chromium/src/chrome/common/ipc_channel_win.cc
ipc/chromium/src/chrome/common/ipc_channel_win.h
ipc/chromium/src/chrome/common/ipc_fuzzing_tests.cc
ipc/chromium/src/chrome/common/ipc_logging.cc
ipc/chromium/src/chrome/common/ipc_logging.h
ipc/chromium/src/chrome/common/ipc_maybe.h
ipc/chromium/src/chrome/common/ipc_message.cc
ipc/chromium/src/chrome/common/ipc_message.h
ipc/chromium/src/chrome/common/ipc_message_macros.h
ipc/chromium/src/chrome/common/ipc_message_unittest.cc
ipc/chromium/src/chrome/common/ipc_message_utils.cc
ipc/chromium/src/chrome/common/ipc_message_utils.h
ipc/chromium/src/chrome/common/ipc_send_fds_test.cc
ipc/chromium/src/chrome/common/ipc_sync_channel.cc
ipc/chromium/src/chrome/common/ipc_sync_channel.h
ipc/chromium/src/chrome/common/ipc_sync_channel_unittest.cc
ipc/chromium/src/chrome/common/ipc_sync_message.cc
ipc/chromium/src/chrome/common/ipc_sync_message.h
ipc/chromium/src/chrome/common/ipc_sync_message_unittest.cc
ipc/chromium/src/chrome/common/ipc_sync_message_unittest.h
ipc/chromium/src/chrome/common/ipc_test_sink.cc
ipc/chromium/src/chrome/common/ipc_test_sink.h
ipc/chromium/src/chrome/common/ipc_tests.cc
ipc/chromium/src/chrome/common/ipc_tests.h
ipc/chromium/src/chrome/common/ipc_tests.vcproj
ipc/chromium/src/chrome/common/json_value_serializer.cc
ipc/chromium/src/chrome/common/json_value_serializer.h
ipc/chromium/src/chrome/common/json_value_serializer_perftest.cc
ipc/chromium/src/chrome/common/json_value_serializer_unittest.cc
ipc/chromium/src/chrome/common/jstemplate_builder.cc
ipc/chromium/src/chrome/common/jstemplate_builder.h
ipc/chromium/src/chrome/common/libxml_utils.cc
ipc/chromium/src/chrome/common/libxml_utils.h
ipc/chromium/src/chrome/common/logging_chrome.cc
ipc/chromium/src/chrome/common/logging_chrome.h
ipc/chromium/src/chrome/common/logging_chrome_uitest.cc
ipc/chromium/src/chrome/common/mach_ipc_mac.h
ipc/chromium/src/chrome/common/mach_ipc_mac.mm
ipc/chromium/src/chrome/common/mach_message_source_mac.cc
ipc/chromium/src/chrome/common/mach_message_source_mac.h
ipc/chromium/src/chrome/common/main_function_params.h
ipc/chromium/src/chrome/common/message_router.cc
ipc/chromium/src/chrome/common/message_router.h
ipc/chromium/src/chrome/common/modal_dialog_event.h
ipc/chromium/src/chrome/common/mru_cache.h
ipc/chromium/src/chrome/common/mru_cache_unittest.cc
ipc/chromium/src/chrome/common/native_web_keyboard_event.h
ipc/chromium/src/chrome/common/native_web_keyboard_event_linux.cc
ipc/chromium/src/chrome/common/native_web_keyboard_event_mac.mm
ipc/chromium/src/chrome/common/native_web_keyboard_event_win.cc
ipc/chromium/src/chrome/common/navigation_types.h
ipc/chromium/src/chrome/common/net/cache_uitest.cc
ipc/chromium/src/chrome/common/net/cookie_monster_sqlite.cc
ipc/chromium/src/chrome/common/net/cookie_monster_sqlite.h
ipc/chromium/src/chrome/common/net/dns.h
ipc/chromium/src/chrome/common/net/url_request_intercept_job.cc
ipc/chromium/src/chrome/common/net/url_request_intercept_job.h
ipc/chromium/src/chrome/common/net/url_util_unittest.cc
ipc/chromium/src/chrome/common/notification_details.h
ipc/chromium/src/chrome/common/notification_observer.h
ipc/chromium/src/chrome/common/notification_registrar.cc
ipc/chromium/src/chrome/common/notification_registrar.h
ipc/chromium/src/chrome/common/notification_service.cc
ipc/chromium/src/chrome/common/notification_service.h
ipc/chromium/src/chrome/common/notification_service_unittest.cc
ipc/chromium/src/chrome/common/notification_source.h
ipc/chromium/src/chrome/common/notification_type.h
ipc/chromium/src/chrome/common/owned_widget_gtk.cc
ipc/chromium/src/chrome/common/owned_widget_gtk.h
ipc/chromium/src/chrome/common/page_action.cc
ipc/chromium/src/chrome/common/page_action.h
ipc/chromium/src/chrome/common/page_transition_types.h
ipc/chromium/src/chrome/common/page_zoom.h
ipc/chromium/src/chrome/common/platform_util.h
ipc/chromium/src/chrome/common/platform_util_linux.cc
ipc/chromium/src/chrome/common/platform_util_mac.mm
ipc/chromium/src/chrome/common/platform_util_win.cc
ipc/chromium/src/chrome/common/plugin_messages.h
ipc/chromium/src/chrome/common/plugin_messages_internal.h
ipc/chromium/src/chrome/common/pref_member.cc
ipc/chromium/src/chrome/common/pref_member.h
ipc/chromium/src/chrome/common/pref_member_unittest.cc
ipc/chromium/src/chrome/common/pref_names.cc
ipc/chromium/src/chrome/common/pref_names.h
ipc/chromium/src/chrome/common/pref_service.cc
ipc/chromium/src/chrome/common/pref_service.h
ipc/chromium/src/chrome/common/pref_service_uitest.cc
ipc/chromium/src/chrome/common/pref_service_unittest.cc
ipc/chromium/src/chrome/common/process_watcher.h
ipc/chromium/src/chrome/common/process_watcher_posix.cc
ipc/chromium/src/chrome/common/process_watcher_win.cc
ipc/chromium/src/chrome/common/property_bag.cc
ipc/chromium/src/chrome/common/property_bag.h
ipc/chromium/src/chrome/common/property_bag_unittest.cc
ipc/chromium/src/chrome/common/quarantine_mac.h
ipc/chromium/src/chrome/common/quarantine_mac.mm
ipc/chromium/src/chrome/common/ref_counted_util.h
ipc/chromium/src/chrome/common/render_messages.h
ipc/chromium/src/chrome/common/render_messages_internal.h
ipc/chromium/src/chrome/common/resource_dispatcher.cc
ipc/chromium/src/chrome/common/resource_dispatcher.h
ipc/chromium/src/chrome/common/resource_dispatcher_unittest.cc
ipc/chromium/src/chrome/common/result_codes.h
ipc/chromium/src/chrome/common/sandbox_init_wrapper.cc
ipc/chromium/src/chrome/common/sandbox_init_wrapper.h
ipc/chromium/src/chrome/common/security_filter_peer.cc
ipc/chromium/src/chrome/common/security_filter_peer.h
ipc/chromium/src/chrome/common/sqlite_compiled_statement.cc
ipc/chromium/src/chrome/common/sqlite_compiled_statement.h
ipc/chromium/src/chrome/common/sqlite_utils.cc
ipc/chromium/src/chrome/common/sqlite_utils.h
ipc/chromium/src/chrome/common/task_queue.cc
ipc/chromium/src/chrome/common/task_queue.h
ipc/chromium/src/chrome/common/temp_scaffolding_stubs.cc
ipc/chromium/src/chrome/common/temp_scaffolding_stubs.h
ipc/chromium/src/chrome/common/thumbnail_score.cc
ipc/chromium/src/chrome/common/thumbnail_score.h
ipc/chromium/src/chrome/common/time_format.cc
ipc/chromium/src/chrome/common/time_format.h
ipc/chromium/src/chrome/common/time_format_unittest.cc
ipc/chromium/src/chrome/common/transport_dib.h
ipc/chromium/src/chrome/common/transport_dib_linux.cc
ipc/chromium/src/chrome/common/transport_dib_mac.cc
ipc/chromium/src/chrome/common/transport_dib_win.cc
ipc/chromium/src/chrome/common/unzip.cc
ipc/chromium/src/chrome/common/unzip.h
ipc/chromium/src/chrome/common/unzip_unittest.cc
ipc/chromium/src/chrome/common/url_constants.cc
ipc/chromium/src/chrome/common/url_constants.h
ipc/chromium/src/chrome/common/visitedlink_common.cc
ipc/chromium/src/chrome/common/visitedlink_common.h
ipc/chromium/src/chrome/common/webkit_param_traits.h
ipc/chromium/src/chrome/common/win_safe_util.cc
ipc/chromium/src/chrome/common/win_safe_util.h
ipc/chromium/src/chrome/common/win_util.cc
ipc/chromium/src/chrome/common/win_util.h
ipc/chromium/src/chrome/common/win_util_unittest.cc
ipc/chromium/src/chrome/common/worker_messages.h
ipc/chromium/src/chrome/common/worker_messages_internal.h
ipc/chromium/src/chrome/common/worker_thread_ticker.cc
ipc/chromium/src/chrome/common/worker_thread_ticker.h
ipc/chromium/src/chrome/common/worker_thread_ticker_unittest.cc
ipc/chromium/src/chrome/common/x11_util.cc
ipc/chromium/src/chrome/common/x11_util.h
ipc/chromium/src/chrome/common/x11_util_internal.h
ipc/chromium/src/testing/gtest/include/gtest/gtest-death-test.h
ipc/chromium/src/testing/gtest/include/gtest/gtest-message.h
ipc/chromium/src/testing/gtest/include/gtest/gtest-param-test.h
ipc/chromium/src/testing/gtest/include/gtest/gtest-param-test.h.pump
ipc/chromium/src/testing/gtest/include/gtest/gtest-spi.h
ipc/chromium/src/testing/gtest/include/gtest/gtest-test-part.h
ipc/chromium/src/testing/gtest/include/gtest/gtest-typed-test.h
ipc/chromium/src/testing/gtest/include/gtest/gtest.h
ipc/chromium/src/testing/gtest/include/gtest/gtest_pred_impl.h
ipc/chromium/src/testing/gtest/include/gtest/gtest_prod.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-death-test-internal.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-filepath.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-internal.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-linked_ptr.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-param-util-generated.h.pump
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-param-util.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-port.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-string.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-type-util.h
ipc/chromium/src/testing/gtest/include/gtest/internal/gtest-type-util.h.pump
ipc/chromium/src/third_party/libevent/ChangeLog
ipc/chromium/src/third_party/libevent/Makefile.am
ipc/chromium/src/third_party/libevent/Makefile.in
ipc/chromium/src/third_party/libevent/README
ipc/chromium/src/third_party/libevent/README.chromium
ipc/chromium/src/third_party/libevent/aclocal.m4
ipc/chromium/src/third_party/libevent/autogen.sh
ipc/chromium/src/third_party/libevent/buffer.c
ipc/chromium/src/third_party/libevent/compat/sys/_time.h
ipc/chromium/src/third_party/libevent/compat/sys/queue.h
ipc/chromium/src/third_party/libevent/config.guess
ipc/chromium/src/third_party/libevent/config.h.in
ipc/chromium/src/third_party/libevent/config.sub
ipc/chromium/src/third_party/libevent/configure
ipc/chromium/src/third_party/libevent/configure.in
ipc/chromium/src/third_party/libevent/devpoll.c
ipc/chromium/src/third_party/libevent/epoll.c
ipc/chromium/src/third_party/libevent/epoll_sub.c
ipc/chromium/src/third_party/libevent/evbuffer.c
ipc/chromium/src/third_party/libevent/evdns.3
ipc/chromium/src/third_party/libevent/evdns.c
ipc/chromium/src/third_party/libevent/evdns.h
ipc/chromium/src/third_party/libevent/event-config.h
ipc/chromium/src/third_party/libevent/event-internal.h
ipc/chromium/src/third_party/libevent/event.3
ipc/chromium/src/third_party/libevent/event.c
ipc/chromium/src/third_party/libevent/event.h
ipc/chromium/src/third_party/libevent/event_rpcgen.py
ipc/chromium/src/third_party/libevent/event_tagging.c
ipc/chromium/src/third_party/libevent/evhttp.h
ipc/chromium/src/third_party/libevent/evport.c
ipc/chromium/src/third_party/libevent/evrpc-internal.h
ipc/chromium/src/third_party/libevent/evrpc.c
ipc/chromium/src/third_party/libevent/evrpc.h
ipc/chromium/src/third_party/libevent/evsignal.h
ipc/chromium/src/third_party/libevent/evutil.c
ipc/chromium/src/third_party/libevent/evutil.h
ipc/chromium/src/third_party/libevent/http-internal.h
ipc/chromium/src/third_party/libevent/http.c
ipc/chromium/src/third_party/libevent/install-sh
ipc/chromium/src/third_party/libevent/kqueue.c
ipc/chromium/src/third_party/libevent/libevent.gyp
ipc/chromium/src/third_party/libevent/linux/config.h
ipc/chromium/src/third_party/libevent/log.c
ipc/chromium/src/third_party/libevent/log.h
ipc/chromium/src/third_party/libevent/ltmain.sh
ipc/chromium/src/third_party/libevent/mac/config.h
ipc/chromium/src/third_party/libevent/min_heap.h
ipc/chromium/src/third_party/libevent/missing
ipc/chromium/src/third_party/libevent/mkinstalldirs
ipc/chromium/src/third_party/libevent/poll.c
ipc/chromium/src/third_party/libevent/quotes.patch
ipc/chromium/src/third_party/libevent/sample/Makefile.am
ipc/chromium/src/third_party/libevent/sample/Makefile.in
ipc/chromium/src/third_party/libevent/sample/event-test.c
ipc/chromium/src/third_party/libevent/sample/signal-test.c
ipc/chromium/src/third_party/libevent/sample/time-test.c
ipc/chromium/src/third_party/libevent/select.c
ipc/chromium/src/third_party/libevent/signal.c
ipc/chromium/src/third_party/libevent/strlcpy-internal.h
ipc/chromium/src/third_party/libevent/strlcpy.c
ipc/chromium/src/third_party/libevent/sys-queue-macros.patch
ipc/chromium/src/third_party/libevent/test/Makefile.am
ipc/chromium/src/third_party/libevent/test/Makefile.in
ipc/chromium/src/third_party/libevent/test/bench.c
ipc/chromium/src/third_party/libevent/test/regress.c
ipc/chromium/src/third_party/libevent/test/regress.gen.c
ipc/chromium/src/third_party/libevent/test/regress.gen.h
ipc/chromium/src/third_party/libevent/test/regress.h
ipc/chromium/src/third_party/libevent/test/regress.rpc
ipc/chromium/src/third_party/libevent/test/regress_dns.c
ipc/chromium/src/third_party/libevent/test/regress_http.c
ipc/chromium/src/third_party/libevent/test/regress_rpc.c
ipc/chromium/src/third_party/libevent/test/test-eof.c
ipc/chromium/src/third_party/libevent/test/test-init.c
ipc/chromium/src/third_party/libevent/test/test-time.c
ipc/chromium/src/third_party/libevent/test/test-weof.c
ipc/chromium/src/third_party/libevent/test/test.sh
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/DEPS
@@ -0,0 +1,6 @@
+include_rules = [
+  "+third_party/zlib",
+  "+third_party/libevent",
+  "+third_party/libjpeg",
+  "+third_party/dmg_fp",
+]
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/at_exit.cc
@@ -0,0 +1,67 @@
+// 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 "base/at_exit.h"
+#include "base/logging.h"
+
+namespace base {
+
+// Keep a stack of registered AtExitManagers.  We always operate on the most
+// recent, and we should never have more than one outside of testing, when we
+// use the shadow version of the constructor.  We don't protect this for
+// thread-safe access, since it will only be modified in testing.
+static AtExitManager* g_top_manager = NULL;
+
+AtExitManager::AtExitManager() : next_manager_(NULL) {
+  DCHECK(!g_top_manager);
+  g_top_manager = this;
+}
+
+AtExitManager::AtExitManager(bool shadow) : next_manager_(g_top_manager) {
+  DCHECK(shadow || !g_top_manager);
+  g_top_manager = this;
+}
+
+AtExitManager::~AtExitManager() {
+  if (!g_top_manager) {
+    NOTREACHED() << "Tried to ~AtExitManager without an AtExitManager";
+    return;
+  }
+  DCHECK(g_top_manager == this);
+
+  ProcessCallbacksNow();
+  g_top_manager = next_manager_;
+}
+
+// static
+void AtExitManager::RegisterCallback(AtExitCallbackType func, void* param) {
+  if (!g_top_manager) {
+    NOTREACHED() << "Tried to RegisterCallback without an AtExitManager";
+    return;
+  }
+
+  DCHECK(func);
+
+  AutoLock lock(g_top_manager->lock_);
+  g_top_manager->stack_.push(CallbackAndParam(func, param));
+}
+
+// static
+void AtExitManager::ProcessCallbacksNow() {
+  if (!g_top_manager) {
+    NOTREACHED() << "Tried to ProcessCallbacksNow without an AtExitManager";
+    return;
+  }
+
+  AutoLock lock(g_top_manager->lock_);
+
+  while (!g_top_manager->stack_.empty()) {
+    CallbackAndParam callback_and_param = g_top_manager->stack_.top();
+    g_top_manager->stack_.pop();
+
+    callback_and_param.func_(callback_and_param.param_);
+  }
+}
+
+}  // namespace base
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/at_exit.h
@@ -0,0 +1,71 @@
+// 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 BASE_AT_EXIT_H_
+#define BASE_AT_EXIT_H_
+
+#include <stack>
+
+#include "base/basictypes.h"
+#include "base/lock.h"
+
+namespace base {
+
+// This class provides a facility similar to the CRT atexit(), except that
+// we control when the callbacks are executed. Under Windows for a DLL they
+// happen at a really bad time and under the loader lock. This facility is
+// mostly used by base::Singleton.
+//
+// The usage is simple. Early in the main() or WinMain() scope create an
+// AtExitManager object on the stack:
+// int main(...) {
+//    base::AtExitManager exit_manager;
+//
+// }
+// When the exit_manager object goes out of scope, all the registered
+// callbacks and singleton destructors will be called.
+
+class AtExitManager {
+ protected:
+  // This constructor will allow this instance of AtExitManager to be created
+  // even if one already exists.  This should only be used for testing!
+  // AtExitManagers are kept on a global stack, and it will be removed during
+  // destruction.  This allows you to shadow another AtExitManager.
+  AtExitManager(bool shadow);
+
+ public:
+  typedef void (*AtExitCallbackType)(void*);
+
+  AtExitManager();
+
+  // The dtor calls all the registered callbacks. Do not try to register more
+  // callbacks after this point.
+  ~AtExitManager();
+
+  // Registers the specified function to be called at exit. The prototype of
+  // the callback function is void func().
+  static void RegisterCallback(AtExitCallbackType func, void* param);
+
+  // Calls the functions registered with RegisterCallback in LIFO order. It
+  // is possible to register new callbacks after calling this function.
+  static void ProcessCallbacksNow();
+
+ private:
+  struct CallbackAndParam {
+    CallbackAndParam(AtExitCallbackType func, void* param)
+        : func_(func), param_(param) { }
+    AtExitCallbackType func_;
+    void* param_;
+  };
+
+  Lock lock_;
+  std::stack<CallbackAndParam> stack_;
+  AtExitManager* next_manager_;  // Stack of managers to allow shadowing.
+
+  DISALLOW_COPY_AND_ASSIGN(AtExitManager);
+};
+
+}  // namespace base
+
+#endif  // BASE_AT_EXIT_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/at_exit_unittest.cc
@@ -0,0 +1,85 @@
+// 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 "base/at_exit.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace {
+
+// Don't test the global AtExitManager, because asking it to process its
+// AtExit callbacks can ruin the global state that other tests may depend on.
+class ShadowingAtExitManager : public base::AtExitManager {
+ public:
+  ShadowingAtExitManager() : AtExitManager(true) {}
+};
+
+int g_test_counter_1 = 0;
+int g_test_counter_2 = 0;
+
+void IncrementTestCounter1(void* unused) {
+  ++g_test_counter_1;
+}
+
+void IncrementTestCounter2(void* unused) {
+  ++g_test_counter_2;
+}
+
+void ZeroTestCounters() {
+  g_test_counter_1 = 0;
+  g_test_counter_2 = 0;
+}
+
+void ExpectCounter1IsZero(void* unused) {
+  EXPECT_EQ(0, g_test_counter_1);
+}
+
+void ExpectParamIsNull(void* param) {
+  EXPECT_EQ(static_cast<void*>(NULL), param);
+}
+
+void ExpectParamIsCounter(void* param) {
+  EXPECT_EQ(&g_test_counter_1, param);
+}
+
+}  // namespace
+
+TEST(AtExitTest, Basic) {
+  ShadowingAtExitManager shadowing_at_exit_manager;
+
+  ZeroTestCounters();
+  base::AtExitManager::RegisterCallback(&IncrementTestCounter1, NULL);
+  base::AtExitManager::RegisterCallback(&IncrementTestCounter2, NULL);
+  base::AtExitManager::RegisterCallback(&IncrementTestCounter1, NULL);
+
+  EXPECT_EQ(0, g_test_counter_1);
+  EXPECT_EQ(0, g_test_counter_2);
+  base::AtExitManager::ProcessCallbacksNow();
+  EXPECT_EQ(2, g_test_counter_1);
+  EXPECT_EQ(1, g_test_counter_2);
+}
+
+TEST(AtExitTest, LIFOOrder) {
+  ShadowingAtExitManager shadowing_at_exit_manager;
+
+  ZeroTestCounters();
+  base::AtExitManager::RegisterCallback(&IncrementTestCounter1, NULL);
+  base::AtExitManager::RegisterCallback(&ExpectCounter1IsZero, NULL);
+  base::AtExitManager::RegisterCallback(&IncrementTestCounter2, NULL);
+
+  EXPECT_EQ(0, g_test_counter_1);
+  EXPECT_EQ(0, g_test_counter_2);
+  base::AtExitManager::ProcessCallbacksNow();
+  EXPECT_EQ(1, g_test_counter_1);
+  EXPECT_EQ(1, g_test_counter_2);
+}
+
+TEST(AtExitTest, Param) {
+  ShadowingAtExitManager shadowing_at_exit_manager;
+
+  base::AtExitManager::RegisterCallback(&ExpectParamIsNull, NULL);
+  base::AtExitManager::RegisterCallback(&ExpectParamIsCounter,
+                                        &g_test_counter_1);
+  base::AtExitManager::ProcessCallbacksNow();
+}
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomic_ref_count.h
@@ -0,0 +1,63 @@
+// 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.
+
+// This is a low level implementation of atomic semantics for reference
+// counting.  Please use base/ref_counted.h directly instead.
+
+#ifndef BASE_ATOMIC_REF_COUNT_H_
+#define BASE_ATOMIC_REF_COUNT_H_
+
+#include "base/atomicops.h"
+
+namespace base {
+
+typedef subtle::Atomic32 AtomicRefCount;
+
+// Increment a reference count by "increment", which must exceed 0.
+inline void AtomicRefCountIncN(volatile AtomicRefCount *ptr,
+                               AtomicRefCount increment) {
+  subtle::NoBarrier_AtomicIncrement(ptr, increment);
+}
+
+// Decrement a reference count by "decrement", which must exceed 0,
+// and return whether the result is non-zero.
+// Insert barriers to ensure that state written before the reference count
+// became zero will be visible to a thread that has just made the count zero.
+inline bool AtomicRefCountDecN(volatile AtomicRefCount *ptr,
+                               AtomicRefCount decrement) {
+  return subtle::Barrier_AtomicIncrement(ptr, -decrement) != 0;
+}
+
+// Increment a reference count by 1.
+inline void AtomicRefCountInc(volatile AtomicRefCount *ptr) {
+  base::AtomicRefCountIncN(ptr, 1);
+}
+
+// Decrement a reference count by 1 and return whether the result is non-zero.
+// Insert barriers to ensure that state written before the reference count
+// became zero will be visible to a thread that has just made the count zero.
+inline bool AtomicRefCountDec(volatile AtomicRefCount *ptr) {
+  return base::AtomicRefCountDecN(ptr, 1);
+}
+
+// Return whether the reference count is one.  If the reference count is used
+// in the conventional way, a refrerence count of 1 implies that the current
+// thread owns the reference and no other thread shares it.  This call performs
+// the test for a reference count of one, and performs the memory barrier
+// needed for the owning thread to act on the object, knowing that it has
+// exclusive access to the object.
+inline bool AtomicRefCountIsOne(volatile AtomicRefCount *ptr) {
+  return subtle::Acquire_Load(ptr) == 1;
+}
+
+// Return whether the reference count is zero.  With conventional object
+// referencing counting, the object will be destroyed, so the reference count
+// should never be zero.  Hence this is generally used for a debug check.
+inline bool AtomicRefCountIsZero(volatile AtomicRefCount *ptr) {
+  return subtle::Acquire_Load(ptr) == 0;
+}
+
+}  // namespace base
+
+#endif  // BASE_ATOMIC_REF_COUNT_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomic_sequence_num.h
@@ -0,0 +1,30 @@
+// 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 BASE_ATOMIC_SEQUENCE_NUM_H_
+#define BASE_ATOMIC_SEQUENCE_NUM_H_
+
+#include "base/atomicops.h"
+#include "base/basictypes.h"
+
+namespace base {
+
+class AtomicSequenceNumber {
+ public:
+  AtomicSequenceNumber() : seq_(0) { }
+  explicit AtomicSequenceNumber(base::LinkerInitialized x) { /* seq_ is 0 */ }
+
+  int GetNext() {
+    return static_cast<int>(
+        base::subtle::NoBarrier_AtomicIncrement(&seq_, 1) - 1);
+  }
+
+ private:
+  base::subtle::Atomic32 seq_;
+  DISALLOW_COPY_AND_ASSIGN(AtomicSequenceNumber);
+};
+
+}  // namespace base
+
+#endif  // BASE_ATOMIC_SEQUENCE_NUM_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops.h
@@ -0,0 +1,139 @@
+// 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.
+
+// For atomic operations on reference counts, see atomic_refcount.h.
+// For atomic operations on sequence numbers, see atomic_sequence_num.h.
+
+// The routines exported by this module are subtle.  If you use them, even if
+// you get the code right, it will depend on careful reasoning about atomicity
+// and memory ordering; it will be less readable, and harder to maintain.  If
+// you plan to use these routines, you should have a good reason, such as solid
+// evidence that performance would otherwise suffer, or there being no
+// alternative.  You should assume only properties explicitly guaranteed by the
+// specifications in this file.  You are almost certainly _not_ writing code
+// just for the x86; if you assume x86 semantics, x86 hardware bugs and
+// implementations on other archtectures will cause your code to break.  If you
+// do not know what you are doing, avoid these routines, and use a Mutex.
+//
+// It is incorrect to make direct assignments to/from an atomic variable.
+// You should use one of the Load or Store routines.  The NoBarrier
+// versions are provided when no barriers are needed:
+//   NoBarrier_Store()
+//   NoBarrier_Load()
+// Although there are currently no compiler enforcement, you are encouraged
+// to use these.
+//
+
+#ifndef BASE_ATOMICOPS_H_
+#define BASE_ATOMICOPS_H_
+
+#include "base/basictypes.h"
+#include "base/port.h"
+
+namespace base {
+namespace subtle {
+
+// Bug 1308991.  We need this for /Wp64, to mark it safe for AtomicWord casting.
+#ifndef OS_WIN
+#define __w64
+#endif
+typedef __w64 int32 Atomic32;
+#ifdef CPU_ARCH_64_BITS
+typedef int64 Atomic64;
+#endif
+
+// Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
+// Atomic64 routines below, depending on your architecture.
+typedef intptr_t AtomicWord;
+
+// Atomically execute:
+//      result = *ptr;
+//      if (*ptr == old_value)
+//        *ptr = new_value;
+//      return result;
+//
+// I.e., replace "*ptr" with "new_value" if "*ptr" used to be "old_value".
+// Always return the old value of "*ptr"
+//
+// This routine implies no memory barriers.
+Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+                                  Atomic32 old_value,
+                                  Atomic32 new_value);
+
+// Atomically store new_value into *ptr, returning the previous value held in
+// *ptr.  This routine implies no memory barriers.
+Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, Atomic32 new_value);
+
+// Atomically increment *ptr by "increment".  Returns the new value of
+// *ptr with the increment applied.  This routine implies no memory barriers.
+Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, Atomic32 increment);
+
+Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                 Atomic32 increment);
+
+// These following lower-level operations are typically useful only to people
+// implementing higher-level synchronization operations like spinlocks,
+// mutexes, and condition-variables.  They combine CompareAndSwap(), a load, or
+// a store with appropriate memory-ordering instructions.  "Acquire" operations
+// ensure that no later memory access can be reordered ahead of the operation.
+// "Release" operations ensure that no previous memory access can be reordered
+// after the operation.  "Barrier" operations have both "Acquire" and "Release"
+// semantics.   A MemoryBarrier() has "Barrier" semantics, but does no memory
+// access.
+Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+                                Atomic32 old_value,
+                                Atomic32 new_value);
+Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+                                Atomic32 old_value,
+                                Atomic32 new_value);
+
+void MemoryBarrier();
+void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value);
+void Acquire_Store(volatile Atomic32* ptr, Atomic32 value);
+void Release_Store(volatile Atomic32* ptr, Atomic32 value);
+
+Atomic32 NoBarrier_Load(volatile const Atomic32* ptr);
+Atomic32 Acquire_Load(volatile const Atomic32* ptr);
+Atomic32 Release_Load(volatile const Atomic32* ptr);
+
+// 64-bit atomic operations (only available on 64-bit processors).
+#ifdef CPU_ARCH_64_BITS
+Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+                                  Atomic64 old_value,
+                                  Atomic64 new_value);
+Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, Atomic64 new_value);
+Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment);
+Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment);
+
+Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
+                                Atomic64 old_value,
+                                Atomic64 new_value);
+Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
+                                Atomic64 old_value,
+                                Atomic64 new_value);
+void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value);
+void Acquire_Store(volatile Atomic64* ptr, Atomic64 value);
+void Release_Store(volatile Atomic64* ptr, Atomic64 value);
+Atomic64 NoBarrier_Load(volatile const Atomic64* ptr);
+Atomic64 Acquire_Load(volatile const Atomic64* ptr);
+Atomic64 Release_Load(volatile const Atomic64* ptr);
+#endif  // CPU_ARCH_64_BITS
+
+}  // namespace base::subtle
+}  // namespace base
+
+// Include our platform specific implementation.
+#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY)
+#include "base/atomicops_internals_x86_msvc.h"
+#elif defined(OS_MACOSX) && defined(ARCH_CPU_X86_FAMILY)
+#include "base/atomicops_internals_x86_macosx.h"
+#elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY)
+#include "base/atomicops_internals_x86_gcc.h"
+#elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)
+#include "base/atomicops_internals_arm_gcc.h"
+#else
+#error "Atomic operations are not supported on your platform"
+#endif
+
+#endif  // BASE_ATOMICOPS_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops_internals_arm_gcc.h
@@ -0,0 +1,124 @@
+// 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.
+
+// This file is an internal atomic implementation, use base/atomicops.h instead.
+//
+// LinuxKernelCmpxchg and Barrier_AtomicIncrement are from Google Gears.
+
+#ifndef BASE_ATOMICOPS_INTERNALS_ARM_GCC_H_
+#define BASE_ATOMICOPS_INTERNALS_ARM_GCC_H_
+
+namespace base {
+namespace subtle {
+
+// 0xffff0fc0 is the hard coded address of a function provided by
+// the kernel which implements an atomic compare-exchange. On older
+// ARM architecture revisions (pre-v6) this may be implemented using
+// a syscall. This address is stable, and in active use (hard coded)
+// by at least glibc-2.7 and the Android C library.
+typedef Atomic32 (*LinuxKernelCmpxchgFunc)(Atomic32 old_value,
+                                           Atomic32 new_value,
+                                           volatile Atomic32* ptr);
+LinuxKernelCmpxchgFunc pLinuxKernelCmpxchg __attribute__((weak)) =
+    (LinuxKernelCmpxchgFunc) 0xffff0fc0;
+
+typedef void (*LinuxKernelMemoryBarrierFunc)(void);
+LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) =
+    (LinuxKernelMemoryBarrierFunc) 0xffff0fa0;
+
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+                                         Atomic32 old_value,
+                                         Atomic32 new_value) {
+  Atomic32 prev_value = *ptr;
+  do {
+    if (!pLinuxKernelCmpxchg(old_value, new_value,
+                             const_cast<Atomic32*>(ptr))) {
+      return old_value;
+    }
+    prev_value = *ptr;
+  } while (prev_value == old_value);
+  return prev_value;
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+                                         Atomic32 new_value) {
+  Atomic32 old_value;
+  do {
+    old_value = *ptr;
+  } while (pLinuxKernelCmpxchg(old_value, new_value,
+                               const_cast<Atomic32*>(ptr)));
+  return old_value;
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+                                          Atomic32 increment) {
+  return Barrier_AtomicIncrement(ptr, increment);
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                        Atomic32 increment) {
+  for (;;) {
+    // Atomic exchange the old value with an incremented one.
+    Atomic32 old_value = *ptr;
+    Atomic32 new_value = old_value + increment;
+    if (pLinuxKernelCmpxchg(old_value, new_value,
+                            const_cast<Atomic32*>(ptr)) == 0) {
+      // The exchange took place as expected.
+      return new_value;
+    }
+    // Otherwise, *ptr changed mid-loop and we need to retry.
+  }
+
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+  *ptr = value;
+}
+
+inline void MemoryBarrier() {
+  pLinuxKernelMemoryBarrier();
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+  *ptr = value;
+  MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+  MemoryBarrier();
+  *ptr = value;
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+  return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+  Atomic32 value = *ptr;
+  MemoryBarrier();
+  return value;
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+  MemoryBarrier();
+  return *ptr;
+}
+
+} // namespace base::subtle
+} // namespace base
+
+#endif  // BASE_ATOMICOPS_INTERNALS_ARM_GCC_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops_internals_x86_gcc.cc
@@ -0,0 +1,104 @@
+// 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.
+
+// This module gets enough CPU information to optimize the
+// atomicops module on x86.
+
+#include <string.h>
+
+#include "base/atomicops.h"
+#include "base/basictypes.h"
+
+// This file only makes sense with atomicops_internals_x86_gcc.h -- it
+// depends on structs that are defined in that file.  If atomicops.h
+// doesn't sub-include that file, then we aren't needed, and shouldn't
+// try to do anything.
+#ifdef BASE_ATOMICOPS_INTERNALS_X86_GCC_H_
+
+// Inline cpuid instruction.  In PIC compilations, %ebx contains the address
+// of the global offset table.  To avoid breaking such executables, this code
+// must preserve that register's value across cpuid instructions.
+#if defined(__i386__)
+#define cpuid(a, b, c, d, inp) \
+  asm ("mov %%ebx, %%edi\n"    \
+       "cpuid\n"               \
+       "xchg %%edi, %%ebx\n"   \
+       : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
+#elif defined (__x86_64__)
+#define cpuid(a, b, c, d, inp) \
+  asm ("mov %%rbx, %%rdi\n"    \
+       "cpuid\n"               \
+       "xchg %%rdi, %%rbx\n"   \
+       : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
+#endif
+
+#if defined(cpuid)        // initialize the struct only on x86
+
+// Set the flags so that code will run correctly and conservatively, so even
+// if we haven't been initialized yet, we're probably single threaded, and our
+// default values should hopefully be pretty safe.
+struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures = {
+  false,          // bug can't exist before process spawns multiple threads
+  false,          // no SSE2
+};
+
+// Initialize the AtomicOps_Internalx86CPUFeatures struct.
+static void AtomicOps_Internalx86CPUFeaturesInit() {
+  uint32 eax;
+  uint32 ebx;
+  uint32 ecx;
+  uint32 edx;
+
+  // Get vendor string (issue CPUID with eax = 0)
+  cpuid(eax, ebx, ecx, edx, 0);
+  char vendor[13];
+  memcpy(vendor, &ebx, 4);
+  memcpy(vendor + 4, &edx, 4);
+  memcpy(vendor + 8, &ecx, 4);
+  vendor[12] = 0;
+
+  // get feature flags in ecx/edx, and family/model in eax
+  cpuid(eax, ebx, ecx, edx, 1);
+
+  int family = (eax >> 8) & 0xf;        // family and model fields
+  int model = (eax >> 4) & 0xf;
+  if (family == 0xf) {                  // use extended family and model fields
+    family += (eax >> 20) & 0xff;
+    model += ((eax >> 16) & 0xf) << 4;
+  }
+
+  // Opteron Rev E has a bug in which on very rare occasions a locked
+  // instruction doesn't act as a read-acquire barrier if followed by a
+  // non-locked read-modify-write instruction.  Rev F has this bug in
+  // pre-release versions, but not in versions released to customers,
+  // so we test only for Rev E, which is family 15, model 32..63 inclusive.
+  if (strcmp(vendor, "AuthenticAMD") == 0 &&       // AMD
+      family == 15 &&
+      32 <= model && model <= 63) {
+    AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = true;
+  } else {
+    AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = false;
+  }
+
+  // edx bit 26 is SSE2 which we use to tell use whether we can use mfence
+  AtomicOps_Internalx86CPUFeatures.has_sse2 = ((edx >> 26) & 1);
+}
+
+namespace {
+
+class AtomicOpsx86Initializer {
+ public:
+  AtomicOpsx86Initializer() {
+    AtomicOps_Internalx86CPUFeaturesInit();
+  }
+};
+
+// A global to get use initialized on startup via static initialization :/
+AtomicOpsx86Initializer g_initer;
+
+}  // namespace
+
+#endif  // if x86
+
+#endif  // ifdef BASE_ATOMICOPS_INTERNALS_X86_GCC_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops_internals_x86_gcc.h
@@ -0,0 +1,248 @@
+// 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.
+
+// This file is an internal atomic implementation, use base/atomicops.h instead.
+
+#ifndef BASE_ATOMICOPS_INTERNALS_X86_GCC_H_
+#define BASE_ATOMICOPS_INTERNALS_X86_GCC_H_
+
+// This struct is not part of the public API of this module; clients may not
+// use it.
+// Features of this x86.  Values may not be correct before main() is run,
+// but are set conservatively.
+struct AtomicOps_x86CPUFeatureStruct {
+  bool has_amd_lock_mb_bug; // Processor has AMD memory-barrier bug; do lfence
+                            // after acquire compare-and-swap.
+  bool has_sse2;            // Processor has SSE2.
+};
+extern struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures;
+
+#define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory")
+
+namespace base {
+namespace subtle {
+
+// 32-bit low-level operations on any platform.
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+                                         Atomic32 old_value,
+                                         Atomic32 new_value) {
+  Atomic32 prev;
+  __asm__ __volatile__("lock; cmpxchgl %1,%2"
+                       : "=a" (prev)
+                       : "q" (new_value), "m" (*ptr), "0" (old_value)
+                       : "memory");
+  return prev;
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+                                         Atomic32 new_value) {
+  __asm__ __volatile__("xchgl %1,%0"  // The lock prefix is implicit for xchg.
+                       : "=r" (new_value)
+                       : "m" (*ptr), "0" (new_value)
+                       : "memory");
+  return new_value;  // Now it's the previous value.
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+                                          Atomic32 increment) {
+  Atomic32 temp = increment;
+  __asm__ __volatile__("lock; xaddl %0,%1"
+                       : "+r" (temp), "+m" (*ptr)
+                       : : "memory");
+  // temp now holds the old value of *ptr
+  return temp + increment;
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                        Atomic32 increment) {
+  Atomic32 temp = increment;
+  __asm__ __volatile__("lock; xaddl %0,%1"
+                       : "+r" (temp), "+m" (*ptr)
+                       : : "memory");
+  // temp now holds the old value of *ptr
+  if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) {
+    __asm__ __volatile__("lfence" : : : "memory");
+  }
+  return temp + increment;
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  Atomic32 x = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+  if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) {
+    __asm__ __volatile__("lfence" : : : "memory");
+  }
+  return x;
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+  *ptr = value;
+}
+
+#if defined(__x86_64__)
+
+// 64-bit implementations of memory barrier can be simpler, because it
+// "mfence" is guaranteed to exist.
+inline void MemoryBarrier() {
+  __asm__ __volatile__("mfence" : : : "memory");
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+  *ptr = value;
+  MemoryBarrier();
+}
+
+#else
+
+inline void MemoryBarrier() {
+  if (AtomicOps_Internalx86CPUFeatures.has_sse2) {
+    __asm__ __volatile__("mfence" : : : "memory");
+  } else { // mfence is faster but not present on PIII
+    Atomic32 x = 0;
+    NoBarrier_AtomicExchange(&x, 0);  // acts as a barrier on PIII
+  }
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+  if (AtomicOps_Internalx86CPUFeatures.has_sse2) {
+    *ptr = value;
+    __asm__ __volatile__("mfence" : : : "memory");
+  } else {
+    NoBarrier_AtomicExchange(ptr, value);
+                          // acts as a barrier on PIII
+  }
+}
+#endif
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+  ATOMICOPS_COMPILER_BARRIER();
+  *ptr = value; // An x86 store acts as a release barrier.
+  // See comments in Atomic64 version of Release_Store(), below.
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+  return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+  Atomic32 value = *ptr; // An x86 load acts as a acquire barrier.
+  // See comments in Atomic64 version of Release_Store(), below.
+  ATOMICOPS_COMPILER_BARRIER();
+  return value;
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+  MemoryBarrier();
+  return *ptr;
+}
+
+#if defined(__x86_64__)
+
+// 64-bit low-level operations on 64-bit platform.
+
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+                                         Atomic64 old_value,
+                                         Atomic64 new_value) {
+  Atomic64 prev;
+  __asm__ __volatile__("lock; cmpxchgq %1,%2"
+                       : "=a" (prev)
+                       : "q" (new_value), "m" (*ptr), "0" (old_value)
+                       : "memory");
+  return prev;
+}
+
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+                                         Atomic64 new_value) {
+  __asm__ __volatile__("xchgq %1,%0"  // The lock prefix is implicit for xchg.
+                       : "=r" (new_value)
+                       : "m" (*ptr), "0" (new_value)
+                       : "memory");
+  return new_value;  // Now it's the previous value.
+}
+
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+                                          Atomic64 increment) {
+  Atomic64 temp = increment;
+  __asm__ __volatile__("lock; xaddq %0,%1"
+                       : "+r" (temp), "+m" (*ptr)
+                       : : "memory");
+  // temp now contains the previous value of *ptr
+  return temp + increment;
+}
+
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+                                        Atomic64 increment) {
+  Atomic64 temp = increment;
+  __asm__ __volatile__("lock; xaddq %0,%1"
+                       : "+r" (temp), "+m" (*ptr)
+                       : : "memory");
+  // temp now contains the previous value of *ptr
+  if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) {
+    __asm__ __volatile__("lfence" : : : "memory");
+  }
+  return temp + increment;
+}
+
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
+  *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
+  *ptr = value;
+  MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+  ATOMICOPS_COMPILER_BARRIER();
+
+  *ptr = value; // An x86 store acts as a release barrier
+                // for current AMD/Intel chips as of Jan 2008.
+                // See also Acquire_Load(), below.
+
+  // When new chips come out, check:
+  //  IA-32 Intel Architecture Software Developer's Manual, Volume 3:
+  //  System Programming Guide, Chatper 7: Multiple-processor management,
+  //  Section 7.2, Memory Ordering.
+  // Last seen at:
+  //   http://developer.intel.com/design/pentium4/manuals/index_new.htm
+  //
+  // x86 stores/loads fail to act as barriers for a few instructions (clflush
+  // maskmovdqu maskmovq movntdq movnti movntpd movntps movntq) but these are
+  // not generated by the compiler, and are rare.  Users of these instructions
+  // need to know about cache behaviour in any case since all of these involve
+  // either flushing cache lines or non-temporal cache hints.
+}
+
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+  return *ptr;
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+  Atomic64 value = *ptr; // An x86 load acts as a acquire barrier,
+                         // for current AMD/Intel chips as of Jan 2008.
+                         // See also Release_Store(), above.
+  ATOMICOPS_COMPILER_BARRIER();
+  return value;
+}
+
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
+  MemoryBarrier();
+  return *ptr;
+}
+#endif  // defined(__x86_64__)
+
+} // namespace base::subtle
+} // namespace base
+
+#undef ATOMICOPS_COMPILER_BARRIER
+
+#endif  // BASE_ATOMICOPS_INTERNALS_X86_GCC_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops_internals_x86_macosx.h
@@ -0,0 +1,279 @@
+// 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.
+
+// This file is an internal atomic implementation, use base/atomicops.h instead.
+
+#ifndef BASE_ATOMICOPS_INTERNALS_X86_MACOSX_H_
+#define BASE_ATOMICOPS_INTERNALS_X86_MACOSX_H_
+
+#include <libkern/OSAtomic.h>
+
+namespace base {
+namespace subtle {
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr,
+                                         Atomic32 old_value,
+                                         Atomic32 new_value) {
+  Atomic32 prev_value;
+  do {
+    if (OSAtomicCompareAndSwap32(old_value, new_value,
+                                 const_cast<Atomic32*>(ptr))) {
+      return old_value;
+    }
+    prev_value = *ptr;
+  } while (prev_value == old_value);
+  return prev_value;
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32 *ptr,
+                                         Atomic32 new_value) {
+  Atomic32 old_value;
+  do {
+    old_value = *ptr;
+  } while (!OSAtomicCompareAndSwap32(old_value, new_value,
+                                     const_cast<Atomic32*>(ptr)));
+  return old_value;
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr,
+                                          Atomic32 increment) {
+  return OSAtomicAdd32(increment, const_cast<Atomic32*>(ptr));
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32 *ptr,
+                                          Atomic32 increment) {
+  return OSAtomicAdd32Barrier(increment, const_cast<Atomic32*>(ptr));
+}
+
+inline void MemoryBarrier() {
+  OSMemoryBarrier();
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  Atomic32 prev_value;
+  do {
+    if (OSAtomicCompareAndSwap32Barrier(old_value, new_value,
+                                        const_cast<Atomic32*>(ptr))) {
+      return old_value;
+    }
+    prev_value = *ptr;
+  } while (prev_value == old_value);
+  return prev_value;
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  return Acquire_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+  *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic32 *ptr, Atomic32 value) {
+  *ptr = value;
+  MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic32 *ptr, Atomic32 value) {
+  MemoryBarrier();
+  *ptr = value;
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+  return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32 *ptr) {
+  Atomic32 value = *ptr;
+  MemoryBarrier();
+  return value;
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32 *ptr) {
+  MemoryBarrier();
+  return *ptr;
+}
+
+#ifdef __LP64__
+
+// 64-bit implementation on 64-bit platform
+
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64 *ptr,
+                                         Atomic64 old_value,
+                                         Atomic64 new_value) {
+  Atomic64 prev_value;
+  do {
+    if (OSAtomicCompareAndSwap64(old_value, new_value,
+                                 const_cast<Atomic64*>(ptr))) {
+      return old_value;
+    }
+    prev_value = *ptr;
+  } while (prev_value == old_value);
+  return prev_value;
+}
+
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64 *ptr,
+                                         Atomic64 new_value) {
+  Atomic64 old_value;
+  do {
+    old_value = *ptr;
+  } while (!OSAtomicCompareAndSwap64(old_value, new_value,
+                                     const_cast<Atomic64*>(ptr)));
+  return old_value;
+}
+
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64 *ptr,
+                                          Atomic64 increment) {
+  return OSAtomicAdd64(increment, const_cast<Atomic64*>(ptr));
+}
+
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64 *ptr,
+                                        Atomic64 increment) {
+  return OSAtomicAdd64Barrier(increment, const_cast<Atomic64*>(ptr));
+}
+
+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64 *ptr,
+                                       Atomic64 old_value,
+                                       Atomic64 new_value) {
+  Atomic64 prev_value;
+  do {
+    if (OSAtomicCompareAndSwap64Barrier(old_value, new_value,
+                                        const_cast<Atomic64*>(ptr))) {
+      return old_value;
+    }
+    prev_value = *ptr;
+  } while (prev_value == old_value);
+  return prev_value;
+}
+
+inline Atomic64 Release_CompareAndSwap(volatile Atomic64 *ptr,
+                                       Atomic64 old_value,
+                                       Atomic64 new_value) {
+  // The lib kern interface does not distinguish between
+  // Acquire and Release memory barriers; they are equivalent.
+  return Acquire_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
+  *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic64 *ptr, Atomic64 value) {
+  *ptr = value;
+  MemoryBarrier();
+}
+
+inline void Release_Store(volatile Atomic64 *ptr, Atomic64 value) {
+  MemoryBarrier();
+  *ptr = value;
+}
+
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+  return *ptr;
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64 *ptr) {
+  Atomic64 value = *ptr;
+  MemoryBarrier();
+  return value;
+}
+
+inline Atomic64 Release_Load(volatile const Atomic64 *ptr) {
+  MemoryBarrier();
+  return *ptr;
+}
+
+#endif  // defined(__LP64__)
+
+// MacOS uses long for intptr_t, AtomicWord and Atomic32 are always different
+// on the Mac, even when they are the same size.  We need to explicitly cast
+// from AtomicWord to Atomic32/64 to implement the AtomicWord interface.
+#ifdef __LP64__
+#define AtomicWordCastType Atomic64
+#else
+#define AtomicWordCastType Atomic32
+#endif
+
+inline AtomicWord NoBarrier_CompareAndSwap(volatile AtomicWord* ptr,
+                                           AtomicWord old_value,
+                                           AtomicWord new_value) {
+  return NoBarrier_CompareAndSwap(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr),
+      old_value, new_value);
+}
+
+inline AtomicWord NoBarrier_AtomicExchange(volatile AtomicWord* ptr,
+                                           AtomicWord new_value) {
+  return NoBarrier_AtomicExchange(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr), new_value);
+}
+
+inline AtomicWord NoBarrier_AtomicIncrement(volatile AtomicWord* ptr,
+                                            AtomicWord increment) {
+  return NoBarrier_AtomicIncrement(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr), increment);
+}
+
+inline AtomicWord Barrier_AtomicIncrement(volatile AtomicWord* ptr,
+                                          AtomicWord increment) {
+  return Barrier_AtomicIncrement(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr), increment);
+}
+
+inline AtomicWord Acquire_CompareAndSwap(volatile AtomicWord* ptr,
+                                         AtomicWord old_value,
+                                         AtomicWord new_value) {
+  return base::subtle::Acquire_CompareAndSwap(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr),
+      old_value, new_value);
+}
+
+inline AtomicWord Release_CompareAndSwap(volatile AtomicWord* ptr,
+                                         AtomicWord old_value,
+                                         AtomicWord new_value) {
+  return base::subtle::Release_CompareAndSwap(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr),
+      old_value, new_value);
+}
+
+inline void NoBarrier_Store(volatile AtomicWord *ptr, AtomicWord value) {
+  NoBarrier_Store(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr), value);
+}
+
+inline void Acquire_Store(volatile AtomicWord* ptr, AtomicWord value) {
+  return base::subtle::Acquire_Store(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr), value);
+}
+
+inline void Release_Store(volatile AtomicWord* ptr, AtomicWord value) {
+  return base::subtle::Release_Store(
+      reinterpret_cast<volatile AtomicWordCastType*>(ptr), value);
+}
+
+inline AtomicWord NoBarrier_Load(volatile const AtomicWord *ptr) {
+  return NoBarrier_Load(
+      reinterpret_cast<volatile const AtomicWordCastType*>(ptr));
+}
+
+inline AtomicWord Acquire_Load(volatile const AtomicWord* ptr) {
+  return base::subtle::Acquire_Load(
+      reinterpret_cast<volatile const AtomicWordCastType*>(ptr));
+}
+
+inline AtomicWord Release_Load(volatile const AtomicWord* ptr) {
+  return base::subtle::Release_Load(
+      reinterpret_cast<volatile const AtomicWordCastType*>(ptr));
+}
+
+#undef AtomicWordCastType
+
+}   // namespace base::subtle
+}   // namespace base
+
+#endif  // BASE_ATOMICOPS_INTERNALS_X86_MACOSX_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops_internals_x86_msvc.h
@@ -0,0 +1,167 @@
+// 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.
+
+// This file is an internal atomic implementation, use base/atomicops.h instead.
+
+#ifndef BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_
+#define BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_
+
+#include <windows.h>
+
+namespace base {
+namespace subtle {
+
+inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
+                                         Atomic32 old_value,
+                                         Atomic32 new_value) {
+  LONG result = InterlockedCompareExchange(
+      reinterpret_cast<volatile LONG*>(ptr),
+      static_cast<LONG>(new_value),
+      static_cast<LONG>(old_value));
+  return static_cast<Atomic32>(result);
+}
+
+inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+                                         Atomic32 new_value) {
+  LONG result = InterlockedExchange(
+      reinterpret_cast<volatile LONG*>(ptr),
+      static_cast<LONG>(new_value));
+  return static_cast<Atomic32>(result);
+}
+
+inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                        Atomic32 increment) {
+  return InterlockedExchangeAdd(
+      reinterpret_cast<volatile LONG*>(ptr),
+      static_cast<LONG>(increment)) + increment;
+}
+
+inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+                                          Atomic32 increment) {
+  return Barrier_AtomicIncrement(ptr, increment);
+}
+
+#if !(defined(_MSC_VER) && _MSC_VER >= 1400)
+#error "We require at least vs2005 for MemoryBarrier"
+#endif
+inline void MemoryBarrier() {
+  // We use MemoryBarrier from WinNT.h
+  ::MemoryBarrier();
+}
+
+inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
+                                       Atomic32 old_value,
+                                       Atomic32 new_value) {
+  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+}
+
+inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
+  *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
+  NoBarrier_AtomicExchange(ptr, value);
+              // acts as a barrier in this implementation
+}
+
+inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
+  *ptr = value; // works w/o barrier for current Intel chips as of June 2005
+  // See comments in Atomic64 version of Release_Store() below.
+}
+
+inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
+  return *ptr;
+}
+
+inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
+  Atomic32 value = *ptr;
+  return value;
+}
+
+inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
+  MemoryBarrier();
+  return *ptr;
+}
+
+#if defined(_WIN64)
+
+// 64-bit low-level operations on 64-bit platform.
+
+COMPILE_ASSERT(sizeof(Atomic64) == sizeof(PVOID), atomic_word_is_atomic);
+
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
+                                         Atomic64 old_value,
+                                         Atomic64 new_value) {
+  PVOID result = InterlockedCompareExchangePointer(
+    reinterpret_cast<volatile PVOID*>(ptr),
+    reinterpret_cast<PVOID>(new_value), reinterpret_cast<PVOID>(old_value));
+  return reinterpret_cast<Atomic64>(result);
+}
+
+inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+                                         Atomic64 new_value) {
+  PVOID result = InterlockedExchangePointer(
+    reinterpret_cast<volatile PVOID*>(ptr),
+    reinterpret_cast<PVOID>(new_value));
+  return reinterpret_cast<Atomic64>(result);
+}
+
+inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+                                        Atomic64 increment) {
+  return InterlockedExchangeAdd64(
+      reinterpret_cast<volatile LONGLONG*>(ptr),
+      static_cast<LONGLONG>(increment)) + increment;
+}
+
+inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+                                          Atomic64 increment) {
+  return Barrier_AtomicIncrement(ptr, increment);
+}
+
+inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
+  *ptr = value;
+}
+
+inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
+  NoBarrier_AtomicExchange(ptr, value);
+              // acts as a barrier in this implementation
+}
+
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+  *ptr = value; // works w/o barrier for current Intel chips as of June 2005
+
+  // When new chips come out, check:
+  //  IA-32 Intel Architecture Software Developer's Manual, Volume 3:
+  //  System Programming Guide, Chatper 7: Multiple-processor management,
+  //  Section 7.2, Memory Ordering.
+  // Last seen at:
+  //   http://developer.intel.com/design/pentium4/manuals/index_new.htm
+}
+
+inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+  return *ptr;
+}
+
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+  Atomic64 value = *ptr;
+  return value;
+}
+
+inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
+  MemoryBarrier();
+  return *ptr;
+}
+
+#endif  // defined(_WIN64)
+
+}  // namespace base::subtle
+}  // namespace base
+
+#endif  // BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/atomicops_unittest.cc
@@ -0,0 +1,237 @@
+// 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 "base/atomicops.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+template <class AtomicType>
+static void TestAtomicIncrement() {
+  // For now, we just test single threaded execution
+
+  // use a guard value to make sure the NoBarrier_AtomicIncrement doesn't go
+  // outside the expected address bounds.  This is in particular to
+  // test that some future change to the asm code doesn't cause the
+  // 32-bit NoBarrier_AtomicIncrement doesn't do the wrong thing on 64-bit
+  // machines.
+  struct {
+    AtomicType prev_word;
+    AtomicType count;
+    AtomicType next_word;
+  } s;
+
+  AtomicType prev_word_value, next_word_value;
+  memset(&prev_word_value, 0xFF, sizeof(AtomicType));
+  memset(&next_word_value, 0xEE, sizeof(AtomicType));
+
+  s.prev_word = prev_word_value;
+  s.count = 0;
+  s.next_word = next_word_value;
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 1), 1);
+  EXPECT_EQ(s.count, 1);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 2), 3);
+  EXPECT_EQ(s.count, 3);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 3), 6);
+  EXPECT_EQ(s.count, 6);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -3), 3);
+  EXPECT_EQ(s.count, 3);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -2), 1);
+  EXPECT_EQ(s.count, 1);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), 0);
+  EXPECT_EQ(s.count, 0);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -1), -1);
+  EXPECT_EQ(s.count, -1);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, -4), -5);
+  EXPECT_EQ(s.count, -5);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+
+  EXPECT_EQ(base::subtle::NoBarrier_AtomicIncrement(&s.count, 5), 0);
+  EXPECT_EQ(s.count, 0);
+  EXPECT_EQ(s.prev_word, prev_word_value);
+  EXPECT_EQ(s.next_word, next_word_value);
+}
+
+
+#define NUM_BITS(T) (sizeof(T) * 8)
+
+
+template <class AtomicType>
+static void TestCompareAndSwap() {
+  AtomicType value = 0;
+  AtomicType prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 1);
+  EXPECT_EQ(1, value);
+  EXPECT_EQ(0, prev);
+
+  // Use test value that has non-zero bits in both halves, more for testing
+  // 64-bit implementation on 32-bit platforms.
+  const AtomicType k_test_val = (GG_ULONGLONG(1) <<
+                                 (NUM_BITS(AtomicType) - 2)) + 11;
+  value = k_test_val;
+  prev = base::subtle::NoBarrier_CompareAndSwap(&value, 0, 5);
+  EXPECT_EQ(k_test_val, value);
+  EXPECT_EQ(k_test_val, prev);
+
+  value = k_test_val;
+  prev = base::subtle::NoBarrier_CompareAndSwap(&value, k_test_val, 5);
+  EXPECT_EQ(5, value);
+  EXPECT_EQ(k_test_val, prev);
+}
+
+
+template <class AtomicType>
+static void TestAtomicExchange() {
+  AtomicType value = 0;
+  AtomicType new_value = base::subtle::NoBarrier_AtomicExchange(&value, 1);
+  EXPECT_EQ(1, value);
+  EXPECT_EQ(0, new_value);
+
+  // Use test value that has non-zero bits in both halves, more for testing
+  // 64-bit implementation on 32-bit platforms.
+  const AtomicType k_test_val = (GG_ULONGLONG(1) <<
+                                 (NUM_BITS(AtomicType) - 2)) + 11;
+  value = k_test_val;
+  new_value = base::subtle::NoBarrier_AtomicExchange(&value, k_test_val);
+  EXPECT_EQ(k_test_val, value);
+  EXPECT_EQ(k_test_val, new_value);
+
+  value = k_test_val;
+  new_value = base::subtle::NoBarrier_AtomicExchange(&value, 5);
+  EXPECT_EQ(5, value);
+  EXPECT_EQ(k_test_val, new_value);
+}
+
+
+template <class AtomicType>
+static void TestAtomicIncrementBounds() {
+  // Test at rollover boundary between int_max and int_min
+  AtomicType test_val = (GG_ULONGLONG(1) <<
+                         (NUM_BITS(AtomicType) - 1));
+  AtomicType value = -1 ^ test_val;
+  AtomicType new_value = base::subtle::NoBarrier_AtomicIncrement(&value, 1);
+  EXPECT_EQ(test_val, value);
+  EXPECT_EQ(value, new_value);
+
+  base::subtle::NoBarrier_AtomicIncrement(&value, -1);
+  EXPECT_EQ(-1 ^ test_val, value);
+
+  // Test at 32-bit boundary for 64-bit atomic type.
+  test_val = GG_ULONGLONG(1) << (NUM_BITS(AtomicType) / 2);
+  value = test_val - 1;
+  new_value = base::subtle::NoBarrier_AtomicIncrement(&value, 1);
+  EXPECT_EQ(test_val, value);
+  EXPECT_EQ(value, new_value);
+
+  base::subtle::NoBarrier_AtomicIncrement(&value, -1);
+  EXPECT_EQ(test_val - 1, value);
+}
+
+// Return an AtomicType with the value 0xa5a5a5..
+template <class AtomicType>
+static AtomicType TestFillValue() {
+  AtomicType val = 0;
+  memset(&val, 0xa5, sizeof(AtomicType));
+  return val;
+}
+
+// This is a simple sanity check that values are correct. Not testing
+// atomicity
+template <class AtomicType>
+static void TestStore() {
+  const AtomicType kVal1 = TestFillValue<AtomicType>();
+  const AtomicType kVal2 = static_cast<AtomicType>(-1);
+
+  AtomicType value;
+
+  base::subtle::NoBarrier_Store(&value, kVal1);
+  EXPECT_EQ(kVal1, value);
+  base::subtle::NoBarrier_Store(&value, kVal2);
+  EXPECT_EQ(kVal2, value);
+
+  base::subtle::Acquire_Store(&value, kVal1);
+  EXPECT_EQ(kVal1, value);
+  base::subtle::Acquire_Store(&value, kVal2);
+  EXPECT_EQ(kVal2, value);
+
+  base::subtle::Release_Store(&value, kVal1);
+  EXPECT_EQ(kVal1, value);
+  base::subtle::Release_Store(&value, kVal2);
+  EXPECT_EQ(kVal2, value);
+}
+
+// This is a simple sanity check that values are correct. Not testing
+// atomicity
+template <class AtomicType>
+static void TestLoad() {
+  const AtomicType kVal1 = TestFillValue<AtomicType>();
+  const AtomicType kVal2 = static_cast<AtomicType>(-1);
+
+  AtomicType value;
+
+  value = kVal1;
+  EXPECT_EQ(kVal1, base::subtle::NoBarrier_Load(&value));
+  value = kVal2;
+  EXPECT_EQ(kVal2, base::subtle::NoBarrier_Load(&value));
+
+  value = kVal1;
+  EXPECT_EQ(kVal1, base::subtle::Acquire_Load(&value));
+  value = kVal2;
+  EXPECT_EQ(kVal2, base::subtle::Acquire_Load(&value));
+
+  value = kVal1;
+  EXPECT_EQ(kVal1, base::subtle::Release_Load(&value));
+  value = kVal2;
+  EXPECT_EQ(kVal2, base::subtle::Release_Load(&value));
+}
+
+TEST(AtomicOpsTest, Inc) {
+  TestAtomicIncrement<base::subtle::Atomic32>();
+  TestAtomicIncrement<base::subtle::AtomicWord>();
+}
+
+TEST(AtomicOpsTest, CompareAndSwap) {
+  TestCompareAndSwap<base::subtle::Atomic32>();
+  TestCompareAndSwap<base::subtle::AtomicWord>();
+}
+
+TEST(AtomicOpsTest, Exchange) {
+  TestAtomicExchange<base::subtle::Atomic32>();
+  TestAtomicExchange<base::subtle::AtomicWord>();
+}
+
+TEST(AtomicOpsTest, IncrementBounds) {
+  TestAtomicIncrementBounds<base::subtle::Atomic32>();
+  TestAtomicIncrementBounds<base::subtle::AtomicWord>();
+}
+
+TEST(AtomicOpsTest, Store) {
+  TestStore<base::subtle::Atomic32>();
+  TestStore<base::subtle::AtomicWord>();
+}
+
+TEST(AtomicOpsTest, Load) {
+  TestLoad<base::subtle::Atomic32>();
+  TestLoad<base::subtle::AtomicWord>();
+}
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base.gyp
@@ -0,0 +1,724 @@
+# 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.
+
+{
+  'variables': {
+    'chromium_code': 1,
+  },
+  'includes': [
+    '../build/common.gypi',
+  ],
+  'targets': [
+    {
+      'target_name': 'base',
+      'type': '<(library)',
+      'dependencies': [
+        '../third_party/icu38/icu38.gyp:icui18n',
+        '../third_party/icu38/icu38.gyp:icuuc',
+      ],
+      'msvs_guid': '1832A374-8A74-4F9E-B536-69A699B3E165',
+      'sources': [
+        '../build/build_config.h',
+        'crypto/cssm_init.cc',
+        'crypto/cssm_init.h',
+        'crypto/signature_verifier.h',
+        'crypto/signature_verifier_mac.cc',
+        'crypto/signature_verifier_nss.cc',
+        'crypto/signature_verifier_win.cc',
+        'third_party/dmg_fp/dmg_fp.h',
+        'third_party/dmg_fp/dtoa.cc',
+        'third_party/dmg_fp/g_fmt.cc',
+        'third_party/nspr/prcpucfg.h',
+        'third_party/nspr/prcpucfg_win.h',
+        'third_party/nspr/prtime.cc',
+        'third_party/nspr/prtime.h',
+        'third_party/nspr/prtypes.h',
+        'third_party/nss/blapi.h',
+        'third_party/nss/blapit.h',
+        'third_party/nss/sha256.h',
+        'third_party/nss/sha512.cc',
+        'third_party/purify/pure.h',
+        'third_party/purify/pure_api.c',
+        'atomicops_internals_x86_gcc.cc',
+        'at_exit.cc',
+        'at_exit.h',
+        'atomic_ref_count.h',
+        'atomic_sequence_num.h',
+        'atomicops.h',
+        'atomicops_internals_x86_msvc.h',
+        'base_drag_source.cc',
+        'base_drag_source.h',
+        'base_drop_target.cc',
+        'base_drop_target.h',
+        'base_paths.cc',
+        'base_paths.h',
+        'base_paths_linux.h',
+        'base_paths_linux.cc',
+        'base_paths_mac.h',
+        'base_paths_mac.mm',
+        'base_paths_win.cc',
+        'base_paths_win.h',
+        'base_switches.cc',
+        'base_switches.h',
+        'basictypes.h',
+        'bzip2_error_handler.cc',
+        'clipboard.cc',
+        'clipboard.h',
+        'clipboard_linux.cc',
+        'clipboard_mac.mm',
+        'clipboard_util.cc',
+        'clipboard_util.h',
+        'clipboard_win.cc',
+        'command_line.cc',
+        'command_line.h',
+        'compiler_specific.h',
+        'condition_variable.h',
+        'condition_variable_posix.cc',
+        'condition_variable_win.cc',
+        'cpu.cc',
+        'cpu.h',
+        'data_pack.cc',
+        'debug_on_start.cc',
+        'debug_on_start.h',
+        'debug_util.cc',
+        'debug_util.h',
+        'debug_util_mac.cc',
+        'debug_util_posix.cc',
+        'debug_util_win.cc',
+        'directory_watcher.h',
+        'directory_watcher_inotify.cc',
+        'directory_watcher_mac.cc',
+        'directory_watcher_win.cc',
+        'event_recorder.cc',
+        'event_recorder.h',
+        'event_recorder_stubs.cc',
+        'field_trial.cc',
+        'field_trial.h',
+        'file_descriptor_shuffle.cc',
+        'file_descriptor_shuffle.h',
+        'file_path.cc',
+        'file_path.h',
+        'file_util.cc',
+        'file_util.h',
+        'file_util_icu.cc',
+        'file_util_linux.cc',
+        'file_util_mac.mm',
+        'file_util_posix.cc',
+        'file_util_win.cc',
+        'file_version_info.cc',
+        'file_version_info.h',
+        'file_version_info_linux.cc',
+        'file_version_info_mac.mm',
+        'fix_wp64.h',
+        'float_util.h',
+        'foundation_utils_mac.h',
+        'hash_tables.h',
+        'histogram.cc',
+        'histogram.h',
+        'hmac.h',
+        'hmac_mac.cc',
+        'hmac_nss.cc',
+        'hmac_win.cc',
+        'iat_patch.cc',
+        'iat_patch.h',
+        'icu_util.cc',
+        'icu_util.h',
+        'id_map.h',
+        'idle_timer.cc',
+        'idle_timer.h',
+        'idle_timer_none.cc',
+        'image_util.cc',
+        'image_util.h',
+        'json_reader.cc',
+        'json_reader.h',
+        'json_writer.cc',
+        'json_writer.h',
+        'keyboard_codes.h',
+        'keyboard_codes_win.h',
+        'lazy_instance.cc',
+        'lazy_instance.h',
+        'linked_ptr.h',
+        'linux_util.cc',
+        'linux_util.h',
+        'lock.cc',
+        'lock.h',
+        'lock_impl.h',
+        'lock_impl_posix.cc',
+        'lock_impl_win.cc',
+        'logging.cc',
+        'logging.h',
+        'mac_util.h',
+        'mac_util.mm',
+        'md5.cc',
+        'md5.h',
+        'memory_debug.cc',
+        'memory_debug.h',
+        'message_loop.cc',
+        'message_loop.h',
+        'message_pump.h',
+        'message_pump_default.cc',
+        'message_pump_default.h',
+        'message_pump_glib.cc',
+        'message_pump_glib.h',
+        'message_pump_libevent.cc',
+        'message_pump_libevent.h',
+        'message_pump_mac.h',
+        'message_pump_mac.mm',
+        'message_pump_win.cc',
+        'message_pump_win.h',
+        'native_library.h',
+        'native_library_linux.cc',
+        'native_library_mac.mm',
+        'native_library_win.cc',
+        'non_thread_safe.cc',
+        'non_thread_safe.h',
+        'nss_init.cc',
+        'nss_init.h',
+        'object_watcher.cc',
+        'object_watcher.h',
+        'observer_list.h',
+        'observer_list_threadsafe.h',
+        'path_service.cc',
+        'path_service.h',
+        'pe_image.cc',
+        'pe_image.h',
+        'pickle.cc',
+        'pickle.h',
+        'platform_file.h',
+        'platform_file_win.cc',
+        'platform_file_posix.cc',
+        'platform_thread.h',
+        'platform_thread_mac.mm',
+        'platform_thread_posix.cc',
+        'platform_thread_win.cc',
+        'port.h',
+        'profiler.cc',
+        'profiler.h',
+        'process.h',
+        'process_posix.cc',
+        'process_util.h',
+        'process_util_linux.cc',
+        'process_util_mac.mm',
+        'process_util_posix.cc',
+        'process_util_win.cc',
+        'process_win.cc',
+        'rand_util.cc',
+        'rand_util.h',
+        'rand_util_posix.cc',
+        'rand_util_win.cc',
+        'ref_counted.cc',
+        'ref_counted.h',
+        'registry.cc',
+        'registry.h',
+        'resource_util.cc',
+        'resource_util.h',
+        'revocable_store.cc',
+        'revocable_store.h',
+        'scoped_bstr_win.cc',
+        'scoped_bstr_win.h',
+        'scoped_cftyperef.h',
+        'scoped_clipboard_writer.cc',
+        'scoped_clipboard_writer.h',
+        'scoped_comptr_win.h',
+        'scoped_handle.h',
+        'scoped_handle_win.h',
+        'scoped_nsautorelease_pool.h',
+        'scoped_nsautorelease_pool.mm',
+        'scoped_nsobject.h',
+        'scoped_ptr.h',
+        'scoped_temp_dir.cc',
+        'scoped_temp_dir.h',
+        'scoped_variant_win.cc',
+        'scoped_variant_win.h',
+        'scoped_vector.h',
+        'sha2.cc',
+        'sha2.h',
+        'shared_memory.h',
+        'shared_memory_posix.cc',
+        'shared_memory_win.cc',
+        'simple_thread.cc',
+        'simple_thread.h',
+        'singleton.h',
+        'spin_wait.h',
+        'stack_container.h',
+        'stats_counters.h',
+        'stats_table.cc',
+        'stats_table.h',
+        'stl_util-inl.h',
+        'string16.cc',
+        'string16.h',
+        'string_escape.cc',
+        'string_escape.h',
+        'string_piece.cc',
+        'string_piece.h',
+        'string_tokenizer.h',
+        'string_util.cc',
+        'string_util.h',
+        'string_util_icu.cc',
+        'string_util_win.h',
+        'sys_info.h',
+        'sys_info_mac.cc',
+        'sys_info_posix.cc',
+        'sys_info_win.cc',
+        'sys_string_conversions.h',
+        'sys_string_conversions_linux.cc',
+        'sys_string_conversions_mac.mm',
+        'sys_string_conversions_win.cc',
+        'system_monitor.cc',
+        'system_monitor.h',
+        'system_monitor_posix.cc',
+        'system_monitor_win.cc',
+        'task.h',
+        'test_file_util.h',
+        'test_file_util_linux.cc',
+        'test_file_util_mac.cc',
+        'test_file_util_posix.cc',
+        'test_file_util_win.cc',
+        'thread.cc',
+        'thread.h',
+        'thread_collision_warner.cc',
+        'thread_collision_warner.h',
+        'thread_local.h',
+        'thread_local_posix.cc',
+        'thread_local_storage.h',
+        'thread_local_storage_posix.cc',
+        'thread_local_storage_win.cc',
+        'thread_local_win.cc',
+        'time.cc',
+        'time.h',
+        'time_format.cc',
+        'time_format.h',
+        'time_mac.cc',
+        'time_posix.cc',
+        'time_win.cc',
+        'timer.cc',
+        'timer.h',
+        'trace_event.cc',
+        'trace_event.h',
+        'tracked.cc',
+        'tracked.h',
+        'tracked_objects.cc',
+        'tracked_objects.h',
+        'tuple.h',
+        'values.cc',
+        'values.h',
+        'version.cc',
+        'version.h',
+        'waitable_event.h',
+        'waitable_event_posix.cc',
+        'waitable_event_watcher.h',
+        'waitable_event_watcher_posix.cc',
+        'waitable_event_watcher_win.cc',
+        'waitable_event_win.cc',
+        'watchdog.cc',
+        'watchdog.h',
+        'win_util.cc',
+        'win_util.h',
+        'windows_message_list.h',
+        'wmi_util.cc',
+        'wmi_util.h',
+        'word_iterator.cc',
+        'word_iterator.h',
+        'worker_pool.h',
+        'worker_pool_linux.cc',
+        'worker_pool_linux.h',
+        'worker_pool_mac.mm',
+        'worker_pool_win.cc',
+      ],
+      'include_dirs': [
+        '..',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          '..',
+        ],
+      },
+      # These warnings are needed for the files in third_party\dmg_fp.
+      'msvs_disabled_warnings': [
+        4244, 4554, 4018, 4102,
+      ],
+      'conditions': [
+        [ 'OS == "linux"', {
+            'actions': [
+              {
+                'action_name': 'linux_version',
+                'variables': {
+                  'template_input_path': 'file_version_info_linux.h.version',
+                  'template_output_path':
+                  '<(SHARED_INTERMEDIATE_DIR)/base/file_version_info_linux.h',
+                },
+                'inputs': [
+                  '<(template_input_path)',
+                  '../chrome/VERSION',
+                  '../chrome/tools/build/linux/version.sh',
+                ],
+                'conditions': [
+                  [ 'branding == "Chrome"', {
+                    'inputs': ['../chrome/app/theme/google_chrome/BRANDING']
+                    }, { # else branding!="Chrome"
+                    'inputs': ['../chrome/app/theme/chromium/BRANDING']
+                  }],
+                ],
+                'outputs': [
+                  # Use a non-existant output so this action always runs and
+                  # generates version information, e.g. to capture revision
+                  # changes, which aren't captured by file dependencies.
+                  '<(SHARED_INTERMEDIATE_DIR)/base/file_version_info_linux.bogus',
+                ],
+                'action': [
+                  '../chrome/tools/build/linux/version.sh',
+                  '<(template_input_path)', '<(template_output_path)',
+                ],
+              },
+            ],
+            'include_dirs': [
+              '<(SHARED_INTERMEDIATE_DIR)',
+            ],
+            'sources/': [ ['exclude', '_(mac|win)\\.cc$'],
+                          ['exclude', '\\.mm?$' ] ],
+            'sources!': [
+              # Linux has an implementation of idle_timer that depends
+              # on XScreenSaver, but it's unclear if we want it yet,
+              # so use idle_timer_none.cc instead.
+              'idle_timer.cc',
+            ],
+            'dependencies': [
+              '../build/linux/system.gyp:gtk',
+              '../build/linux/system.gyp:nss',
+            ],
+            'cflags': [
+              '-Wno-write-strings',
+            ],
+            'link_settings': {
+              'libraries': [
+                # We need rt for clock_gettime().
+                '-lrt',
+              ],
+            },
+          },
+          {  # else: OS != "linux"
+            'sources!': [
+              'crypto/signature_verifier_nss.cc',
+              'atomicops_internals_x86_gcc.cc',
+              'directory_watcher_inotify.cc',
+              'hmac_nss.cc',
+              'idle_timer_none.cc',
+              'linux_util.cc',
+              'message_pump_glib.cc',
+              'nss_init.cc',
+              'nss_init.h',
+              'time_posix.cc',
+            ],
+          }
+        ],
+        [ 'GENERATOR == "quentin"', {
+            # Quentin builds don't have a recent enough glibc to include the
+            # inotify headers
+            'sources!': [
+              'directory_watcher_inotify.cc',
+            ],
+            'sources': [
+              'directory_watcher_stub.cc',
+            ],
+          },
+        ],
+        [ 'OS == "mac"', {
+            'sources/': [ ['exclude', '_(linux|win)\\.cc$'] ],
+            'sources!': [
+            ],
+            'link_settings': {
+              'libraries': [
+                '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
+                '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
+                '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
+                '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
+                '$(SDKROOT)/System/Library/Frameworks/Security.framework',
+              ],
+            },
+          },
+          {  # else: OS != "mac"
+            'sources!': [
+              'crypto/cssm_init.cc',
+              'crypto/cssm_init.h',
+            ],
+          }
+        ],
+        [ 'OS == "win"', {
+            'sources/': [ ['exclude', '_(linux|mac|posix)\\.cc$'],
+                          ['exclude', '\\.mm?$' ] ],
+            'sources!': [
+              'data_pack.cc',
+              'event_recorder_stubs.cc',
+              'file_descriptor_shuffle.cc',
+              'message_pump_libevent.cc',
+              'string16.cc',
+            ],
+          },
+          {  # else: OS != "win"
+            'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
+            'sources!': [
+              'third_party/purify/pure_api.c',
+              'base_drag_source.cc',
+              'base_drop_target.cc',
+              'cpu.cc',
+              'clipboard_util.cc',
+              'debug_on_start.cc',
+              'event_recorder.cc',
+              'file_version_info.cc',
+              'iat_patch.cc',
+              'image_util.cc',
+              'object_watcher.cc',
+              'pe_image.cc',
+              'registry.cc',
+              'resource_util.cc',
+              'win_util.cc',
+              'wmi_util.cc',
+            ],
+          },
+        ],
+      ],
+    },
+    {
+      'target_name': 'base_gfx',
+      'type': '<(library)',
+      'msvs_guid': 'A508ADD3-CECE-4E0F-8448-2F5E454DF551',
+      'sources': [
+        'gfx/gdi_util.cc',
+        'gfx/gdi_util.h',
+        'gfx/gtk_native_view_id_manager.cc',
+        'gfx/gtk_native_view_id_manager.h',
+        'gfx/gtk_util.cc',
+        'gfx/gtk_util.h',
+        'gfx/jpeg_codec.cc',
+        'gfx/jpeg_codec.h',
+        'gfx/native_theme.cc',
+        'gfx/native_theme.h',
+        'gfx/native_widget_types.h',
+        'gfx/native_widget_types_gtk.cc',
+        'gfx/platform_canvas.h',
+        'gfx/platform_canvas_linux.h',
+        'gfx/platform_canvas_mac.h',
+        'gfx/platform_device_linux.h',
+        'gfx/platform_device_mac.h',
+        'gfx/png_decoder.cc',
+        'gfx/png_decoder.h',
+        'gfx/png_encoder.cc',
+        'gfx/png_encoder.h',
+        'gfx/point.cc',
+        'gfx/point.h',
+        'gfx/rect.cc',
+        'gfx/rect.h',
+        'gfx/size.cc',
+        'gfx/size.h',
+      ],
+      'mac_framework_dirs': [
+        '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
+      ],
+      'dependencies': [
+        'base',
+        '../skia/skia.gyp:skia',
+        '../third_party/libjpeg/libjpeg.gyp:libjpeg',
+        '../third_party/libpng/libpng.gyp:libpng',
+        '../third_party/zlib/zlib.gyp:zlib',
+      ],
+      'export_dependent_settings': [
+        'base',
+      ],
+      'conditions': [
+        ['OS == "linux"', {
+          'dependencies': [
+            '../build/linux/system.gyp:gtk',
+          ],
+        }],
+        [ 'OS != "win"', { 'sources!': [
+            'gfx/gdi_util.cc',
+            'gfx/native_theme.cc',
+            ],
+        }],
+        [ 'OS != "linux"', { 'sources!': [
+            'gfx/gtk_native_view_id_manager.cc',
+            'gfx/gtk_util.cc',
+            'gfx/native_widget_types_gtk.cc',
+            ],
+        }],
+      ],
+    },
+    {
+      'target_name': 'base_unittests',
+      'type': 'executable',
+      'msvs_guid': '27A30967-4BBA-48D1-8522-CDE95F7B1CEC',
+      'sources': [
+        'crypto/signature_verifier_unittest.cc',
+        'gfx/jpeg_codec_unittest.cc',
+        'gfx/native_theme_unittest.cc',
+        'gfx/png_codec_unittest.cc',
+        'gfx/rect_unittest.cc',
+        'at_exit_unittest.cc',
+        'atomicops_unittest.cc',
+        'clipboard_unittest.cc',
+        'command_line_unittest.cc',
+        'condition_variable_unittest.cc',
+        'data_pack_unittest.cc',
+        'debug_util_unittest.cc',
+        'directory_watcher_unittest.cc',
+        'field_trial_unittest.cc',
+        'file_descriptor_shuffle_unittest.cc',
+        'file_path_unittest.cc',
+        'file_util_unittest.cc',
+        'file_version_info_unittest.cc',
+        'histogram_unittest.cc',
+        'hmac_unittest.cc',
+        'idletimer_unittest.cc',
+        'json_reader_unittest.cc',
+        'json_writer_unittest.cc',
+        'lazy_instance_unittest.cc',
+        'linked_ptr_unittest.cc',
+        'mac_util_unittest.cc',
+        'message_loop_unittest.cc',
+        'object_watcher_unittest.cc',
+        'observer_list_unittest.cc',
+        'path_service_unittest.cc',
+        'pe_image_unittest.cc',
+        'pickle_unittest.cc',
+        'pr_time_unittest.cc',
+        'process_util_unittest.cc',
+        'rand_util_unittest.cc',
+        'ref_counted_unittest.cc',
+        'run_all_unittests.cc',
+        'scoped_bstr_win_unittest.cc',
+        'scoped_comptr_win_unittest.cc',
+        'scoped_ptr_unittest.cc',
+        'scoped_temp_dir_unittest.cc',
+        'scoped_variant_win_unittest.cc',
+        'sha2_unittest.cc',
+        'shared_memory_unittest.cc',
+        'simple_thread_unittest.cc',
+        'singleton_unittest.cc',
+        'stack_container_unittest.cc',
+        'stats_table_unittest.cc',
+        'string_escape_unittest.cc',
+        'string_piece_unittest.cc',
+        'string_tokenizer_unittest.cc',
+        'string_util_unittest.cc',
+        'sys_info_unittest.cc',
+        'sys_string_conversions_unittest.cc',
+        'system_monitor_unittest.cc',
+        'thread_collision_warner_unittest.cc',
+        'thread_local_storage_unittest.cc',
+        'thread_local_unittest.cc',
+        'thread_unittest.cc',
+        'time_unittest.cc',
+        'time_win_unittest.cc',
+        'timer_unittest.cc',
+        'tracked_objects_unittest.cc',
+        'tuple_unittest.cc',
+        'values_unittest.cc',
+        'version_unittest.cc',
+        'waitable_event_unittest.cc',
+        'waitable_event_watcher_unittest.cc',
+        'watchdog_unittest.cc',
+        'win_util_unittest.cc',
+        'wmi_util_unittest.cc',
+        'word_iterator_unittest.cc',
+        'worker_pool_unittest.cc',
+      ],
+      'include_dirs': [
+        # word_iterator.h (used by word_iterator_unittest.cc) leaks an ICU
+        # #include for unicode/uchar.h.  This should probably be cleaned up.
+        '../third_party/icu38/public/common',
+      ],
+      'dependencies': [
+        'base',
+        'base_gfx',
+        '../skia/skia.gyp:skia',
+        '../testing/gtest.gyp:gtest',
+      ],
+      'conditions': [
+        ['OS == "linux"', {
+          'sources!': [
+            'file_version_info_unittest.cc',
+            # Linux has an implementation of idle_timer, but it's unclear
+            # if we want it yet, so leave it 'unported' for now.
+            'idletimer_unittest.cc',
+            'worker_pool_linux_unittest.cc',
+          ],
+          'dependencies': [
+            '../build/linux/system.gyp:gtk',
+            '../build/linux/system.gyp:nss',
+          ],
+        }],
+        ['OS != "mac"', {
+          'sources!': [
+            'mac_util_unittest.cc',
+          ],
+        }],
+        # This is needed to trigger the dll copy step on windows.
+        # TODO(mark): This should not be necessary.
+        ['OS == "win"', {
+          'dependencies': [
+            '../third_party/icu38/icu38.gyp:icudata',
+          ],
+          'sources!': [
+            'data_pack_unittest.cc',
+            'file_descriptor_shuffle_unittest.cc',
+          ],
+        }, {  # OS != "win"
+          'sources!': [
+            'gfx/native_theme_unittest.cc',
+            'object_watcher_unittest.cc',
+            'pe_image_unittest.cc',
+            'scoped_bstr_win_unittest.cc',
+            'scoped_comptr_win_unittest.cc',
+            'scoped_variant_win_unittest.cc',
+            'system_monitor_unittest.cc',
+            'time_win_unittest.cc',
+            'win_util_unittest.cc',
+            'wmi_util_unittest.cc',
+          ],
+        }],
+      ],
+    },
+    {
+      'target_name': 'test_support_base',
+      'type': '<(library)',
+      'dependencies': [
+        'base',
+        '../testing/gtest.gyp:gtest',
+      ],
+      'sources': [
+        'perftimer.cc',
+        'run_all_perftests.cc',
+      ],
+      'direct_dependent_settings': {
+        'defines': [
+          'PERF_TEST',
+        ],
+      },
+      'conditions': [
+        ['OS == "linux"', {
+          'dependencies': [
+            # Needed to handle the #include chain:
+            #   base/perf_test_suite.h
+            #   base/test_suite.h
+            #   gtk/gtk.h
+            '../build/linux/system.gyp:gtk',
+          ],
+        }],
+      ],
+    },
+  ],
+  'conditions': [
+    [ 'OS == "win"', {
+      'targets': [
+        {
+          'target_name': 'debug_message',
+          'type': 'executable',
+          'sources': [
+            'debug_message.cc',
+          ],
+        },
+      ],
+    }],
+  ],
+}
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_drag_source.cc
@@ -0,0 +1,60 @@
+// 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 "base/base_drag_source.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// BaseDragSource, public:
+
+BaseDragSource::BaseDragSource() : ref_count_(0) {
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// BaseDragSource, IDropSource implementation:
+
+HRESULT BaseDragSource::QueryContinueDrag(BOOL escape_pressed,
+                                          DWORD key_state) {
+  if (escape_pressed) {
+    OnDragSourceCancel();
+    return DRAGDROP_S_CANCEL;
+  }
+
+  if (!(key_state & MK_LBUTTON)) {
+    OnDragSourceDrop();
+    return DRAGDROP_S_DROP;
+  }
+
+  OnDragSourceMove();
+  return S_OK;
+}
+
+HRESULT BaseDragSource::GiveFeedback(DWORD effect) {
+  return DRAGDROP_S_USEDEFAULTCURSORS;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// BaseDragSource, IUnknown implementation:
+
+HRESULT BaseDragSource::QueryInterface(const IID& iid, void** object) {
+  *object = NULL;
+  if (IsEqualIID(iid, IID_IUnknown) || IsEqualIID(iid, IID_IDropSource)) {
+    *object = this;
+  } else {
+    return E_NOINTERFACE;
+  }
+  AddRef();
+  return S_OK;
+}
+
+ULONG BaseDragSource::AddRef() {
+  return ++ref_count_;
+}
+
+ULONG BaseDragSource::Release() {
+  if (--ref_count_ == 0) {
+    delete this;
+    return 0U;
+  }
+  return ref_count_;
+}
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_drag_source.h
@@ -0,0 +1,46 @@
+// 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 BASE_BASE_DRAG_SOURCE_H_
+#define BASE_BASE_DRAG_SOURCE_H_
+
+#include <objidl.h>
+
+#include "base/basictypes.h"
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// BaseDragSource
+//
+//  A base IDropSource implementation. Handles notifications sent by an active
+//  drag-drop operation as the user mouses over other drop targets on their
+//  system. This object tells Windows whether or not the drag should continue,
+//  and supplies the appropriate cursors.
+//
+class BaseDragSource : public IDropSource {
+ public:
+  BaseDragSource();
+  virtual ~BaseDragSource() { }
+
+  // IDropSource implementation:
+  HRESULT __stdcall QueryContinueDrag(BOOL escape_pressed, DWORD key_state);
+  HRESULT __stdcall GiveFeedback(DWORD effect);
+
+  // IUnknown implementation:
+  HRESULT __stdcall QueryInterface(const IID& iid, void** object);
+  ULONG __stdcall AddRef();
+  ULONG __stdcall Release();
+
+ protected:
+  virtual void OnDragSourceCancel() { }
+  virtual void OnDragSourceDrop() { }
+  virtual void OnDragSourceMove() { }
+
+ private:
+  LONG ref_count_;
+
+  DISALLOW_EVIL_CONSTRUCTORS(BaseDragSource);
+};
+
+#endif  // BASE_BASE_DRAG_SOURCE_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_drop_target.cc
@@ -0,0 +1,167 @@
+// 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 "base/base_drop_target.h"
+
+#include <shlobj.h>
+
+#include "base/logging.h"
+
+///////////////////////////////////////////////////////////////////////////////
+
+IDropTargetHelper* BaseDropTarget::cached_drop_target_helper_ = NULL;
+int32 BaseDropTarget::drag_identity_ = 0;
+
+BaseDropTarget::BaseDropTarget(HWND hwnd)
+    : hwnd_(hwnd),
+      suspend_(false),
+      ref_count_(0) {
+  DCHECK(hwnd);
+  HRESULT result = RegisterDragDrop(hwnd, this);
+  DCHECK(SUCCEEDED(result));
+}
+
+BaseDropTarget::~BaseDropTarget() {
+}
+
+// static
+IDropTargetHelper* BaseDropTarget::DropHelper() {
+  if (!cached_drop_target_helper_) {
+    CoCreateInstance(CLSID_DragDropHelper, 0, CLSCTX_INPROC_SERVER,
+                     IID_IDropTargetHelper,
+                     reinterpret_cast<void**>(&cached_drop_target_helper_));
+  }
+  return cached_drop_target_helper_;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// BaseDropTarget, IDropTarget implementation:
+
+HRESULT BaseDropTarget::DragEnter(IDataObject* data_object,
+                                  DWORD key_state,
+                                  POINTL cursor_position,
+                                  DWORD* effect) {
+  // Tell the helper that we entered so it can update the drag image.
+  IDropTargetHelper* drop_helper = DropHelper();
+  if (drop_helper) {
+    drop_helper->DragEnter(GetHWND(), data_object,
+                           reinterpret_cast<POINT*>(&cursor_position), *effect);
+  }
+
+  // You can't drag and drop within the same HWND.
+  if (suspend_) {
+    *effect = DROPEFFECT_NONE;
+    return S_OK;
+  }
+
+  // Update the drag identity, skipping 0.
+  if (++drag_identity_ == 0)
+    ++drag_identity_;
+
+  current_data_object_ = data_object;
+  POINT screen_pt = { cursor_position.x, cursor_position.y };
+  *effect = OnDragEnter(current_data_object_, key_state, screen_pt, *effect);
+  return S_OK;
+}
+
+HRESULT BaseDropTarget::DragOver(DWORD key_state,
+                                 POINTL cursor_position,
+                                 DWORD* effect) {
+  // Tell the helper that we moved over it so it can update the drag image.
+  IDropTargetHelper* drop_helper = DropHelper();
+  if (drop_helper)
+    drop_helper->DragOver(reinterpret_cast<POINT*>(&cursor_position), *effect);
+
+  if (suspend_) {
+    *effect = DROPEFFECT_NONE;
+    return S_OK;
+  }
+
+  POINT screen_pt = { cursor_position.x, cursor_position.y };
+  *effect = OnDragOver(current_data_object_, key_state, screen_pt, *effect);
+  return S_OK;
+}
+
+HRESULT BaseDropTarget::DragLeave() {
+  // Tell the helper that we moved out of it so it can update the drag image.
+  IDropTargetHelper* drop_helper = DropHelper();
+  if (drop_helper)
+    drop_helper->DragLeave();
+
+  OnDragLeave(current_data_object_);
+
+  current_data_object_ = NULL;
+  return S_OK;
+}
+
+HRESULT BaseDropTarget::Drop(IDataObject* data_object,
+                             DWORD key_state,
+                             POINTL cursor_position,
+                             DWORD* effect) {
+  // Tell the helper that we dropped onto it so it can update the drag image.
+  IDropTargetHelper* drop_helper = DropHelper();
+  if (drop_helper) {
+    drop_helper->Drop(current_data_object_,
+                      reinterpret_cast<POINT*>(&cursor_position), *effect);
+  }
+
+  if (suspend_) {
+    *effect = DROPEFFECT_NONE;
+    return S_OK;
+  }
+
+  POINT screen_pt = { cursor_position.x, cursor_position.y };
+  *effect = OnDrop(current_data_object_, key_state, screen_pt, *effect);
+  return S_OK;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// BaseDropTarget, IUnknown implementation:
+
+HRESULT BaseDropTarget::QueryInterface(const IID& iid, void** object) {
+  *object = NULL;
+  if (IsEqualIID(iid, IID_IUnknown) || IsEqualIID(iid, IID_IDropTarget)) {
+    *object = this;
+  } else {
+    return E_NOINTERFACE;
+  }
+  AddRef();
+  return S_OK;
+}
+
+ULONG BaseDropTarget::AddRef() {
+  return ++ref_count_;
+}
+
+ULONG BaseDropTarget::Release() {
+  if (--ref_count_ == 0) {
+    delete this;
+    return 0U;
+  }
+  return ref_count_;
+}
+
+DWORD BaseDropTarget::OnDragEnter(IDataObject* data_object,
+                                  DWORD key_state,
+                                  POINT cursor_position,
+                                  DWORD effect) {
+  return DROPEFFECT_NONE;
+}
+
+DWORD BaseDropTarget::OnDragOver(IDataObject* data_object,
+                                 DWORD key_state,
+                                 POINT cursor_position,
+                                 DWORD effect) {
+  return DROPEFFECT_NONE;
+}
+
+void BaseDropTarget::OnDragLeave(IDataObject* data_object) {
+}
+
+DWORD BaseDropTarget::OnDrop(IDataObject* data_object,
+                             DWORD key_state,
+                             POINT cursor_position,
+                             DWORD effect) {
+  return DROPEFFECT_NONE;
+}
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_drop_target.h
@@ -0,0 +1,130 @@
+// 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 BASE_BASE_DROP_TARGET_H_
+#define BASE_BASE_DROP_TARGET_H_
+
+#include <objidl.h>
+
+#include "base/ref_counted.h"
+
+struct IDropTargetHelper;
+
+// A DropTarget implementation that takes care of the nitty gritty
+// of dnd. While this class is concrete, subclasses will most likely
+// want to override various OnXXX methods.
+//
+// Because BaseDropTarget is ref counted you shouldn't delete it directly,
+// rather wrap it in a scoped_refptr. Be sure and invoke RevokeDragDrop(m_hWnd)
+// before the HWND is deleted too.
+//
+// This class is meant to be used in a STA and is not multithread-safe.
+class BaseDropTarget : public IDropTarget {
+ public:
+  // Create a new BaseDropTarget associating it with the given HWND.
+  explicit BaseDropTarget(HWND hwnd);
+  virtual ~BaseDropTarget();
+
+  // When suspend is set to |true|, the drop target does not receive drops from
+  // drags initiated within the owning HWND.
+  // TODO(beng): (http://b/1085385) figure out how we will handle legitimate
+  //             drag-drop operations within the same HWND, such as dragging
+  //             selected text to an edit field.
+  void set_suspend(bool suspend) { suspend_ = suspend; }
+
+  // IDropTarget implementation:
+  HRESULT __stdcall DragEnter(IDataObject* data_object,
+                              DWORD key_state,
+                              POINTL cursor_position,
+                              DWORD* effect);
+  HRESULT __stdcall DragOver(DWORD key_state,
+                             POINTL cursor_position,
+                             DWORD* effect);
+  HRESULT __stdcall DragLeave();
+  HRESULT __stdcall Drop(IDataObject* data_object,
+                         DWORD key_state,
+                         POINTL cursor_position,
+                         DWORD* effect);
+
+  // IUnknown implementation:
+  HRESULT __stdcall QueryInterface(const IID& iid, void** object);
+  ULONG __stdcall AddRef();
+  ULONG __stdcall Release();
+
+ protected:
+  // Returns the hosting HWND.
+  HWND GetHWND() { return hwnd_; }
+
+  // Invoked when the cursor first moves over the hwnd during a dnd session.
+  // This should return a bitmask of the supported drop operations:
+  // DROPEFFECT_NONE, DROPEFFECT_COPY, DROPEFFECT_LINK and/or
+  // DROPEFFECT_MOVE.
+  virtual DWORD OnDragEnter(IDataObject* data_object,
+                            DWORD key_state,
+                            POINT cursor_position,
+                            DWORD effect);
+
+  // Invoked when the cursor moves over the window during a dnd session.
+  // This should return a bitmask of the supported drop operations:
+  // DROPEFFECT_NONE, DROPEFFECT_COPY, DROPEFFECT_LINK and/or
+  // DROPEFFECT_MOVE.
+  virtual DWORD OnDragOver(IDataObject* data_object,
+                           DWORD key_state,
+                           POINT cursor_position,
+                           DWORD effect);
+
+  // Invoked when the cursor moves outside the bounds of the hwnd during a
+  // dnd session.
+  virtual void OnDragLeave(IDataObject* data_object);
+
+  // Invoked when the drop ends on the window. This should return the operation
+  // that was taken.
+  virtual DWORD OnDrop(IDataObject* data_object,
+                       DWORD key_state,
+                       POINT cursor_position,
+                       DWORD effect);
+
+  // Return the drag identity.
+  static int32 GetDragIdentity() { return drag_identity_; }
+
+ private:
+  // Returns the cached drop helper, creating one if necessary. The returned
+  // object is not addrefed. May return NULL if the object couldn't be created.
+  static IDropTargetHelper* DropHelper();
+
+  // The data object currently being dragged over this drop target.
+  scoped_refptr<IDataObject> current_data_object_;
+
+  // A helper object that is used to provide drag image support while the mouse
+  // is dragging over the content area.
+  //
+  // DO NOT ACCESS DIRECTLY! Use DropHelper() instead, which will lazily create
+  // this if it doesn't exist yet. This object can take tens of milliseconds to
+  // create, and we don't want to block any window opening for this, especially
+  // since often, DnD will never be used. Instead, we force this penalty to the
+  // first time it is actually used.
+  static IDropTargetHelper* cached_drop_target_helper_;
+
+  // The drag identity (id). An up-counter that increases when the cursor first
+  // moves over the HWND in a DnD session (OnDragEnter). 0 is reserved to mean
+  // the "no/unknown" identity, and is used for initialization. The identity is
+  // sent to the renderer in drag enter notifications. Note: the identity value
+  // is passed over the renderer NPAPI interface to gears, so use int32 instead
+  // of int here.
+  static int32 drag_identity_;
+
+  // The HWND of the source. This HWND is used to determine coordinates for
+  // mouse events that are sent to the renderer notifying various drag states.
+  HWND hwnd_;
+
+  // Whether or not we are currently processing drag notifications for drags
+  // initiated in this window.
+  bool suspend_;
+
+  LONG ref_count_;
+
+  DISALLOW_EVIL_CONSTRUCTORS(BaseDropTarget);
+};
+
+#endif  // BASE_BASE_DROP_TARGET_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths.cc
@@ -0,0 +1,38 @@
+// 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 "base/base_paths.h"
+
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/path_service.h"
+
+namespace base {
+
+bool PathProvider(int key, FilePath* result) {
+  // NOTE: DIR_CURRENT is a special cased in PathService::Get
+
+  FilePath cur;
+  switch (key) {
+    case base::DIR_EXE:
+      PathService::Get(base::FILE_EXE, &cur);
+      cur = cur.DirName();
+      break;
+    case base::DIR_MODULE:
+      PathService::Get(base::FILE_MODULE, &cur);
+      cur = cur.DirName();
+      break;
+    case base::DIR_TEMP:
+      if (!file_util::GetTempDir(&cur))
+        return false;
+      break;
+    default:
+      return false;
+  }
+
+  *result = cur;
+  return true;
+}
+
+}  // namespace base
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths.h
@@ -0,0 +1,35 @@
+// 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 BASE_BASE_PATHS_H_
+#define BASE_BASE_PATHS_H_
+
+// This file declares path keys for the base module.  These can be used with
+// the PathService to access various special directories and files.
+
+#include "base/basictypes.h"
+#if defined(OS_WIN)
+#include "base/base_paths_win.h"
+#elif defined(OS_MACOSX)
+#include "base/base_paths_mac.h"
+#elif defined(OS_LINUX)
+#include "base/base_paths_linux.h"
+#endif
+#include "base/path_service.h"
+
+namespace base {
+
+enum {
+  PATH_START = 0,
+
+  DIR_CURRENT,  // current directory
+  DIR_EXE,      // directory containing FILE_EXE
+  DIR_MODULE,   // directory containing FILE_MODULE
+  DIR_TEMP,     // temporary directory
+  PATH_END
+};
+
+}  // namespace base
+
+#endif  // BASE_BASE_PATHS_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths_linux.cc
@@ -0,0 +1,46 @@
+// 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 "base/base_paths_linux.h"
+
+#include <unistd.h>
+
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/logging.h"
+#include "base/path_service.h"
+#include "base/string_piece.h"
+#include "base/sys_string_conversions.h"
+
+namespace base {
+
+bool PathProviderLinux(int key, FilePath* result) {
+  FilePath path;
+  switch (key) {
+    case base::FILE_EXE:
+    case base::FILE_MODULE: { // TODO(evanm): is this correct?
+      char bin_dir[PATH_MAX + 1];
+      int bin_dir_size = readlink("/proc/self/exe", bin_dir, PATH_MAX);
+      if (bin_dir_size < 0 || bin_dir_size > PATH_MAX) {
+        NOTREACHED() << "Unable to resolve /proc/self/exe.";
+        return false;
+      }
+      bin_dir[bin_dir_size] = 0;
+      *result = FilePath(bin_dir);
+      return true;
+    }
+    case base::DIR_SOURCE_ROOT:
+      // On linux, unit tests execute two levels deep from the source root.
+      // For example:  sconsbuild/{Debug|Release}/net_unittest
+      if (!PathService::Get(base::DIR_EXE, &path))
+        return false;
+      path = path.Append(FilePath::kParentDirectory)
+                 .Append(FilePath::kParentDirectory);
+      *result = path;
+      return true;
+  }
+  return false;
+}
+
+}  // namespace base
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths_linux.h
@@ -0,0 +1,30 @@
+// 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 BASE_BASE_PATHS_LINUX_H_
+#define BASE_BASE_PATHS_LINUX_H_
+
+// This file declares Linux-specific path keys for the base module.
+// These can be used with the PathService to access various special
+// directories and files.
+
+namespace base {
+
+enum {
+  PATH_LINUX_START = 200,
+
+  FILE_EXE,     // Path and filename of the current executable.
+  FILE_MODULE,  // Path and filename of the module containing the code for the
+                // PathService (which could differ from FILE_EXE if the
+                // PathService were compiled into a shared object, for example).
+  DIR_SOURCE_ROOT,  // Returns the root of the source tree.  This key is useful
+                    // for tests that need to locate various resources.  It
+                    // should not be used outside of test code.
+
+  PATH_LINUX_END
+};
+
+}  // namespace base
+
+#endif  // BASE_BASE_PATHS_LINUX_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths_mac.h
@@ -0,0 +1,31 @@
+// 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 BASE_BASE_PATHS_MAC_H_
+#define BASE_BASE_PATHS_MAC_H_
+
+// This file declares Mac-specific path keys for the base module.
+// These can be used with the PathService to access various special
+// directories and files.
+
+namespace base {
+
+enum {
+  PATH_MAC_START = 200,
+
+  FILE_EXE,     // path and filename of the current executable
+  FILE_MODULE,  // path and filename of the module containing the code for the
+                // PathService (which could differ from FILE_EXE if the
+                // PathService were compiled into a library, for example)
+  DIR_APP_DATA,  // ~/Library/Application Support/Google/Chrome
+  DIR_LOCAL_APP_DATA,  // same as above (can we remove?)
+  DIR_SOURCE_ROOT,  // Returns the root of the source tree.  This key is useful
+                    // for tests that need to locate various resources.  It
+                    // should not be used outside of test code.
+  PATH_MAC_END
+};
+
+}  // namespace base
+
+#endif  // BASE_BASE_PATHS_MAC_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths_mac.mm
@@ -0,0 +1,58 @@
+// 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 "base/base_paths_mac.h"
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/logging.h"
+#include "base/mac_util.h"
+#include "base/path_service.h"
+#include "base/string_util.h"
+
+namespace base {
+
+bool PathProviderMac(int key, FilePath* result) {
+  std::string cur;
+  switch (key) {
+    case base::FILE_EXE:
+    case base::FILE_MODULE: {
+      // Executable path can have relative references ("..") depending on
+      // how the app was launched.
+      NSString* path =
+          [[[NSBundle mainBundle] executablePath] stringByStandardizingPath];
+      cur = [path fileSystemRepresentation];
+      break;
+    }
+    case base::DIR_SOURCE_ROOT: {
+      FilePath path;
+      PathService::Get(base::DIR_EXE, &path);
+      if (mac_util::AmIBundled()) {
+        // The bundled app executables (Chromium, TestShell, etc) live five
+        // levels down, eg:
+        // src/xcodebuild/{Debug|Release}/Chromium.app/Contents/MacOS/Chromium.
+        path = path.DirName();
+        path = path.DirName();
+        path = path.DirName();
+        path = path.DirName();
+        *result = path.DirName();
+      } else {
+        // Unit tests execute two levels deep from the source root, eg:
+        // src/xcodebuild/{Debug|Release}/base_unittests
+        path = path.DirName();
+        *result = path.DirName();
+      }
+      return true;
+    }
+    default:
+      return false;
+  }
+
+  *result = FilePath(cur);
+  return true;
+}
+
+}  // namespace base
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths_win.cc
@@ -0,0 +1,118 @@
+// 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 "base/base_paths_win.h"
+
+#include <windows.h>
+#include <shlobj.h>
+
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/path_service.h"
+#include "base/win_util.h"
+
+// http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx
+extern "C" IMAGE_DOS_HEADER __ImageBase;
+
+namespace base {
+
+bool PathProviderWin(int key, FilePath* result) {
+
+  // We need to go compute the value. It would be nice to support paths with
+  // names longer than MAX_PATH, but the system functions don't seem to be
+  // designed for it either, with the exception of GetTempPath (but other
+  // things will surely break if the temp path is too long, so we don't bother
+  // handling it.
+  wchar_t system_buffer[MAX_PATH];
+  system_buffer[0] = 0;
+
+  FilePath cur;
+  std::wstring wstring_path;
+  switch (key) {
+    case base::FILE_EXE:
+      GetModuleFileName(NULL, system_buffer, MAX_PATH);
+      cur = FilePath(system_buffer);
+      break;
+    case base::FILE_MODULE: {
+      // the resource containing module is assumed to be the one that
+      // this code lives in, whether that's a dll or exe
+      HMODULE this_module = reinterpret_cast<HMODULE>(&__ImageBase);
+      GetModuleFileName(this_module, system_buffer, MAX_PATH);
+      cur = FilePath(system_buffer);
+      break;
+    }
+    case base::DIR_WINDOWS:
+      GetWindowsDirectory(system_buffer, MAX_PATH);
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_SYSTEM:
+      GetSystemDirectory(system_buffer, MAX_PATH);
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_PROGRAM_FILES:
+      if (FAILED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
+                                 SHGFP_TYPE_CURRENT, system_buffer)))
+        return false;
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_IE_INTERNET_CACHE:
+      if (FAILED(SHGetFolderPath(NULL, CSIDL_INTERNET_CACHE, NULL,
+                                 SHGFP_TYPE_CURRENT, system_buffer)))
+        return false;
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_COMMON_START_MENU:
+      if (FAILED(SHGetFolderPath(NULL, CSIDL_COMMON_PROGRAMS, NULL,
+                                 SHGFP_TYPE_CURRENT, system_buffer)))
+        return false;
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_START_MENU:
+      if (FAILED(SHGetFolderPath(NULL, CSIDL_PROGRAMS, NULL,
+                                 SHGFP_TYPE_CURRENT, system_buffer)))
+        return false;
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_APP_DATA:
+      if (FAILED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT,
+                                 system_buffer)))
+        return false;
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_LOCAL_APP_DATA_LOW:
+      if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
+        return false;
+      }
+      // TODO(nsylvain): We should use SHGetKnownFolderPath instead. Bug 1281128
+      if (FAILED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT,
+                                 system_buffer)))
+        return false;
+      wstring_path = system_buffer;
+      file_util::UpOneDirectory(&wstring_path);
+      file_util::AppendToPath(&wstring_path, L"LocalLow");
+      cur = FilePath(wstring_path);
+      break;
+    case base::DIR_LOCAL_APP_DATA:
+      if (FAILED(SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL,
+                                 SHGFP_TYPE_CURRENT, system_buffer)))
+        return false;
+      cur = FilePath(system_buffer);
+      break;
+    case base::DIR_SOURCE_ROOT:
+      // On Windows, unit tests execute two levels deep from the source root.
+      // For example:  chrome/{Debug|Release}/ui_tests.exe
+      PathService::Get(base::DIR_EXE, &wstring_path);
+      file_util::UpOneDirectory(&wstring_path);
+      file_util::UpOneDirectory(&wstring_path);
+      cur = FilePath(wstring_path);
+      break;
+    default:
+      return false;
+  }
+
+  *result = cur;
+  return true;
+}
+
+}  // namespace base
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_paths_win.h
@@ -0,0 +1,42 @@
+// 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 BASE_BASE_PATHS_WIN_H__
+#define BASE_BASE_PATHS_WIN_H__
+
+// This file declares windows-specific path keys for the base module.
+// These can be used with the PathService to access various special
+// directories and files.
+
+namespace base {
+
+enum {
+  PATH_WIN_START = 100,
+
+  FILE_EXE,     // path and filename of the current executable
+  FILE_MODULE,  // path and filename of the module containing the code for the
+                // PathService (which could differ from FILE_EXE if the
+                // PathService were compiled into a DLL, for example)
+  DIR_WINDOWS,  // Windows directory, usually "c:\windows"
+  DIR_SYSTEM,   // Usually c:\windows\system32"
+  DIR_PROGRAM_FILES, // Usually c:\program files
+
+  DIR_IE_INTERNET_CACHE,  // Temporary Internet Files directory.
+  DIR_COMMON_START_MENU,  // Usually "C:\Documents and Settings\All Users\
+                          // Start Menu\Programs"
+  DIR_START_MENU,         // Usually "C:\Documents and Settings\<user>\
+                          // Start Menu\Programs"
+  DIR_APP_DATA,  // Application Data directory under the user profile.
+  DIR_LOCAL_APP_DATA_LOW,  // Local AppData directory for low integrity level.
+  DIR_LOCAL_APP_DATA,  // "Local Settings\Application Data" directory under the
+                       // user profile.
+  DIR_SOURCE_ROOT,  // Returns the root of the source tree.  This key is useful
+                    // for tests that need to locate various resources.  It
+                    // should not be used outside of test code.
+  PATH_WIN_END
+};
+
+}  // namespace base
+
+#endif  // BASE_BASE_PATHS_WIN_H__
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_switches.cc
@@ -0,0 +1,43 @@
+// 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 "base/base_switches.h"
+
+namespace switches {
+
+// If the program includes chrome/common/debug_on_start.h, the process will
+// start the JIT system-registered debugger on itself and will wait for 60
+// seconds for the debugger to attach to itself. Then a break point will be hit.
+const wchar_t kDebugOnStart[]                  = L"debug-on-start";
+
+// Will wait for 60 seconds for a debugger to come to attach to the process.
+const wchar_t kWaitForDebugger[]               = L"wait-for-debugger";
+
+// Suppresses all error dialogs when present.
+const wchar_t kNoErrorDialogs[]                = L"noerrdialogs";
+
+// Disables the crash reporting.
+const wchar_t kDisableBreakpad[]               = L"disable-breakpad";
+
+// Generates full memory crash dump.
+const wchar_t kFullMemoryCrashReport[]         = L"full-memory-crash-report";
+
+// 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 wchar_t kProcessType[]                   = L"type";
+
+// Enable DCHECKs in release mode.
+const wchar_t kEnableDCHECK[]                  = L"enable-dcheck";
+
+// Refuse to make HTTP connections and refuse to accept certificate errors.
+// For more information about the design of this feature, please see
+//
+//   ForceHTTPS: Protecting High-Security Web Sites from Network Attacks
+//   Collin Jackson and Adam Barth
+//   In Proc. of the 17th International World Wide Web Conference (WWW 2008)
+//
+// Available at http://www.adambarth.com/papers/2008/jackson-barth.pdf
+const wchar_t kForceHTTPS[]                    = L"force-https";
+
+}  // namespace switches
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/base_switches.h
@@ -0,0 +1,23 @@
+// 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.
+
+// Defines all the "base" command-line switches.
+
+#ifndef BASE_BASE_SWITCHES_H_
+#define BASE_BASE_SWITCHES_H_
+
+namespace switches {
+
+extern const wchar_t kDebugOnStart[];
+extern const wchar_t kWaitForDebugger[];
+extern const wchar_t kDisableBreakpad[];
+extern const wchar_t kFullMemoryCrashReport[];
+extern const wchar_t kNoErrorDialogs[];
+extern const wchar_t kProcessType[];
+extern const wchar_t kEnableDCHECK[];
+extern const wchar_t kForceHTTPS[];
+
+}  // namespace switches
+
+#endif  // BASE_BASE_SWITCHES_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/basictypes.h
@@ -0,0 +1,335 @@
+// 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 BASE_BASICTYPES_H_
+#define BASE_BASICTYPES_H_
+
+#include <limits.h>         // So we can set the bounds of our types
+#include <stddef.h>         // For size_t
+#include <string.h>         // for memcpy
+
+#include "base/port.h"    // Types that only need exist on certain systems
+
+#ifndef COMPILER_MSVC
+// stdint.h is part of C99 but MSVC doesn't have it.
+#include <stdint.h>         // For intptr_t.
+#endif
+
+typedef signed char         schar;
+typedef signed char         int8;
+typedef short               int16;
+// TODO(mbelshe) Remove these type guards.  These are
+//               temporary to avoid conflicts with npapi.h.
+#ifndef _INT32
+#define _INT32
+typedef int                 int32;
+#endif
+typedef long long           int64;
+
+// NOTE: unsigned types are DANGEROUS in loops and other arithmetical
+// places.  Use the signed types unless your variable represents a bit
+// pattern (eg a hash value) or you really need the extra bit.  Do NOT
+// use 'unsigned' to express "this value should always be positive";
+// use assertions for this.
+
+typedef unsigned char      uint8;
+typedef unsigned short     uint16;
+// TODO(mbelshe) Remove these type guards.  These are
+//               temporary to avoid conflicts with npapi.h.
+#ifndef _UINT32
+#define _UINT32
+typedef unsigned int       uint32;
+#endif
+typedef unsigned long long uint64;
+
+// A type to represent a Unicode code-point value. As of Unicode 4.0,
+// such values require up to 21 bits.
+// (For type-checking on pointers, make this explicitly signed,
+// and it should always be the signed version of whatever int32 is.)
+typedef signed int         char32;
+
+const uint8  kuint8max  = (( uint8) 0xFF);
+const uint16 kuint16max = ((uint16) 0xFFFF);
+const uint32 kuint32max = ((uint32) 0xFFFFFFFF);
+const uint64 kuint64max = ((uint64) GG_LONGLONG(0xFFFFFFFFFFFFFFFF));
+const  int8  kint8min   = ((  int8) 0x80);
+const  int8  kint8max   = ((  int8) 0x7F);
+const  int16 kint16min  = (( int16) 0x8000);
+const  int16 kint16max  = (( int16) 0x7FFF);
+const  int32 kint32min  = (( int32) 0x80000000);
+const  int32 kint32max  = (( int32) 0x7FFFFFFF);
+const  int64 kint64min  = (( int64) GG_LONGLONG(0x8000000000000000));
+const  int64 kint64max  = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
+
+// A macro to disallow the copy constructor and operator= functions
+// This should be used in the private: declarations for a class
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+  TypeName(const TypeName&);               \
+  void operator=(const TypeName&)
+
+// An older, deprecated, politically incorrect name for the above.
+#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName)
+
+// A macro to disallow all the implicit constructors, namely the
+// default constructor, copy constructor and operator= functions.
+//
+// This should be used in the private: declarations for a class
+// that wants to prevent anyone from instantiating it. This is
+// especially useful for classes containing only static methods.
+#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
+  TypeName();                                    \
+  DISALLOW_COPY_AND_ASSIGN(TypeName)
+
+// The arraysize(arr) macro returns the # of elements in an array arr.
+// The expression is a compile-time constant, and therefore can be
+// used in defining new arrays, for example.  If you use arraysize on
+// a pointer by mistake, you will get a compile-time error.
+//
+// One caveat is that arraysize() doesn't accept any array of an
+// anonymous type or a type defined inside a function.  In these rare
+// cases, you have to use the unsafe ARRAYSIZE_UNSAFE() macro below.  This is
+// due to a limitation in C++'s template system.  The limitation might
+// eventually be removed, but it hasn't happened yet.
+
+// This template function declaration is used in defining arraysize.
+// Note that the function doesn't need an implementation, as we only
+// use its type.
+template <typename T, size_t N>
+char (&ArraySizeHelper(T (&array)[N]))[N];
+
+// That gcc wants both of these prototypes seems mysterious. VC, for
+// its part, can't decide which to use (another mystery). Matching of
+// template overloads: the final frontier.
+#ifndef _MSC_VER
+template <typename T, size_t N>
+char (&ArraySizeHelper(const T (&array)[N]))[N];
+#endif
+
+#define arraysize(array) (sizeof(ArraySizeHelper(array)))
+
+// ARRAYSIZE_UNSAFE performs essentially the same calculation as arraysize,
+// but can be used on anonymous types or types defined inside
+// functions.  It's less safe than arraysize as it accepts some
+// (although not all) pointers.  Therefore, you should use arraysize
+// whenever possible.
+//
+// The expression ARRAYSIZE_UNSAFE(a) is a compile-time constant of type
+// size_t.
+//
+// ARRAYSIZE_UNSAFE catches a few type errors.  If you see a compiler error
+//
+//   "warning: division by zero in ..."
+//
+// when using ARRAYSIZE_UNSAFE, you are (wrongfully) giving it a pointer.
+// You should only use ARRAYSIZE_UNSAFE on statically allocated arrays.
+//
+// The following comments are on the implementation details, and can
+// be ignored by the users.
+//
+// ARRAYSIZE_UNSAFE(arr) works by inspecting sizeof(arr) (the # of bytes in
+// the array) and sizeof(*(arr)) (the # of bytes in one array
+// element).  If the former is divisible by the latter, perhaps arr is
+// indeed an array, in which case the division result is the # of
+// elements in the array.  Otherwise, arr cannot possibly be an array,
+// and we generate a compiler error to prevent the code from
+// compiling.
+//
+// Since the size of bool is implementation-defined, we need to cast
+// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
+// result has type size_t.
+//
+// This macro is not perfect as it wrongfully accepts certain
+// pointers, namely where the pointer size is divisible by the pointee
+// size.  Since all our code has to go through a 32-bit compiler,
+// where a pointer is 4 bytes, this means all pointers to a type whose
+// size is 3 or greater than 4 will be (righteously) rejected.
+
+#define ARRAYSIZE_UNSAFE(a) \
+  ((sizeof(a) / sizeof(*(a))) / \
+   static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
+
+
+// Use implicit_cast as a safe version of static_cast or const_cast
+// for upcasting in the type hierarchy (i.e. casting a pointer to Foo
+// to a pointer to SuperclassOfFoo or casting a pointer to Foo to
+// a const pointer to Foo).
+// When you use implicit_cast, the compiler checks that the cast is safe.
+// Such explicit implicit_casts are necessary in surprisingly many
+// situations where C++ demands an exact type match instead of an
+// argument type convertable to a target type.
+//
+// The From type can be inferred, so the preferred syntax for using
+// implicit_cast is the same as for static_cast etc.:
+//
+//   implicit_cast<ToType>(expr)
+//
+// implicit_cast would have been part of the C++ standard library,
+// but the proposal was submitted too late.  It will probably make
+// its way into the language in the future.
+template<typename To, typename From>
+inline To implicit_cast(From const &f) {
+  return f;
+}
+
+// The COMPILE_ASSERT macro can be used to verify that a compile time
+// expression is true. For example, you could use it to verify the
+// size of a static array:
+//
+//   COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
+//                  content_type_names_incorrect_size);
+//
+// or to make sure a struct is smaller than a certain size:
+//
+//   COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
+//
+// The second argument to the macro is the name of the variable. If
+// the expression is false, most compilers will issue a warning/error
+// containing the name of the variable.
+
+template <bool>
+struct CompileAssert {
+};
+
+#undef COMPILE_ASSERT
+#define COMPILE_ASSERT(expr, msg) \
+  typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
+
+// Implementation details of COMPILE_ASSERT:
+//
+// - COMPILE_ASSERT works by defining an array type that has -1
+//   elements (and thus is invalid) when the expression is false.
+//
+// - The simpler definition
+//
+//     #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1]
+//
+//   does not work, as gcc supports variable-length arrays whose sizes
+//   are determined at run-time (this is gcc's extension and not part
+//   of the C++ standard).  As a result, gcc fails to reject the
+//   following code with the simple definition:
+//
+//     int foo;
+//     COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is
+//                               // not a compile-time constant.
+//
+// - By using the type CompileAssert<(bool(expr))>, we ensures that
+//   expr is a compile-time constant.  (Template arguments must be
+//   determined at compile-time.)
+//
+// - The outter parentheses in CompileAssert<(bool(expr))> are necessary
+//   to work around a bug in gcc 3.4.4 and 4.0.1.  If we had written
+//
+//     CompileAssert<bool(expr)>
+//
+//   instead, these compilers will refuse to compile
+//
+//     COMPILE_ASSERT(5 > 0, some_message);
+//
+//   (They seem to think the ">" in "5 > 0" marks the end of the
+//   template argument list.)
+//
+// - The array size is (bool(expr) ? 1 : -1), instead of simply
+//
+//     ((expr) ? 1 : -1).
+//
+//   This is to avoid running into a bug in MS VC 7.1, which
+//   causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
+
+
+// MetatagId refers to metatag-id that we assign to
+// each metatag <name, value> pair..
+typedef uint32 MetatagId;
+
+// Argument type used in interfaces that can optionally take ownership
+// of a passed in argument.  If TAKE_OWNERSHIP is passed, the called
+// object takes ownership of the argument.  Otherwise it does not.
+enum Ownership {
+  DO_NOT_TAKE_OWNERSHIP,
+  TAKE_OWNERSHIP
+};
+
+// bit_cast<Dest,Source> is a template function that implements the
+// equivalent of "*reinterpret_cast<Dest*>(&source)".  We need this in
+// very low-level functions like the protobuf library and fast math
+// support.
+//
+//   float f = 3.14159265358979;
+//   int i = bit_cast<int32>(f);
+//   // i = 0x40490fdb
+//
+// The classical address-casting method is:
+//
+//   // WRONG
+//   float f = 3.14159265358979;            // WRONG
+//   int i = * reinterpret_cast<int*>(&f);  // WRONG
+//
+// The address-casting method actually produces undefined behavior
+// according to ISO C++ specification section 3.10 -15 -.  Roughly, this
+// section says: if an object in memory has one type, and a program
+// accesses it with a different type, then the result is undefined
+// behavior for most values of "different type".
+//
+// This is true for any cast syntax, either *(int*)&f or
+// *reinterpret_cast<int*>(&f).  And it is particularly true for
+// conversions betweeen integral lvalues and floating-point lvalues.
+//
+// The purpose of 3.10 -15- is to allow optimizing compilers to assume
+// that expressions with different types refer to different memory.  gcc
+// 4.0.1 has an optimizer that takes advantage of this.  So a
+// non-conforming program quietly produces wildly incorrect output.
+//
+// The problem is not the use of reinterpret_cast.  The problem is type
+// punning: holding an object in memory of one type and reading its bits
+// back using a different type.
+//
+// The C++ standard is more subtle and complex than this, but that
+// is the basic idea.
+//
+// Anyways ...
+//
+// bit_cast<> calls memcpy() which is blessed by the standard,
+// especially by the example in section 3.9 .  Also, of course,
+// bit_cast<> wraps up the nasty logic in one place.
+//
+// Fortunately memcpy() is very fast.  In optimized mode, with a
+// constant size, gcc 2.95.3, gcc 4.0.1, and msvc 7.1 produce inline
+// code with the minimal amount of data movement.  On a 32-bit system,
+// memcpy(d,s,4) compiles to one load and one store, and memcpy(d,s,8)
+// compiles to two loads and two stores.
+//
+// I tested this code with gcc 2.95.3, gcc 4.0.1, icc 8.1, and msvc 7.1.
+//
+// WARNING: if Dest or Source is a non-POD type, the result of the memcpy
+// is likely to surprise you.
+
+template <class Dest, class Source>
+inline Dest bit_cast(const Source& source) {
+  // Compile time assertion: sizeof(Dest) == sizeof(Source)
+  // A compile error here means your Dest and Source have different sizes.
+  typedef char VerifySizesAreEqual [sizeof(Dest) == sizeof(Source) ? 1 : -1];
+
+  Dest dest;
+  memcpy(&dest, &source, sizeof(dest));
+  return dest;
+}
+
+// The following enum should be used only as a constructor argument to indicate
+// that the variable has static storage class, and that the constructor should
+// do nothing to its state.  It indicates to the reader that it is legal to
+// declare a static instance of the class, provided the constructor is given
+// the base::LINKER_INITIALIZED argument.  Normally, it is unsafe to declare a
+// static variable that has a constructor or a destructor because invocation
+// order is undefined.  However, IF the type can be initialized by filling with
+// zeroes (which the loader does for static variables), AND the destructor also
+// does nothing to the storage, AND there are no virtual methods, then a
+// constructor declared as
+//       explicit MyClass(base::LinkerInitialized x) {}
+// and invoked as
+//       static MyClass my_variable_name(base::LINKER_INITIALIZED);
+namespace base {
+enum LinkerInitialized { LINKER_INITIALIZED };
+}  // base
+
+
+#endif  // BASE_BASICTYPES_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/build/base.vsprops
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base"
+	InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\third_party\icu38\build\using_icu.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
+	>
+</VisualStudioPropertySheet>
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/build/base_gfx.vsprops
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base_gfx"
+	InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\third_party\icu38\build\using_icu.vsprops;$(SolutionDir)..\third_party\libjpeg\using_libjpeg.vsprops;$(SolutionDir)..\third_party\libpng\using_libpng.vsprops;$(SolutionDir)..\third_party\zlib\using_zlib.vsprops;..\..\skia\using_skia.vsprops"
+	>
+</VisualStudioPropertySheet>
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/build/base_unittests.vsprops
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base_unittests"
+	InheritedPropertySheets=".\base_gfx.vsprops"
+	>
+</VisualStudioPropertySheet>
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/bzip2_error_handler.cc
@@ -0,0 +1,12 @@
+// 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 "base/logging.h"
+
+// We define BZ_NO_STDIO in third_party/bzip2 to remove its internal STDERR
+// error reporting.  This requires us to export our own error handler.
+extern "C"
+void bz_internal_error(int errcode) {
+  CHECK(false) << "bzip2 internal error: " << errcode;
+}
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/clipboard.cc
@@ -0,0 +1,64 @@
+// 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 "base/clipboard.h"
+
+#include "base/logging.h"
+
+namespace {
+
+// A compromised renderer could send us bad data, so validate it.
+bool IsBitmapSafe(const Clipboard::ObjectMapParams& params) {
+  const gfx::Size* size =
+      reinterpret_cast<const gfx::Size*>(&(params[1].front()));
+  return params[0].size() ==
+      static_cast<size_t>(size->width() * size->height() * 4);
+}
+
+}
+
+void Clipboard::DispatchObject(ObjectType type, const ObjectMapParams& params) {
+  switch (type) {
+    case CBF_TEXT:
+      WriteText(&(params[0].front()), params[0].size());
+      break;
+
+    case CBF_HTML:
+      if (params.size() == 2)
+        WriteHTML(&(params[0].front()), params[0].size(),
+                  &(params[1].front()), params[1].size());
+      else
+        WriteHTML(&(params[0].front()), params[0].size(), NULL, 0);
+      break;
+
+    case CBF_BOOKMARK:
+      WriteBookmark(&(params[0].front()), params[0].size(),
+                    &(params[1].front()), params[1].size());
+      break;
+
+    case CBF_LINK:
+      WriteHyperlink(&(params[0].front()), params[0].size(),
+                     &(params[1].front()), params[1].size());
+      break;
+
+    case CBF_FILES:
+      WriteFiles(&(params[0].front()), params[0].size());
+      break;
+
+    case CBF_WEBKIT:
+      WriteWebSmartPaste();
+      break;
+
+#if defined(OS_WIN) || defined(OS_LINUX)
+    case CBF_BITMAP:
+      if (!IsBitmapSafe(params))
+        return;
+      WriteBitmap(&(params[0].front()), &(params[1].front()));
+      break;
+#endif  // defined(OS_WIN) || defined(OS_LINUX)
+
+    default:
+      NOTREACHED();
+  }
+}
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/clipboard.h
@@ -0,0 +1,204 @@
+// 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 BASE_CLIPBOARD_H_
+#define BASE_CLIPBOARD_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "base/file_path.h"
+#include "base/process.h"
+#include "base/string16.h"
+#include "base/gfx/size.h"
+
+class Clipboard {
+ public:
+  typedef std::string FormatType;
+#if defined(OS_LINUX)
+  typedef struct _GtkClipboard GtkClipboard;
+  typedef std::map<FormatType, std::pair<char*, size_t> > TargetMap;
+#endif
+
+  // ObjectType designates the type of data to be stored in the clipboard. This
+  // designation is shared across all OSes. The system-specific designation
+  // is defined by FormatType. A single ObjectType might be represented by
+  // several system-specific FormatTypes. For example, on Linux the CBF_TEXT
+  // ObjectType maps to "text/plain", "STRING", and several other formats. On
+  // windows it maps to CF_UNICODETEXT.
+  enum ObjectType {
+    CBF_TEXT,
+    CBF_HTML,
+    CBF_BOOKMARK,
+    CBF_LINK,
+    CBF_FILES,
+    CBF_WEBKIT,
+    CBF_BITMAP,
+    CBF_SMBITMAP // bitmap from shared memory
+  };
+
+  // ObjectMap is a map from ObjectType to associated data.
+  // The data is organized differently for each ObjectType. The following
+  // table summarizes what kind of data is stored for each key.
+  // * indicates an optional argument.
+  //
+  // Key           Arguments    Type
+  // -------------------------------------
+  // CBF_TEXT      text         char array
+  // CBF_HTML      html         char array
+  //               url*         char array
+  // CBF_BOOKMARK  html         char array
+  //               url          char array
+  // CBF_LINK      html         char array
+  //               url          char array
+  // CBF_FILES     files        char array representing multiple files.
+  //                            Filenames are separated by null characters and
+  //                            the final filename is double null terminated.
+  //                            The filenames are encoded in platform-specific
+  //                            encoding.
+  // CBF_WEBKIT    none         empty vector
+  // CBF_BITMAP    pixels       byte array
+  //               size         gfx::Size struct
+  // CBF_SMBITMAP  shared_mem   shared memory handle
+  //               size         gfx::Size struct
+  typedef std::vector<char> ObjectMapParam;
+  typedef std::vector<ObjectMapParam> ObjectMapParams;
+  typedef std::map<int /* ObjectType */, ObjectMapParams> ObjectMap;
+
+  Clipboard();
+  ~Clipboard();
+
+  // Write a bunch of objects to the system clipboard. Copies are made of the
+  // contents of |objects|. On Windows they are copied to the system clipboard.
+  // On linux they are copied into a structure owned by the Clipboard object and
+  // kept until the system clipboard is set again.
+  void WriteObjects(const ObjectMap& objects);
+
+  // Behaves as above. If there is some shared memory handle passed as one of
+  // the objects, it came from the process designated by |process|. This will
+  // assist in turning it into a shared memory region that the current process
+  // can use.
+  void WriteObjects(const ObjectMap& objects, base::ProcessHandle process);
+
+  // Tests whether the clipboard contains a certain format
+  bool IsFormatAvailable(const FormatType& format) const;
+
+  // Reads UNICODE text from the clipboard, if available.
+  void ReadText(string16* result) const;
+
+  // Reads ASCII text from the clipboard, if available.
+  void ReadAsciiText(std::string* result) const;
+
+  // Reads HTML from the clipboard, if available.
+  void ReadHTML(string16* markup, std::string* src_url) const;
+
+  // Reads a bookmark from the clipboard, if available.
+  void ReadBookmark(string16* title, std::string* url) const;
+
+  // Reads a file or group of files from the clipboard, if available, into the
+  // out parameter.
+  void ReadFile(FilePath* file) const;
+  void ReadFiles(std::vector<FilePath>* files) const;
+
+  // Get format Identifiers for various types.
+  static FormatType GetUrlFormatType();
+  static FormatType GetUrlWFormatType();
+  static FormatType GetMozUrlFormatType();
+  static FormatType GetPlainTextFormatType();
+  static FormatType GetPlainTextWFormatType();
+  static FormatType GetFilenameFormatType();
+  static FormatType GetFilenameWFormatType();
+  static FormatType GetWebKitSmartPasteFormatType();
+  // Win: MS HTML Format, Other: Generic HTML format
+  static FormatType GetHtmlFormatType();
+#if defined(OS_WIN)
+  static FormatType GetBitmapFormatType();
+  // Firefox text/html
+  static FormatType GetTextHtmlFormatType();
+  static FormatType GetCFHDropFormatType();
+  static FormatType GetFileDescriptorFormatType();
+  static FormatType GetFileContentFormatZeroType();
+
+  // Duplicates any remote shared memory handle embedded inside |objects| that
+  // was created by |process| so that it can be used by this process.
+  static void DuplicateRemoteHandles(base::ProcessHandle process,
+                                     ObjectMap* objects);
+#endif
+
+ private:
+  void WriteText(const char* text_data, size_t text_len);
+
+  void WriteHTML(const char* markup_data,
+                 size_t markup_len,
+                 const char* url_data,
+                 size_t url_len);
+
+  void WriteBookmark(const char* title_data,
+                     size_t title_len,
+                     const char* url_data,
+                     size_t url_len);
+
+  void WriteHyperlink(const char* title_data,
+                      size_t title_len,
+                      const char* url_data,
+                      size_t url_len);
+
+  void WriteWebSmartPaste();
+
+  void WriteFiles(const char* file_data, size_t file_len);
+
+  void DispatchObject(ObjectType type, const ObjectMapParams& params);
+
+  void WriteBitmap(const char* pixel_data, const char* size_data);
+#if defined(OS_WIN)
+  void WriteBitmapFromSharedMemory(const char* bitmap_data,
+                                   const char* size_data,
+                                   base::ProcessHandle handle);
+
+  void WriteBitmapFromHandle(HBITMAP source_hbitmap,
+                             const gfx::Size& size);
+
+  // Safely write to system clipboard. Free |handle| on failure.
+  void WriteToClipboard(unsigned int format, HANDLE handle);
+
+  static void ParseBookmarkClipboardFormat(const string16& bookmark,
+                                           string16* title,
+                                           std::string* url);
+
+  // Free a handle depending on its type (as intuited from format)
+  static void FreeData(unsigned int format, HANDLE data);
+
+  // Return the window that should be the clipboard owner, creating it
+  // if neccessary.  Marked const for lazily initialization by const methods.
+  HWND GetClipboardWindow() const;
+
+  // Mark this as mutable so const methods can still do lazy initialization.
+  mutable HWND clipboard_owner_;
+
+  // True if we can create a window.
+  bool create_window_;
+#elif defined(OS_LINUX)
+  // Data is stored in the |clipboard_data_| map until it is saved to the system
+  // clipboard. The Store* functions save data to the |clipboard_data_| map. The
+  // SetGtkClipboard function replaces whatever is on the system clipboard with
+  // the contents of |clipboard_data_|.
+  // The Write* functions make a deep copy of the data passed to them an store
+  // it in |clipboard_data_|.
+
+  // Write changes to gtk clipboard.
+  void SetGtkClipboard();
+  // Free pointers in clipboard_data_ and clear() the map.
+  void FreeTargetMap();
+  // Insert a mapping into clipboard_data_.
+  void InsertMapping(const char* key, char* data, size_t data_len);
+
+  TargetMap* clipboard_data_;
+  GtkClipboard* clipboard_;
+#endif
+
+  DISALLOW_EVIL_CONSTRUCTORS(Clipboard);
+};
+
+#endif  // BASE_CLIPBOARD_H_
new file mode 100644
--- /dev/null
+++ b/ipc/chromium/src/base/clipboard_linux.cc
@@ -0,0 +1,328 @@
+// 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 "base/clipboard.h"
+
+#include <gtk/gtk.h>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+
+#include "base/scoped_ptr.h"
+#include "base/linux_util.h"
+#include "base/string_util.h"
+
+namespace {
+
+const char kMimeBmp[] = "image/bmp";
+const char kMimeHtml[] = "text/html";
+const char kMimeText[] = "text/plain";
+const char kMimeWebkitSmartPaste[] = "chromium-internal/webkit-paste";
+
+std::string GdkAtomToString(const GdkAtom& atom) {
+  gchar* name = gdk_atom_name(atom);
+  std::string rv(name);
+  g_free(name);
+  return rv;
+}
+
+GdkAtom StringToGdkAtom(const std::string& str) {
+  return gdk_atom_intern(str.c_str(), false);
+}
+
+// GtkClipboardGetFunc callback.
+// GTK will call this when an application wants data we copied to the clipboard.
+void GetData(GtkClipboard* clipboard,
+             GtkSelectionData* selection_data,
+             guint info,
+             gpointer user_data) {
+  Clipboard::TargetMap* data_map =
+      reinterpret_cast<Clipboard::TargetMap*>(user_data);
+
+  std::string target_string = GdkAtomToString(selection_data->target);
+  Clipboard::TargetMap::iterator iter = data_map->find(target_string);
+
+  if (iter == data_map->end())
+    return;
+
+  if (target_string == kMimeBmp) {
+    gtk_selection_data_set_pixbuf(selection_data,
+        reinterpret_cast<GdkPixbuf*>(iter->second.first));
+  } else {
+    gtk_selection_data_set(selection_data, selection_data->target, 8,
+                           reinterpret_cast<guchar*>(iter->second.first),
+                           iter->second.second);