project
string
commit_id
string
target
int64
func
string
cwe
string
big_vul_idx
string
idx
int64
hash
string
size
float64
message
string
dataset
string
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
bool SortByHost(const GURL& lhs, const GURL& rhs) { return net::GetHostOrSpecFromURL(lhs) > net::GetHostOrSpecFromURL(rhs); }
101166
90,904
212815552426041796121521695120228110178
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
void UsageTracker::UpdateUsageCache( QuotaClient::ID client_id, const GURL& origin, int64 delta) { ClientUsageTracker* client_tracker = GetClientTracker(client_id); DCHECK(client_tracker); client_tracker->UpdateUsageCache(origin, delta); }
101167
90,905
14076798911533921419509054088009978653
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
void ClientUsageTracker::UpdateUsageCache( const GURL& origin, int64 delta) { std::string host = net::GetHostOrSpecFromURL(origin); if (cached_hosts_.find(host) != cached_hosts_.end()) { cached_usage_[host][origin] += delta; global_usage_ += delta; if (global_unlimited_usage_is_valid_ && IsStorageUnlimited(origin)) global_unlimited_usage_ += delta; DCHECK_GE(cached_usage_[host][origin], 0); DCHECK_GE(global_usage_, 0); return; } GetHostUsage(host, NewCallback(this, &ClientUsageTracker::NoopHostUsageCallback)); }
101168
90,906
298018535558155219702046087197599059254
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
UsageTracker::UsageTracker(const QuotaClientList& clients, StorageType type, SpecialStoragePolicy* special_storage_policy) : type_(type), callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { for (QuotaClientList::const_iterator iter = clients.begin(); iter != clients.end(); ++iter) { client_tracker_map_.insert(std::make_pair( (*iter)->id(), new ClientUsageTracker(this, *iter, type, special_storage_policy))); } }
101169
90,907
147848666580461030540559383878243807424
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
ClientUsageTracker* client_tracker() const { return client_tracker_; }
101170
90,908
243918891041523331035839446409798364970
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
UsageTracker* tracker() const { return tracker_; }
101171
90,909
32580635669736352136830721396157068364
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
ClientUsageTracker::~ClientUsageTracker() { if (special_storage_policy_) special_storage_policy_->RemoveObserver(this); }
101172
90,910
71912063077487293176844672693852505162
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
virtual ~GatherGlobalUsageTask() {}
101173
90,911
43815965562730572773978334864337519070
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
virtual ~GatherHostUsageTask() {}
101174
90,912
24172732869114857630378835937361097905
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
virtual ~GatherUsageTaskBase() {}
101175
90,913
312230518065427400062134595587424757351
null
null
null
Chrome
610f904d8215075c4681be4eb413f4348860bf9f
0
UsageTracker::~UsageTracker() { STLDeleteValues(&client_tracker_map_); }
101176
90,914
98397665339973323290583086459968649732
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddChromeFrameWorkItems(const InstallationState& original_state, const InstallerState& installer_state, const FilePath& setup_path, const Version& new_version, const Product& product, WorkItemList* list) { DCHECK(product.is_chrome_frame()); if (!installer_state.is_multi_install()) { VLOG(1) << "Not adding GCF specific work items for single install."; return; } std::wstring version_key(product.distribution()->GetVersionKey()); bool ready_mode = product.HasOption(kOptionReadyMode); HKEY root = installer_state.root_key(); const bool is_install = (installer_state.operation() != InstallerState::UNINSTALL); bool update_chrome_uninstall_command = false; BrowserDistribution* dist = installer_state.multi_package_binaries_distribution(); if (ready_mode) { list->AddCreateRegKeyWorkItem(root, dist->GetStateKey()); list->AddSetRegValueWorkItem(root, dist->GetStateKey(), kChromeFrameReadyModeField, static_cast<int64>(is_install ? 1 : 0), // The value we want to set. is_install ? false : true); // Overwrite existing value. if (is_install) { FilePath installer_path(installer_state .GetInstallerDirectory(new_version).Append(setup_path.BaseName())); CommandLine basic_cl(installer_path); basic_cl.AppendSwitch(switches::kChromeFrame); basic_cl.AppendSwitch(switches::kMultiInstall); if (installer_state.system_install()) basic_cl.AppendSwitch(switches::kSystemLevel); CommandLine temp_opt_out(basic_cl); temp_opt_out.AppendSwitch(switches::kChromeFrameReadyModeTempOptOut); CommandLine end_temp_opt_out(basic_cl); end_temp_opt_out.AppendSwitch( switches::kChromeFrameReadyModeEndTempOptOut); CommandLine opt_out(installer_path); AppendUninstallCommandLineFlags(installer_state, product, &opt_out); opt_out.AppendSwitch(switches::kForceUninstall); CommandLine opt_in(basic_cl); opt_in.AppendSwitch(switches::kChromeFrameReadyModeOptIn); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFTempOptOutCmdField, temp_opt_out.command_line_string(), true); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFEndTempOptOutCmdField, end_temp_opt_out.command_line_string(), true); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFOptOutCmdField, opt_out.command_line_string(), true); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegCFOptInCmdField, opt_in.command_line_string(), true); } else { update_chrome_uninstall_command = (installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER) == NULL); } } else { list->AddDeleteRegValueWorkItem(root, dist->GetStateKey(), kChromeFrameReadyModeField); const Product* chrome = installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER); if (chrome) { } else { const ProductState* chrome_state = original_state.GetProductState( installer_state.system_install(), BrowserDistribution::CHROME_BROWSER); update_chrome_uninstall_command = (chrome_state != NULL) && chrome_state->is_multi_install(); } } if (!ready_mode || !is_install) { list->AddDeleteRegValueWorkItem(root, version_key, google_update::kRegCFTempOptOutCmdField); list->AddDeleteRegValueWorkItem(root, version_key, google_update::kRegCFEndTempOptOutCmdField); list->AddDeleteRegValueWorkItem(root, version_key, google_update::kRegCFOptOutCmdField); list->AddDeleteRegValueWorkItem(root, version_key, google_update::kRegCFOptInCmdField); } if (update_chrome_uninstall_command) { const ProductState* chrome_state = original_state.GetProductState( installer_state.system_install(), BrowserDistribution::CHROME_BROWSER); if (chrome_state != NULL) { DCHECK(chrome_state->is_multi_install()); Product chrome(BrowserDistribution::GetSpecificDistribution( BrowserDistribution::CHROME_BROWSER)); chrome.InitializeFromUninstallCommand(chrome_state->uninstall_command()); AddUninstallShortcutWorkItems(installer_state, setup_path, chrome_state->version(), list, chrome); } else { NOTREACHED() << "What happened to Chrome?"; } } }
106795
95,897
279986887558643001165314526586642217390
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddElevationPolicyWorkItems(const InstallationState& original_state, const InstallerState& installer_state, const Version& new_version, WorkItemList* install_list) { if (!installer_state.is_multi_install()) { VLOG(1) << "Not adding elevation policy for single installs"; return; } else { const ProductState* cf_state = original_state.GetProductState(installer_state.system_install(), BrowserDistribution::CHROME_FRAME); if (cf_state && !cf_state->is_multi_install()) { LOG(WARNING) << "Not adding elevation policy since a single install " "of CF exists"; return; } } FilePath binary_dir( GetChromeInstallPath(installer_state.system_install(), BrowserDistribution::GetSpecificDistribution( BrowserDistribution::CHROME_BINARIES))); struct { const wchar_t* sub_key; const wchar_t* executable; const FilePath exe_dir; } low_rights_entries[] = { { L"ElevationPolicy\\", kChromeLauncherExe, binary_dir.Append(ASCIIToWide(new_version.GetString())) }, { L"DragDrop\\", chrome::kBrowserProcessExecutableName, binary_dir }, }; bool uninstall = (installer_state.operation() == InstallerState::UNINSTALL); HKEY root = installer_state.root_key(); const wchar_t kLowRightsKeyPath[] = L"SOFTWARE\\Microsoft\\Internet Explorer\\Low Rights\\"; std::wstring key_path(kLowRightsKeyPath); wchar_t cf_classid[64] = {0}; StringFromGUID2(__uuidof(ChromeFrame), cf_classid, arraysize(cf_classid)); for (size_t i = 0; i < arraysize(low_rights_entries); ++i) { key_path.append(low_rights_entries[i].sub_key).append(cf_classid); if (uninstall) { install_list->AddDeleteRegKeyWorkItem(root, key_path); } else { install_list->AddCreateRegKeyWorkItem(root, key_path); install_list->AddSetRegValueWorkItem(root, key_path, L"Policy", static_cast<DWORD>(3), true); install_list->AddSetRegValueWorkItem(root, key_path, L"AppName", low_rights_entries[i].executable, true); install_list->AddSetRegValueWorkItem(root, key_path, L"AppPath", low_rights_entries[i].exe_dir.value(), true); } key_path.resize(arraysize(kLowRightsKeyPath) - 1); } }
106797
95,898
51681982475719498104251971091442242217
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddGoogleUpdateWorkItems(const InstallationState& original_state, const InstallerState& installer_state, WorkItemList* install_list) { if (installer_state.operation() != InstallerState::MULTI_INSTALL && installer_state.operation() != InstallerState::MULTI_UPDATE) { VLOG(1) << "AddGoogleUpdateWorkItems noop: " << installer_state.operation(); return; } if (installer_state.state_type() != BrowserDistribution::CHROME_BINARIES) { std::wstring multi_key( installer_state.multi_package_binaries_distribution()->GetStateKey()); const ProductState* chrome_product_state = original_state.GetNonVersionedProductState( installer_state.system_install(), BrowserDistribution::CHROME_BROWSER); const std::wstring& brand(chrome_product_state->brand()); if (!brand.empty()) { install_list->AddCreateRegKeyWorkItem(installer_state.root_key(), multi_key); install_list->AddSetRegValueWorkItem(installer_state.root_key(), multi_key, google_update::kRegBrandField, brand, false); } } AddUsageStatsWorkItems(original_state, installer_state, install_list); }
106798
95,899
78891792955714408296697137318494445708
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddInstallWorkItems(const InstallationState& original_state, const InstallerState& installer_state, const FilePath& setup_path, const FilePath& archive_path, const FilePath& src_path, const FilePath& temp_path, const Version& new_version, scoped_ptr<Version>* current_version, WorkItemList* install_list) { DCHECK(install_list); const FilePath& target_path = installer_state.target_path(); install_list->AddCreateDirWorkItem(temp_path); install_list->AddCreateDirWorkItem(target_path); if (current_version != NULL && current_version->get() != NULL) { FilePath old_installer_dir( installer_state.GetInstallerDirectory(**current_version)); FilePath old_archive(old_installer_dir.Append(archive_path.BaseName())); install_list->AddDeleteTreeWorkItem(old_archive, temp_path) ->set_ignore_failure(true); } FilePath new_chrome_exe(target_path.Append(installer::kChromeNewExe)); install_list->AddDeleteTreeWorkItem(new_chrome_exe, temp_path); install_list->AddCopyTreeWorkItem( src_path.Append(installer::kChromeExe).value(), target_path.Append(installer::kChromeExe).value(), temp_path.value(), WorkItem::NEW_NAME_IF_IN_USE, new_chrome_exe.value()); if (base::win::OSInfo::GetInstance()->wow64_status() != base::win::OSInfo::WOW64_DISABLED) { install_list->AddMoveTreeWorkItem( src_path.Append(installer::kWowHelperExe).value(), target_path.Append(installer::kWowHelperExe).value(), temp_path.value(), WorkItem::ALWAYS_MOVE); } bool check_for_duplicates = (current_version != NULL && current_version->get() != NULL && current_version->get()->Equals(new_version)); install_list->AddMoveTreeWorkItem( src_path.AppendASCII(new_version.GetString()).value(), target_path.AppendASCII(new_version.GetString()).value(), temp_path.value(), check_for_duplicates ? WorkItem::CHECK_DUPLICATES : WorkItem::ALWAYS_MOVE); install_list->AddCopyTreeWorkItem( src_path.Append(installer::kDictionaries).value(), target_path.Append(installer::kDictionaries).value(), temp_path.value(), WorkItem::IF_NOT_PRESENT); install_list->AddDeleteTreeWorkItem( target_path.Append(installer::kChromeOldExe), temp_path); AddInstallerCopyTasks(installer_state, setup_path, archive_path, temp_path, new_version, install_list); const HKEY root = installer_state.root_key(); const Products& products = installer_state.products(); for (size_t i = 0; i < products.size(); ++i) { const Product* product = products[i]; AddUninstallShortcutWorkItems(installer_state, setup_path, new_version, install_list, *product); AddVersionKeyWorkItems(root, product->distribution(), new_version, install_list); } if (installer_state.is_multi_install()) { AddVersionKeyWorkItems(root, installer_state.multi_package_binaries_distribution(), new_version, install_list); } AddProductSpecificWorkItems(original_state, installer_state, setup_path, new_version, install_list); AddGoogleUpdateWorkItems(original_state, installer_state, install_list); AddQuickEnableWorkItems(installer_state, original_state, &setup_path, &new_version, install_list); AppendPostInstallTasks(installer_state, setup_path, new_chrome_exe, current_version->get(), new_version, temp_path, install_list); }
106799
95,900
165293270744715107146236645654074369938
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddProductSpecificWorkItems(const InstallationState& original_state, const InstallerState& installer_state, const FilePath& setup_path, const Version& new_version, WorkItemList* list) { const Products& products = installer_state.products(); for (size_t i = 0; i < products.size(); ++i) { const Product& p = *products[i]; if (p.is_chrome_frame()) { AddChromeFrameWorkItems(original_state, installer_state, setup_path, new_version, p, list); } } }
106800
95,901
75717738013399225672826351549804556388
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddRegisterComDllWorkItems(const FilePath& dll_folder, const std::vector<FilePath>& dll_list, bool system_level, bool do_register, bool ignore_failures, WorkItemList* work_item_list) { DCHECK(work_item_list); if (dll_list.empty()) { VLOG(1) << "No COM DLLs to register"; } else { std::vector<FilePath>::const_iterator dll_iter(dll_list.begin()); for (; dll_iter != dll_list.end(); ++dll_iter) { FilePath dll_path = dll_folder.Append(*dll_iter); WorkItem* work_item = work_item_list->AddSelfRegWorkItem( dll_path.value(), do_register, !system_level); DCHECK(work_item); work_item->set_ignore_failure(ignore_failures); } } }
106802
95,902
323725041900992523500237590830184347009
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddRegisterComDllWorkItemsForPackage(const InstallerState& installer_state, const Version* old_version, const Version& new_version, WorkItemList* work_item_list) { std::vector<FilePath> com_dll_list; installer_state.AddComDllList(&com_dll_list); if (!com_dll_list.empty()) { if (old_version) { FilePath old_dll_path(installer_state.target_path().AppendASCII( old_version->GetString())); installer::AddRegisterComDllWorkItems(old_dll_path, com_dll_list, installer_state.system_install(), false, // Unregister true, // May fail work_item_list); } FilePath dll_path(installer_state.target_path().AppendASCII( new_version.GetString())); installer::AddRegisterComDllWorkItems(dll_path, com_dll_list, installer_state.system_install(), true, // Register false, // Must succeed. work_item_list); } }
106803
95,903
336031560425920837044828230187164321065
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddSetMsiMarkerWorkItem(const InstallerState& installer_state, BrowserDistribution* dist, bool set, WorkItemList* work_item_list) { DCHECK(work_item_list); DWORD msi_value = set ? 1 : 0; WorkItem* set_msi_work_item = work_item_list->AddSetRegValueWorkItem( installer_state.root_key(), dist->GetStateKey(), google_update::kRegMSIField, msi_value, true); DCHECK(set_msi_work_item); set_msi_work_item->set_ignore_failure(true); set_msi_work_item->set_log_message("Could not write MSI marker!"); }
106804
95,904
301524828330008284769993130297138615842
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddUninstallShortcutWorkItems(const InstallerState& installer_state, const FilePath& setup_path, const Version& new_version, WorkItemList* install_list, const Product& product) { HKEY reg_root = installer_state.root_key(); BrowserDistribution* browser_dist = product.distribution(); DCHECK(browser_dist); FilePath install_path(installer_state.target_path()); FilePath installer_path(installer_state.GetInstallerDirectory(new_version)); installer_path = installer_path.Append(setup_path.BaseName()); CommandLine uninstall_arguments(CommandLine::NO_PROGRAM); AppendUninstallCommandLineFlags(installer_state, product, &uninstall_arguments); if (product.is_chrome() && installer_state.operation() != InstallerState::UNINSTALL) { const Products& products = installer_state.products(); for (size_t i = 0; i < products.size(); ++i) { const Product& p = *products[i]; if (!p.is_chrome() && !p.ShouldCreateUninstallEntry()) p.AppendUninstallFlags(&uninstall_arguments); } } std::wstring update_state_key(browser_dist->GetStateKey()); install_list->AddCreateRegKeyWorkItem(reg_root, update_state_key); install_list->AddSetRegValueWorkItem(reg_root, update_state_key, installer::kUninstallStringField, installer_path.value(), true); install_list->AddSetRegValueWorkItem(reg_root, update_state_key, installer::kUninstallArgumentsField, uninstall_arguments.command_line_string(), true); if (!installer_state.is_msi() && product.ShouldCreateUninstallEntry()) { CommandLine quoted_uninstall_cmd(installer_path); DCHECK_EQ(quoted_uninstall_cmd.command_line_string()[0], '"'); quoted_uninstall_cmd.AppendArguments(uninstall_arguments, false); std::wstring uninstall_reg = browser_dist->GetUninstallRegPath(); install_list->AddCreateRegKeyWorkItem(reg_root, uninstall_reg); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, installer::kUninstallDisplayNameField, browser_dist->GetAppShortCutName(), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, installer::kUninstallStringField, quoted_uninstall_cmd.command_line_string(), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"InstallLocation", install_path.value(), true); FilePath chrome_icon(install_path.Append(installer::kChromeExe)); ShellUtil::GetChromeIcon(product.distribution(), chrome_icon.value()); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"DisplayIcon", chrome_icon.value(), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"NoModify", static_cast<DWORD>(1), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"NoRepair", static_cast<DWORD>(1), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"Publisher", browser_dist->GetPublisherName(), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"Version", UTF8ToWide(new_version.GetString()), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"DisplayVersion", UTF8ToWide(new_version.GetString()), true); install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg, L"InstallDate", InstallUtil::GetCurrentDate(), false); } }
106805
95,905
116331328511938903853051505619951512756
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddUsageStatsWorkItems(const InstallationState& original_state, const InstallerState& installer_state, WorkItemList* install_list) { DCHECK(installer_state.operation() == InstallerState::MULTI_INSTALL || installer_state.operation() == InstallerState::MULTI_UPDATE); HKEY root_key = installer_state.root_key(); bool value_found = false; DWORD usagestats = 0; const Products& products = installer_state.products(); for (Products::const_iterator scan = products.begin(), end = products.end(); !value_found && scan != end; ++scan) { BrowserDistribution* dist = (*scan)->distribution(); const ProductState* product_state = original_state.GetNonVersionedProductState( installer_state.system_install(), dist->GetType()); value_found = product_state->GetUsageStats(&usagestats); } if (value_found) { std::wstring state_key( installer_state.multi_package_binaries_distribution()->GetStateKey()); install_list->AddCreateRegKeyWorkItem(root_key, state_key); install_list->AddSetRegValueWorkItem(root_key, state_key, google_update::kRegUsageStatsField, usagestats, false); for (Products::const_iterator scan = products.begin(), end = products.end(); scan != end; ++scan) { BrowserDistribution* dist = (*scan)->distribution(); if (installer_state.system_install()) { install_list->AddDeleteRegValueWorkItem( root_key, dist->GetStateMediumKey(), google_update::kRegUsageStatsField); install_list->AddDeleteRegValueWorkItem( HKEY_CURRENT_USER, dist->GetStateKey(), google_update::kRegUsageStatsField); } install_list->AddDeleteRegValueWorkItem(root_key, dist->GetStateKey(), google_update::kRegUsageStatsField); } } }
106806
95,906
147981642094506301187936301171596353125
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AddVersionKeyWorkItems(HKEY root, BrowserDistribution* dist, const Version& new_version, WorkItemList* list) { std::wstring version_key(dist->GetVersionKey()); list->AddCreateRegKeyWorkItem(root, version_key); std::wstring product_name(dist->GetAppShortCutName()); list->AddSetRegValueWorkItem(root, version_key, google_update::kRegNameField, product_name, true); // overwrite name also list->AddSetRegValueWorkItem(root, version_key, google_update::kRegOopcrashesField, static_cast<DWORD>(1), false); // set during first install list->AddSetRegValueWorkItem(root, version_key, google_update::kRegVersionField, UTF8ToWide(new_version.GetString()), true); // overwrite version }
106807
95,907
325461758976426976870589036524913070973
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
bool AppendPostInstallTasks(const InstallerState& installer_state, const FilePath& setup_path, const FilePath& new_chrome_exe, const Version* current_version, const Version& new_version, const FilePath& temp_path, WorkItemList* post_install_task_list) { DCHECK(post_install_task_list); HKEY root = installer_state.root_key(); const Products& products = installer_state.products(); { scoped_ptr<WorkItemList> in_use_update_work_items( WorkItem::CreateConditionalWorkItemList( new ConditionRunIfFileExists(new_chrome_exe))); in_use_update_work_items->set_log_message("InUseUpdateWorkItemList"); FilePath installer_path(installer_state.GetInstallerDirectory(new_version) .Append(setup_path.BaseName())); CommandLine rename(installer_path); rename.AppendSwitch(switches::kRenameChromeExe); if (installer_state.system_install()) rename.AppendSwitch(switches::kSystemLevel); if (installer_state.verbose_logging()) rename.AppendSwitch(switches::kVerboseLogging); std::wstring version_key; for (size_t i = 0; i < products.size(); ++i) { BrowserDistribution* dist = products[i]->distribution(); version_key = dist->GetVersionKey(); if (current_version != NULL) { in_use_update_work_items->AddSetRegValueWorkItem(root, version_key, google_update::kRegOldVersionField, UTF8ToWide(current_version->GetString()), true); } CommandLine product_rename_cmd(rename); products[i]->AppendRenameFlags(&product_rename_cmd); in_use_update_work_items->AddSetRegValueWorkItem( root, version_key, google_update::kRegRenameCmdField, product_rename_cmd.command_line_string(), true); } if (current_version != NULL && installer_state.is_multi_install()) { BrowserDistribution* dist = installer_state.multi_package_binaries_distribution(); in_use_update_work_items->AddSetRegValueWorkItem( root, dist->GetVersionKey(), google_update::kRegOldVersionField, UTF8ToWide(current_version->GetString()), true); } post_install_task_list->AddWorkItem(in_use_update_work_items.release()); } { scoped_ptr<WorkItemList> regular_update_work_items( WorkItem::CreateConditionalWorkItemList( new Not(new ConditionRunIfFileExists(new_chrome_exe)))); regular_update_work_items->set_log_message("RegularUpdateWorkItemList"); for (size_t i = 0; i < products.size(); ++i) { BrowserDistribution* dist = products[i]->distribution(); std::wstring version_key(dist->GetVersionKey()); regular_update_work_items->AddDeleteRegValueWorkItem(root, version_key, google_update::kRegOldVersionField); regular_update_work_items->AddDeleteRegValueWorkItem(root, version_key, google_update::kRegRenameCmdField); } post_install_task_list->AddWorkItem(regular_update_work_items.release()); } AddRegisterComDllWorkItemsForPackage(installer_state, current_version, new_version, post_install_task_list); if (installer_state.is_msi()) { for (size_t i = 0; i < products.size(); ++i) { const Product* product = products[i]; AddSetMsiMarkerWorkItem(installer_state, product->distribution(), true, post_install_task_list); AddDeleteUninstallShortcutsForMSIWorkItems(installer_state, *product, temp_path, post_install_task_list); } if (installer_state.is_multi_install()) { AddSetMsiMarkerWorkItem(installer_state, installer_state.multi_package_binaries_distribution(), true, post_install_task_list); } } return true; }
106808
95,908
281877970240298786719120493450374050078
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void AppendUninstallCommandLineFlags(const InstallerState& installer_state, const Product& product, CommandLine* uninstall_cmd) { DCHECK(uninstall_cmd); uninstall_cmd->AppendSwitch(installer::switches::kUninstall); product.AppendUninstallFlags(uninstall_cmd); if (installer_state.is_msi()) { uninstall_cmd->AppendSwitch(installer::switches::kMsi); if (product.is_chrome_frame()) { uninstall_cmd->AppendSwitch(installer::switches::kDeleteProfile); } } if (installer_state.system_install()) uninstall_cmd->AppendSwitch(installer::switches::kSystemLevel); if (installer_state.verbose_logging()) uninstall_cmd->AppendSwitch(installer::switches::kVerboseLogging); }
106809
95,909
100352891127813447655463628321160907009
null
null
null
Chrome
45bae236b03f577ed6682ef4c7ef3ee006de5e5a
0
void RefreshElevationPolicy() { const wchar_t kIEFrameDll[] = L"ieframe.dll"; const char kIERefreshPolicy[] = "IERefreshElevationPolicy"; HMODULE ieframe = LoadLibrary(kIEFrameDll); if (ieframe) { typedef HRESULT (__stdcall *IERefreshPolicy)(); IERefreshPolicy ie_refresh_policy = reinterpret_cast<IERefreshPolicy>( GetProcAddress(ieframe, kIERefreshPolicy)); if (ie_refresh_policy) { ie_refresh_policy(); } else { VLOG(1) << kIERefreshPolicy << " not supported."; } FreeLibrary(ieframe); } else { VLOG(1) << "Cannot load " << kIEFrameDll; } }
106810
95,910
223741615849818468991998339753992264985
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<CFTypeRef>& result) { CFType type; if (!decoder->decodeEnum(type)) return false; switch (type) { case CFArray: { RetainPtr<CFArrayRef> array; if (!decode(decoder, array)) return false; result.adoptCF(array.leakRef()); return true; } case CFBoolean: { RetainPtr<CFBooleanRef> boolean; if (!decode(decoder, boolean)) return false; result.adoptCF(boolean.leakRef()); return true; } case CFData: { RetainPtr<CFDataRef> data; if (!decode(decoder, data)) return false; result.adoptCF(data.leakRef()); return true; } case CFDate: { RetainPtr<CFDateRef> date; if (!decode(decoder, date)) return false; result.adoptCF(date.leakRef()); return true; } case CFDictionary: { RetainPtr<CFDictionaryRef> dictionary; if (!decode(decoder, dictionary)) return false; result.adoptCF(dictionary.leakRef()); return true; } case CFNull: result.adoptCF(kCFNull); return true; case CFNumber: { RetainPtr<CFNumberRef> number; if (!decode(decoder, number)) return false; result.adoptCF(number.leakRef()); return true; } case CFString: { RetainPtr<CFStringRef> string; if (!decode(decoder, string)) return false; result.adoptCF(string.leakRef()); return true; } case CFURL: { RetainPtr<CFURLRef> url; if (!decode(decoder, url)) return false; result.adoptCF(url.leakRef()); return true; } #if PLATFORM(MAC) case SecCertificate: { RetainPtr<SecCertificateRef> certificate; if (!decode(decoder, certificate)) return false; result.adoptCF(certificate.leakRef()); return true; } case SecKeychainItem: { RetainPtr<SecKeychainItemRef> keychainItem; if (!decode(decoder, keychainItem)) return false; result.adoptCF(keychainItem.leakRef()); return true; } #endif case Null: result = tokenNullTypeRef(); return true; case Unknown: ASSERT_NOT_REACHED(); return false; } return false; }
107976
96,942
245579797449716001356193440894924004354
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<CFArrayRef>& result) { uint64_t size; if (!decoder->decodeUInt64(size)) return false; RetainPtr<CFMutableArrayRef> array(AdoptCF, CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks)); for (size_t i = 0; i < size; ++i) { RetainPtr<CFTypeRef> element; if (!decode(decoder, element)) return false; CFArrayAppendValue(array.get(), element.get()); } result.adoptCF(array.leakRef()); return true; }
107977
96,943
45471706882100400139454760816787314699
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<CFBooleanRef>& result) { bool boolean; if (!decoder->decode(boolean)) return false; result.adoptCF(boolean ? kCFBooleanTrue : kCFBooleanFalse); return true; }
107978
96,944
217269487669630498681370969051756141373
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<CFDataRef>& result) { CoreIPC::DataReference dataReference; if (!decoder->decode(dataReference)) return false; result.adoptCF(CFDataCreate(0, dataReference.data(), dataReference.size())); return true; }
107979
96,945
24596417041923172525278421120694419837
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<CFDateRef>& result) { double absoluteTime; if (!decoder->decodeDouble(absoluteTime)) return false; result.adoptCF(CFDateCreate(0, absoluteTime)); return true; }
107980
96,946
95455001269586142174046983392757562826
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<CFNumberRef>& result) { CFNumberType numberType; if (!decoder->decodeEnum(numberType)) return false; CoreIPC::DataReference dataReference; if (!decoder->decode(dataReference)) return false; size_t neededBufferSize = sizeForNumberType(numberType); if (!neededBufferSize || dataReference.size() != neededBufferSize) return false; ASSERT(dataReference.data()); CFNumberRef number = CFNumberCreate(0, numberType, dataReference.data()); result.adoptCF(number); return true; }
107981
96,947
19895660395290471297813488445728147255
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<CFStringRef>& result) { CFStringEncoding encoding; if (!decoder->decodeEnum(encoding)) return false; if (!CFStringIsEncodingAvailable(encoding)) return false; CoreIPC::DataReference dataReference; if (!decoder->decode(dataReference)) return false; CFStringRef string = CFStringCreateWithBytes(0, dataReference.data(), dataReference.size(), encoding, false); if (!string) return false; result.adoptCF(string); return true; }
107982
96,948
125439949989558810634870319349550575589
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<SecCertificateRef>& result) { RetainPtr<CFDataRef> data; if (!decode(decoder, data)) return false; result.adoptCF(SecCertificateCreateWithData(0, data.get())); return true; }
107983
96,949
118034440156381712901109802061994806484
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
bool decode(ArgumentDecoder* decoder, RetainPtr<SecKeychainItemRef>& result) { RetainPtr<CFDataRef> data; if (!CoreIPC::decode(decoder, data)) return false; SecKeychainItemRef item; if (SecKeychainItemCopyFromPersistentReference(data.get(), &item) != errSecSuccess || !item) return false; result.adoptCF(item); return true; }
107984
96,950
139901913355719619922410167476069304050
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFTypeRef typeRef) { CFType type = typeFromCFTypeRef(typeRef); encoder->encodeEnum(type); switch (type) { case CFArray: encode(encoder, static_cast<CFArrayRef>(typeRef)); return; case CFBoolean: encode(encoder, static_cast<CFBooleanRef>(typeRef)); return; case CFData: encode(encoder, static_cast<CFDataRef>(typeRef)); return; case CFDate: encode(encoder, static_cast<CFDateRef>(typeRef)); return; case CFDictionary: encode(encoder, static_cast<CFDictionaryRef>(typeRef)); return; case CFNull: return; case CFNumber: encode(encoder, static_cast<CFNumberRef>(typeRef)); return; case CFString: encode(encoder, static_cast<CFStringRef>(typeRef)); return; case CFURL: encode(encoder, static_cast<CFURLRef>(typeRef)); return; #if PLATFORM(MAC) case SecCertificate: encode(encoder, (SecCertificateRef)typeRef); return; case SecKeychainItem: encode(encoder, (SecKeychainItemRef)typeRef); return; #endif case Null: return; case Unknown: break; } ASSERT_NOT_REACHED(); }
107985
96,951
314043615412523958982815403259581385029
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFArrayRef array) { CFIndex size = CFArrayGetCount(array); Vector<CFTypeRef, 32> values(size); CFArrayGetValues(array, CFRangeMake(0, size), values.data()); encoder->encodeUInt64(size); for (CFIndex i = 0; i < size; ++i) { ASSERT(values[i]); encode(encoder, values[i]); } }
107986
96,952
326182672259793095074903868248248992736
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFBooleanRef boolean) { encoder->encodeBool(CFBooleanGetValue(boolean)); }
107987
96,953
183196404920407848910229395852456647558
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFDataRef data) { CFIndex length = CFDataGetLength(data); const UInt8* bytePtr = CFDataGetBytePtr(data); encoder->encodeVariableLengthByteArray(CoreIPC::DataReference(bytePtr, length)); }
107988
96,954
212565696779616042911770132122228578000
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFDateRef date) { encoder->encodeDouble(CFDateGetAbsoluteTime(date)); }
107989
96,955
141297115758542311391365888325805310985
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFDictionaryRef dictionary) { CFIndex size = CFDictionaryGetCount(dictionary); Vector<CFTypeRef, 32> keys(size); Vector<CFTypeRef, 32> values(size); CFDictionaryGetKeysAndValues(dictionary, keys.data(), values.data()); encoder->encodeUInt64(size); for (CFIndex i = 0; i < size; ++i) { ASSERT(keys[i]); ASSERT(CFGetTypeID(keys[i]) == CFStringGetTypeID()); ASSERT(values[i]); if (typeFromCFTypeRef(values[i]) == Unknown) continue; encode(encoder, static_cast<CFStringRef>(keys[i])); encode(encoder, values[i]); } }
107990
96,956
137311423161488652922788798044125405577
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFNumberRef number) { CFNumberType numberType = CFNumberGetType(number); Vector<uint8_t> buffer(CFNumberGetByteSize(number)); bool result = CFNumberGetValue(number, numberType, buffer.data()); ASSERT_UNUSED(result, result); encoder->encodeEnum(numberType); encoder->encodeVariableLengthByteArray(buffer); }
107991
96,957
155862216858219035008515243988693306465
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, CFURLRef url) { CFURLRef baseURL = CFURLGetBaseURL(url); encoder->encodeBool(baseURL); if (baseURL) encode(encoder, baseURL); encode(encoder, CFURLGetString(url)); }
107992
96,958
305318043598852328788919451097842805535
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, SecCertificateRef certificate) { RetainPtr<CFDataRef> data(AdoptCF, SecCertificateCopyData(certificate)); encode(encoder, data.get()); }
107993
96,959
205439137218340324514472342381815742423
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
void encode(ArgumentEncoder* encoder, SecKeychainItemRef keychainItem) { CFDataRef data; if (SecKeychainItemCreatePersistentReference(keychainItem, &data) == errSecSuccess) { encode(encoder, data); CFRelease(data); } }
107994
96,960
171274118354372822348236224898800599955
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
static size_t sizeForNumberType(CFNumberType numberType) { switch (numberType) { case kCFNumberSInt8Type: return sizeof(SInt8); case kCFNumberSInt16Type: return sizeof(SInt16); case kCFNumberSInt32Type: return sizeof(SInt32); case kCFNumberSInt64Type: return sizeof(SInt64); case kCFNumberFloat32Type: return sizeof(Float32); case kCFNumberFloat64Type: return sizeof(Float64); case kCFNumberCharType: return sizeof(char); case kCFNumberShortType: return sizeof(short); case kCFNumberIntType: return sizeof(int); case kCFNumberLongType: return sizeof(long); case kCFNumberLongLongType: return sizeof(long long); case kCFNumberFloatType: return sizeof(float); case kCFNumberDoubleType: return sizeof(double); case kCFNumberCFIndexType: return sizeof(CFIndex); case kCFNumberNSIntegerType: #ifdef __LP64__ return sizeof(long); #else return sizeof(int); #endif case kCFNumberCGFloatType: #ifdef __LP64__ return sizeof(double); #else return sizeof(float); #endif } return 0; }
107995
96,961
27848599471812898144613345011010654854
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
CFTypeRef tokenNullTypeRef() { static CFStringRef tokenNullType = CFSTR("WKNull"); return tokenNullType; }
107996
96,962
175623978259648943406346575058036055479
null
null
null
Chrome
3c1864079c441ea2e08f882acaaf441f78a6de3d
0
static CFType typeFromCFTypeRef(CFTypeRef type) { ASSERT(type); if (type == tokenNullTypeRef()) return Null; CFTypeID typeID = CFGetTypeID(type); if (typeID == CFArrayGetTypeID()) return CFArray; if (typeID == CFBooleanGetTypeID()) return CFBoolean; if (typeID == CFDataGetTypeID()) return CFData; if (typeID == CFDateGetTypeID()) return CFDate; if (typeID == CFDictionaryGetTypeID()) return CFDictionary; if (typeID == CFNullGetTypeID()) return CFNull; if (typeID == CFNumberGetTypeID()) return CFNumber; if (typeID == CFStringGetTypeID()) return CFString; if (typeID == CFURLGetTypeID()) return CFURL; #if PLATFORM(MAC) if (typeID == SecCertificateGetTypeID()) return SecCertificate; if (typeID == SecKeychainItemGetTypeID()) return SecKeychainItem; #endif ASSERT_NOT_REACHED(); return Unknown; }
107997
96,963
15453018360386509514318651401412145111
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
WebProcessProxy::WebProcessProxy(PassRefPtr<WebContext> context) : ChildProcessProxy(this) , m_responsivenessTimer(this) , m_context(context) , m_mayHaveUniversalFileReadSandboxExtension(false) #if ENABLE(CUSTOM_PROTOCOLS) , m_customProtocolManagerProxy(this) #endif #if PLATFORM(MAC) , m_processSuppressionEnabled(false) #endif { connect(); }
113366
101,655
123412538599239483251657742386635119858
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::addBackForwardItem(uint64_t itemID, const String& originalURL, const String& url, const String& title, const CoreIPC::DataReference& backForwardData) { MESSAGE_CHECK_URL(originalURL); MESSAGE_CHECK_URL(url); WebBackForwardListItemMap::AddResult result = m_backForwardListItemMap.add(itemID, 0); if (result.isNewEntry) { result.iterator->value = WebBackForwardListItem::create(originalURL, url, title, backForwardData.data(), backForwardData.size(), itemID); return; } result.iterator->value->setOriginalURL(originalURL); result.iterator->value->setURL(url); result.iterator->value->setTitle(title); result.iterator->value->setBackForwardData(backForwardData.data(), backForwardData.size()); }
113367
101,656
163602474284359039990193897888883696663
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::addMessageReceiver(CoreIPC::StringReference messageReceiverName, CoreIPC::MessageReceiver* messageReceiver) { m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver); }
113368
101,657
150059410333912731310947551930315714155
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::addMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID, CoreIPC::MessageReceiver* messageReceiver) { m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver); }
113369
101,658
303523196229072192943930168401371555678
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::assumeReadAccessToBaseURL(const String& urlString) { KURL url(KURL(), urlString); if (!url.isLocalFile()) return; KURL baseURL(KURL(), url.baseAsString()); m_localPathsWithAssumedReadAccess.add(baseURL.fileSystemPath()); }
113370
101,659
100355329681477505833993586871594588714
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
bool WebProcessProxy::checkURLReceivedFromWebProcess(const String& urlString) { return checkURLReceivedFromWebProcess(KURL(KURL(), urlString)); }
113372
101,660
252476567755804316883486609453240018330
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
bool WebProcessProxy::checkURLReceivedFromWebProcess(const KURL& url) { if (!url.isLocalFile()) return true; if (m_mayHaveUniversalFileReadSandboxExtension) return true; String path = url.fileSystemPath(); for (HashSet<String>::const_iterator iter = m_localPathsWithAssumedReadAccess.begin(); iter != m_localPathsWithAssumedReadAccess.end(); ++iter) { if (path.startsWith(*iter)) return true; } for (WebBackForwardListItemMap::iterator iter = m_backForwardListItemMap.begin(), end = m_backForwardListItemMap.end(); iter != end; ++iter) { if (KURL(KURL(), iter->value->url()).fileSystemPath() == path) return true; if (KURL(KURL(), iter->value->originalURL()).fileSystemPath() == path) return true; } WTFLogAlways("Received an unexpected URL from the web process: '%s'\n", url.string().utf8().data()); return false; }
113373
101,661
50531996259164801264616956212094687859
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
PassRefPtr<WebProcessProxy> WebProcessProxy::create(PassRefPtr<WebContext> context) { return adoptRef(new WebProcessProxy(context)); }
113374
101,662
212748640410624692613525742463594697302
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
DownloadProxy* WebProcessProxy::createDownloadProxy() { #if ENABLE(NETWORK_PROCESS) ASSERT(!m_context->usesNetworkProcess()); #endif if (!m_downloadProxyMap) m_downloadProxyMap = adoptPtr(new DownloadProxyMap(m_messageReceiverMap)); return m_downloadProxyMap->createDownloadProxy(m_context.get()); }
113375
101,663
243581795971206806491821136210484405079
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
PassRefPtr<WebPageProxy> WebProcessProxy::createWebPage(PageClient* pageClient, WebContext*, WebPageGroup* pageGroup) { uint64_t pageID = generatePageID(); RefPtr<WebPageProxy> webPage = WebPageProxy::create(pageClient, this, pageGroup, pageID); m_pageMap.set(pageID, webPage.get()); globalPageMap().set(pageID, webPage.get()); #if PLATFORM(MAC) if (pageIsProcessSuppressible(webPage.get())) m_processSuppressiblePages.add(pageID); updateProcessSuppressionState(); #endif return webPage.release(); }
113376
101,664
66818616163672606391163142329890739399
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didBecomeUnresponsive(ResponsivenessTimer*) { Vector<RefPtr<WebPageProxy> > pages; copyValuesToVector(m_pageMap, pages); for (size_t i = 0, size = pages.size(); i < size; ++i) pages[i]->processDidBecomeUnresponsive(); }
113378
101,665
72512893183559041724818864933901039404
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didClearPluginSiteData(uint64_t callbackID) { m_context->pluginSiteDataManager()->didClearSiteData(callbackID); }
113379
101,666
181017453300081445768588925967270208801
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didClose(CoreIPC::Connection*) { RefPtr<WebProcessProxy> protect(this); webConnection()->didClose(); Vector<RefPtr<WebPageProxy> > pages; copyValuesToVector(m_pageMap, pages); disconnect(); for (size_t i = 0, size = pages.size(); i < size; ++i) pages[i]->processDidCrash(); }
113380
101,667
115795934577125118945511237571676732521
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didDestroyFrame(uint64_t frameID) { ASSERT(isGoodKey<WebFrameProxyMap>(frameID)); m_frameMap.remove(frameID); }
113381
101,668
147953521643974998360760345538124663399
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didFinishLaunching(ProcessLauncher* launcher, CoreIPC::Connection::Identifier connectionIdentifier) { ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); #if USE(SECURITY_FRAMEWORK) connection()->addQueueClient(&SecItemShimProxy::shared()); #endif m_webConnection = WebConnectionToWebProcess::create(this); m_context->processDidFinishLaunching(this); #if PLATFORM(MAC) updateProcessSuppressionState(); #endif }
113382
101,669
337334291189774061908093500349182893937
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didGetSitesWithPluginData(const Vector<String>& sites, uint64_t callbackID) { m_context->pluginSiteDataManager()->didGetSitesWithData(sites, callbackID); }
113383
101,670
2201891682725913491710242175608316218
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didNavigateWithNavigationData(uint64_t pageID, const WebNavigationDataStore& store, uint64_t frameID) { WebPageProxy* page = webPage(pageID); if (!page) return; WebFrameProxy* frame = webFrame(frameID); MESSAGE_CHECK(frame); MESSAGE_CHECK(frame->page() == page); m_context->historyClient().didNavigateWithNavigationData(m_context.get(), page, store, frame); }
113384
101,671
71691259679841221537991136440871407440
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didPerformServerRedirect(uint64_t pageID, const String& sourceURLString, const String& destinationURLString, uint64_t frameID) { WebPageProxy* page = webPage(pageID); if (!page) return; if (sourceURLString.isEmpty() || destinationURLString.isEmpty()) return; WebFrameProxy* frame = webFrame(frameID); MESSAGE_CHECK(frame); MESSAGE_CHECK(frame->page() == page); MESSAGE_CHECK_URL(sourceURLString); MESSAGE_CHECK_URL(destinationURLString); m_context->historyClient().didPerformServerRedirect(m_context.get(), page, sourceURLString, destinationURLString, frame); }
113386
101,672
4761742522670920646871208037372696618
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didReceiveInvalidMessage(CoreIPC::Connection* connection, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) { WTFLogAlways("Received an invalid message \"%s.%s\" from the web process.\n", messageReceiverName.toString().data(), messageName.toString().data()); terminate(); didClose(connection); }
113387
101,673
330840464608176413808357092823285615927
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder) { if (m_messageReceiverMap.dispatchMessage(connection, messageID, decoder)) return; if (m_context->dispatchMessage(connection, messageID, decoder)) return; if (decoder.messageReceiverName() == Messages::WebProcessProxy::messageReceiverName()) { didReceiveWebProcessProxyMessage(connection, messageID, decoder); return; } #if ENABLE(CUSTOM_PROTOCOLS) if (decoder.messageReceiverName() == Messages::CustomProtocolManagerProxy::messageReceiverName()) { #if ENABLE(NETWORK_PROCESS) ASSERT(!context()->usesNetworkProcess()); #endif m_customProtocolManagerProxy.didReceiveMessage(connection, messageID, decoder); return; } #endif uint64_t pageID = decoder.destinationID(); if (!pageID) return; WebPageProxy* pageProxy = webPage(pageID); if (!pageProxy) return; pageProxy->didReceiveMessage(connection, messageID, decoder); }
113388
101,674
334563236916881838331072814825650318628
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder, bool& didHandleMessage) { if (decoder.messageReceiverName() == Messages::WebProcessProxy::messageReceiverName()) didReceiveWebProcessProxyMessageOnConnectionWorkQueue(connection, messageID, decoder, didHandleMessage); }
113389
101,675
145652411458631004220750341115783924521
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::didUpdateHistoryTitle(uint64_t pageID, const String& title, const String& url, uint64_t frameID) { WebPageProxy* page = webPage(pageID); if (!page) return; WebFrameProxy* frame = webFrame(frameID); MESSAGE_CHECK(frame); MESSAGE_CHECK(frame->page() == page); MESSAGE_CHECK_URL(url); m_context->historyClient().didUpdateHistoryTitle(m_context.get(), page, title, url, frame); }
113391
101,676
332580512548609773426567127811068323035
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::disconnectFramesFromPage(WebPageProxy* page) { Vector<RefPtr<WebFrameProxy> > frames; copyValuesToVector(m_frameMap, frames); for (size_t i = 0, size = frames.size(); i < size; ++i) { if (frames[i]->page() == page) frames[i]->disconnect(); } }
113393
101,677
168917798258222527586143428641625942950
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
size_t WebProcessProxy::frameCountInPage(WebPageProxy* page) const { size_t result = 0; for (HashMap<uint64_t, RefPtr<WebFrameProxy> >::const_iterator iter = m_frameMap.begin(); iter != m_frameMap.end(); ++iter) { if (iter->value->page() == page) ++result; } return result; }
113394
101,678
257324918661597521849116790907541415914
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::frameCreated(uint64_t frameID, WebFrameProxy* frameProxy) { ASSERT(canCreateFrame(frameID)); m_frameMap.set(frameID, frameProxy); }
113395
101,679
102033105289541171925830864874379613982
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
bool WebProcessProxy::fullKeyboardAccessEnabled() { return false; }
113396
101,680
304359859513965936787195250639141969459
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
static uint64_t generatePageID() { static uint64_t uniquePageID = 1; return uniquePageID++; }
113397
101,681
65788184867363441059059349906630463728
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) { launchOptions.processType = ProcessLauncher::WebProcess; platformGetLaunchOptions(launchOptions); }
113398
101,682
242399362340282735528765492294467927187
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply) { m_context->getNetworkProcessConnection(reply); }
113399
101,683
113902447149948628349068070779972500868
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::getPluginPath(const String& mimeType, const String& urlString, String& pluginPath, uint32_t& pluginLoadPolicy) { MESSAGE_CHECK_URL(urlString); String newMimeType = mimeType.lower(); pluginLoadPolicy = PluginModuleLoadNormally; PluginModuleInfo plugin = m_context->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), urlString)); if (!plugin.path) return; pluginLoadPolicy = PluginInfoStore::policyForPlugin(plugin); if (pluginLoadPolicy != PluginModuleLoadNormally) return; pluginPath = plugin.path; }
113400
101,684
336391095991952913398448311385317994182
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::getPluginProcessConnection(const String& pluginPath, uint32_t processType, PassRefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> reply) { PluginProcessManager::shared().getPluginProcessConnection(m_context->pluginInfoStore(), pluginPath, static_cast<PluginProcess::Type>(processType), reply); }
113401
101,685
293581982518530085020171067103861157095
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::getPlugins(CoreIPC::Connection*, uint64_t requestID, bool refresh) { pluginWorkQueue().dispatch(bind(&WebProcessProxy::handleGetPlugins, this, requestID, refresh)); }
113402
101,686
303450138912619379262757155199905348532
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::getSharedWorkerProcessConnection(const String& /* url */, const String& /* name */, PassRefPtr<Messages::WebProcessProxy::GetSharedWorkerProcessConnection::DelayedReply>) { }
113403
101,687
150885650741295862162356681867046562363
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
static WebProcessProxy::WebPageProxyMap& globalPageMap() { ASSERT(isMainThread()); DEFINE_STATIC_LOCAL(WebProcessProxy::WebPageProxyMap, pageMap, ()); return pageMap; }
113404
101,688
209125828497436925278597894732295651255
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::interactionOccurredWhileUnresponsive(ResponsivenessTimer*) { Vector<RefPtr<WebPageProxy> > pages; copyValuesToVector(m_pageMap, pages); for (size_t i = 0, size = pages.size(); i < size; ++i) pages[i]->interactionOccurredWhileProcessUnresponsive(); }
113405
101,689
152379379326248126273573837969493095073
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
static inline bool isGoodKey(const typename HashMap::KeyType& key) { return key != HashTraits<typename HashMap::KeyType>::emptyValue() && !HashTraits<typename HashMap::KeyType>::isDeletedValue(key); }
113406
101,690
37849368034711880119709697215999392244
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::pagePreferencesChanged(WebKit::WebPageProxy *page) { #if PLATFORM(MAC) if (pageIsProcessSuppressible(page)) m_processSuppressiblePages.add(page->pageID()); else m_processSuppressiblePages.remove(page->pageID()); updateProcessSuppressionState(); #else UNUSED_PARAM(page); #endif }
113407
101,691
205135464897249637207221649753836000929
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::pageVisibilityChanged(WebKit::WebPageProxy *page) { #if PLATFORM(MAC) if (pageIsProcessSuppressible(page)) m_processSuppressiblePages.add(page->pageID()); else m_processSuppressiblePages.remove(page->pageID()); updateProcessSuppressionState(); #else UNUSED_PARAM(page); #endif }
113408
101,692
262024031075182250676044236542341970044
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
static WorkQueue& pluginWorkQueue() { DEFINE_STATIC_LOCAL(WorkQueue, queue, ("com.apple.CoreIPC.PluginQueue")); return queue; }
113410
101,693
52656017232085473164371485027316867882
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::registerNewWebBackForwardListItem(WebBackForwardListItem* item) { ASSERT(!m_backForwardListItemMap.contains(item->itemID())); m_backForwardListItemMap.set(item->itemID(), item); }
113411
101,694
121055835273111145895279923361168325699
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::removeMessagePortChannel(uint64_t channelID) { if (!isValid()) return; send(Messages::WebProcess::RemoveMessagePortChannel(channelID), /* destinationID */ 0); }
113412
101,695
319146462647408209231107786525259502784
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::removeMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID) { m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID); }
113413
101,696
289900821033046537065689188237323683710
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::removeWebPage(uint64_t pageID) { m_pageMap.remove(pageID); globalPageMap().remove(pageID); #if PLATFORM(MAC) m_processSuppressiblePages.remove(pageID); updateProcessSuppressionState(); #endif }
113414
101,697
70629953842413721510227926990321224625
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::sendDidGetPlugins(uint64_t requestID, PassOwnPtr<Vector<PluginInfo> > pluginInfos) { ASSERT(isMainThread()); OwnPtr<Vector<PluginInfo> > plugins(pluginInfos); #if PLATFORM(MAC) if (!m_context->omitPDFSupport()) { #if ENABLE(PDFKIT_PLUGIN) plugins->append(PDFPlugin::pluginInfo()); #endif plugins->append(SimplePDFPlugin::pluginInfo()); } #endif send(Messages::WebProcess::DidGetPlugins(requestID, *plugins), 0); }
113415
101,698
335840459834616030329145970058111648749
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::shouldTerminate(bool& shouldTerminate) { if (!m_pageMap.isEmpty() || (m_downloadProxyMap && !m_downloadProxyMap->isEmpty()) || !m_context->shouldTerminate(this)) { shouldTerminate = false; return; } shouldTerminate = true; disconnect(); }
113416
101,699
26038606366630415774101886893427370024
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
void WebProcessProxy::updateTextCheckerState() { if (canSendMessage()) send(Messages::WebProcess::SetTextCheckerState(TextChecker::state()), 0); }
113417
101,700
67686698958572927784118003203835455699
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
WebPageProxy* WebProcessProxy::webPage(uint64_t pageID) { return globalPageMap().get(pageID); }
113420
101,701
202854970162627672680304203685638446234
null
null
null
Chrome
2bfb2b8299e2fb6a432390a93a99a85fed1d29c9
0
WebProcessProxy::~WebProcessProxy() { if (m_webConnection) m_webConnection->invalidate(); }
113421
101,702
52133121199265915580343624748919696352
null
null
null
Chrome
6d067124e87295721c62a77f0610e4b37f6098ad
0
v8::Handle<v8::Value> V8ThrowException::createRangeError(v8::Isolate* isolate, const String& message) { return v8::Exception::RangeError(v8String(isolate, message.isNull() ? "Range error" : message)); }
140865
125,901
258175836621186131970248154136800287654
null
null
null
Chrome
6d067124e87295721c62a77f0610e4b37f6098ad
0
v8::Handle<v8::Value> V8ThrowException::createSyntaxError(v8::Isolate* isolate, const String& message) { return v8::Exception::SyntaxError(v8String(isolate, message.isNull() ? "Syntax error" : message)); }
140867
125,902
203441341902559238899164825264739901061
null
null
null
Chrome
6d067124e87295721c62a77f0610e4b37f6098ad
0
v8::Handle<v8::Value> V8ThrowException::createTypeError(v8::Isolate* isolate, const String& message) { return v8::Exception::TypeError(v8String(isolate, message.isNull() ? "Type error" : message)); }
140868
125,903
309463780191214451668554609605675943915
null
null
null
Chrome
6d067124e87295721c62a77f0610e4b37f6098ad
0
static void domExceptionStackGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) { ASSERT(info.Data()->IsObject()); v8SetReturnValue(info, info.Data()->ToObject(info.GetIsolate())->Get(v8AtomicString(info.GetIsolate(), "stack"))); }
140869
125,904
40325325303768819454754864833648844338
null
null
null
Chrome
6d067124e87295721c62a77f0610e4b37f6098ad
0
static void domExceptionStackSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) { ASSERT(info.Data()->IsObject()); info.Data()->ToObject(info.GetIsolate())->Set(v8AtomicString(info.GetIsolate(), "stack"), value); }
140870
125,905
6761357730366036688016481024812922027
null
null
null