mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 03:47:44 -03:00
update build.gns and .grd files2
This commit is contained in:
parent
208ba9fdc6
commit
761e49a23e
3 changed files with 10 additions and 24 deletions
|
@ -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
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
@ -98,11 +98,6 @@ enum MenuItem {
|
||||||
MENU_ITEM_EXIT = 4,
|
MENU_ITEM_EXIT = 4,
|
||||||
MENU_ITEM_NUM_STATES
|
MENU_ITEM_NUM_STATES
|
||||||
};
|
};
|
||||||
|
|
||||||
void RecordMenuItemClick(MenuItem item) {
|
|
||||||
UMA_HISTOGRAM_ENUMERATION("BackgroundMode.MenuItemClick", item,
|
|
||||||
MENU_ITEM_NUM_STATES);
|
|
||||||
}
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -170,7 +165,6 @@ void BackgroundModeManager::BackgroundModeData::ExecuteCommand(
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DCHECK(!command_id_handler_vector_->at(command_id).is_null());
|
DCHECK(!command_id_handler_vector_->at(command_id).is_null());
|
||||||
RecordMenuItemClick(MENU_ITEM_BACKGROUND_CLIENT);
|
|
||||||
command_id_handler_vector_->at(command_id).Run();
|
command_id_handler_vector_->at(command_id).Run();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -304,8 +298,6 @@ BackgroundModeManager::BackgroundModeManager(
|
||||||
// outlives the profile storage.
|
// outlives the profile storage.
|
||||||
profile_storage_->AddObserver(this);
|
profile_storage_->AddObserver(this);
|
||||||
|
|
||||||
UMA_HISTOGRAM_BOOLEAN("BackgroundMode.OnStartup.AutoLaunchState",
|
|
||||||
command_line.HasSwitch(switches::kNoStartupWindow));
|
|
||||||
UMA_HISTOGRAM_BOOLEAN("BackgroundMode.OnStartup.IsBackgroundModePrefEnabled",
|
UMA_HISTOGRAM_BOOLEAN("BackgroundMode.OnStartup.IsBackgroundModePrefEnabled",
|
||||||
IsBackgroundModePrefEnabled());
|
IsBackgroundModePrefEnabled());
|
||||||
|
|
||||||
|
@ -511,14 +503,12 @@ void BackgroundModeManager::OnExtensionsReady(Profile* profile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BackgroundModeManager::OnBackgroundModeEnabledPrefChanged() {
|
void BackgroundModeManager::OnBackgroundModeEnabledPrefChanged() {
|
||||||
bool enabled = IsBackgroundModePrefEnabled();
|
|
||||||
UMA_HISTOGRAM_BOOLEAN("BackgroundMode.BackgroundModeEnabledPrefChanged",
|
|
||||||
enabled);
|
|
||||||
UpdateEnableLaunchOnStartup();
|
UpdateEnableLaunchOnStartup();
|
||||||
if (enabled)
|
if (IsBackgroundModePrefEnabled()) {
|
||||||
EnableBackgroundMode();
|
EnableBackgroundMode();
|
||||||
else
|
} else {
|
||||||
DisableBackgroundMode();
|
DisableBackgroundMode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -617,7 +607,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) {
|
||||||
BackgroundModeData* bmd = GetBackgroundModeDataForLastProfile();
|
BackgroundModeData* bmd = GetBackgroundModeDataForLastProfile();
|
||||||
switch (command_id) {
|
switch (command_id) {
|
||||||
case IDC_ABOUT:
|
case IDC_ABOUT:
|
||||||
RecordMenuItemClick(MENU_ITEM_ABOUT);
|
|
||||||
if (bmd) {
|
if (bmd) {
|
||||||
chrome::ShowAboutChrome(bmd->GetBrowserWindow());
|
chrome::ShowAboutChrome(bmd->GetBrowserWindow());
|
||||||
} else {
|
} else {
|
||||||
|
@ -626,7 +615,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_TASK_MANAGER:
|
case IDC_TASK_MANAGER:
|
||||||
RecordMenuItemClick(MENU_ITEM_TASK_MANAGER);
|
|
||||||
if (bmd) {
|
if (bmd) {
|
||||||
chrome::OpenTaskManager(bmd->GetBrowserWindow());
|
chrome::OpenTaskManager(bmd->GetBrowserWindow());
|
||||||
} else {
|
} else {
|
||||||
|
@ -635,7 +623,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_EXIT:
|
case IDC_EXIT:
|
||||||
RecordMenuItemClick(MENU_ITEM_EXIT);
|
|
||||||
base::RecordAction(UserMetricsAction("Exit"));
|
base::RecordAction(UserMetricsAction("Exit"));
|
||||||
chrome::CloseAllBrowsers();
|
chrome::CloseAllBrowsers();
|
||||||
break;
|
break;
|
||||||
|
@ -645,8 +632,6 @@ void BackgroundModeManager::ExecuteCommand(int command_id, int event_flags) {
|
||||||
DCHECK(IsBackgroundModePrefEnabled());
|
DCHECK(IsBackgroundModePrefEnabled());
|
||||||
DCHECK(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
|
DCHECK(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
|
||||||
|
|
||||||
RecordMenuItemClick(MENU_ITEM_KEEP_RUNNING);
|
|
||||||
|
|
||||||
// Set the background mode pref to "disabled" - the resulting notification
|
// Set the background mode pref to "disabled" - the resulting notification
|
||||||
// will result in a call to DisableBackgroundMode().
|
// will result in a call to DisableBackgroundMode().
|
||||||
PrefService* service = g_browser_process->local_state();
|
PrefService* service = g_browser_process->local_state();
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
// Increment this if you change the data in ways that mean users with
|
// Increment this if you change the data in ways that mean users with
|
||||||
// existing data should get a new version. Otherwise, existing data may
|
// existing data should get a new version. Otherwise, existing data may
|
||||||
// continue to be used and updates made here will not always appear.
|
// 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
|
// The following engines are included in country lists and are added to the
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
"image_url": "{google:baseSearchByImageURL}upload",
|
"image_url": "{google:baseSearchByImageURL}upload",
|
||||||
"image_translate_url": "{google:baseSearchByImageURL}upload?filtertype=tr&{imageTranslateSourceLocale}{imageTranslateTargetLocale}",
|
"image_translate_url": "{google:baseSearchByImageURL}upload?filtertype=tr&{imageTranslateSourceLocale}{imageTranslateTargetLocale}",
|
||||||
"contextual_search_url": "{google:baseURL}_/contextualsearch?{google:contextualSearchVersion}{google:contextualSearchContextData}",
|
"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",
|
"side_search_param": "sidesearch",
|
||||||
"image_translate_source_language_param_key": "sourcelang",
|
"image_translate_source_language_param_key": "sourcelang",
|
||||||
"image_translate_target_language_param_key": "targetlang",
|
"image_translate_target_language_param_key": "targetlang",
|
||||||
|
|
|
@ -1366,9 +1366,10 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedTemplateURLData(
|
||||||
|
|
||||||
for (const base::Value& engine : list) {
|
for (const base::Value& engine : list) {
|
||||||
if (engine.is_dict()) {
|
if (engine.is_dict()) {
|
||||||
auto t_url = TemplateURLDataFromOverrideDictionary(engine);
|
auto t_url = TemplateURLDataFromOverrideDictionary(engine.GetDict());
|
||||||
if (t_url)
|
if (t_url) {
|
||||||
t_urls.push_back(std::move(t_url));
|
t_urls.push_back(std::move(t_url));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return t_urls;
|
return t_urls;
|
||||||
|
|
Loading…
Reference in a new issue