diff --git a/src/chrome/browser/background/background_mode_manager.cc b/src/chrome/browser/background/background_mode_manager.cc index 385db056..1e28879e 100644 --- a/src/chrome/browser/background/background_mode_manager.cc +++ b/src/chrome/browser/background/background_mode_manager.cc @@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors and Alex313031 +// Copyright 2023 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -98,11 +98,6 @@ enum MenuItem { MENU_ITEM_EXIT = 4, MENU_ITEM_NUM_STATES }; - -void RecordMenuItemClick(MenuItem item) { - UMA_HISTOGRAM_ENUMERATION("BackgroundMode.MenuItemClick", item, - MENU_ITEM_NUM_STATES); -} } // namespace // static @@ -170,7 +165,6 @@ void BackgroundModeManager::BackgroundModeData::ExecuteCommand( break; default: DCHECK(!command_id_handler_vector_->at(command_id).is_null()); - RecordMenuItemClick(MENU_ITEM_BACKGROUND_CLIENT); command_id_handler_vector_->at(command_id).Run(); break; } @@ -304,8 +298,6 @@ BackgroundModeManager::BackgroundModeManager( // outlives the profile storage. profile_storage_->AddObserver(this); - UMA_HISTOGRAM_BOOLEAN("BackgroundMode.OnStartup.AutoLaunchState", - command_line.HasSwitch(switches::kNoStartupWindow)); UMA_HISTOGRAM_BOOLEAN("BackgroundMode.OnStartup.IsBackgroundModePrefEnabled", IsBackgroundModePrefEnabled()); @@ -511,14 +503,12 @@ void BackgroundModeManager::OnExtensionsReady(Profile* profile) { } void BackgroundModeManager::OnBackgroundModeEnabledPrefChanged() { - bool enabled = IsBackgroundModePrefEnabled(); - UMA_HISTOGRAM_BOOLEAN("BackgroundMode.BackgroundModeEnabledPrefChanged", - enabled); UpdateEnableLaunchOnStartup(); - if (enabled) + if (IsBackgroundModePrefEnabled()) { EnableBackgroundMode(); - else + } else { DisableBackgroundMode(); + } } /////////////////////////////////////////////////////////////////////////////// @@ -617,7 +607,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) { BackgroundModeData* bmd = GetBackgroundModeDataForLastProfile(); switch (command_id) { case IDC_ABOUT: - RecordMenuItemClick(MENU_ITEM_ABOUT); if (bmd) { chrome::ShowAboutChrome(bmd->GetBrowserWindow()); } else { @@ -626,7 +615,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) { } break; case IDC_TASK_MANAGER: - RecordMenuItemClick(MENU_ITEM_TASK_MANAGER); if (bmd) { chrome::OpenTaskManager(bmd->GetBrowserWindow()); } else { @@ -635,7 +623,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) { } break; case IDC_EXIT: - RecordMenuItemClick(MENU_ITEM_EXIT); base::RecordAction(UserMetricsAction("Exit")); chrome::CloseAllBrowsers(); break; @@ -645,8 +632,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) { DCHECK(IsBackgroundModePrefEnabled()); DCHECK(KeepAliveRegistry::GetInstance()->IsKeepingAlive()); - RecordMenuItemClick(MENU_ITEM_KEEP_RUNNING); - // Set the background mode pref to "disabled" - the resulting notification // will result in a call to DisableBackgroundMode(). PrefService* service = g_browser_process->local_state(); diff --git a/src/components/search_engines/prepopulated_engines.json b/src/components/search_engines/prepopulated_engines.json index e86fd5c2..f953ef14 100644 --- a/src/components/search_engines/prepopulated_engines.json +++ b/src/components/search_engines/prepopulated_engines.json @@ -28,7 +28,7 @@ // Increment this if you change the data in ways that mean users with // existing data should get a new version. Otherwise, existing data may // continue to be used and updates made here will not always appear. - "kCurrentDataVersion": 139 + "kCurrentDataVersion": 140 }, // The following engines are included in country lists and are added to the @@ -132,7 +132,7 @@ "image_url": "{google:baseSearchByImageURL}upload", "image_translate_url": "{google:baseSearchByImageURL}upload?filtertype=tr&{imageTranslateSourceLocale}{imageTranslateTargetLocale}", "contextual_search_url": "{google:baseURL}_/contextualsearch?{google:contextualSearchVersion}{google:contextualSearchContextData}", - "image_url_post_params": "encoded_image={google:imageThumbnail},image_url={google:imageURL},sbisrc={google:imageSearchSource},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight}", + "image_url_post_params": "encoded_image={google:imageThumbnail},image_url={google:imageURL},sbisrc={google:imageSearchSource},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},processed_image_dimensions={google:processedImageDimensions}", "side_search_param": "sidesearch", "image_translate_source_language_param_key": "sourcelang", "image_translate_target_language_param_key": "targetlang", diff --git a/src/components/search_engines/template_url_prepopulate_data.cc b/src/components/search_engines/template_url_prepopulate_data.cc index dd6f3458..35f16fef 100644 --- a/src/components/search_engines/template_url_prepopulate_data.cc +++ b/src/components/search_engines/template_url_prepopulate_data.cc @@ -1366,9 +1366,10 @@ std::vector> GetPrepopulatedTemplateURLData( for (const base::Value& engine : list) { if (engine.is_dict()) { - auto t_url = TemplateURLDataFromOverrideDictionary(engine); - if (t_url) - t_urls.push_back(std::move(t_url)); + auto t_url = TemplateURLDataFromOverrideDictionary(engine.GetDict()); + if (t_url) { + t_urls.push_back(std::move(t_url)); + } } } return t_urls;