Commit ffb607a7 authored by Orin Jaworski's avatar Orin Jaworski Committed by Commit Bot

[omnibox] Delete CHANGE_SEARCH_ENGINE and CHANGE_HOME_PAGE Pedals

This CL fully deletes two Pedals that won't be launched, including
all data and related unit tests. This is done to simplify upcoming
changes to the full set of remaining Pedals (no sense maintaining
code that isn't going to fly).

Bug: 893183
Change-Id: I1687774557efe416f17b1da852e0e6e0da6e88d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316950
Auto-Submit: Orin Jaworski <orinj@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Orin Jaworski <orinj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791455}
parent 80973ba8
......@@ -10,20 +10,18 @@
// This value is generated during Pedal concept data processing, and written
// to all data files as well as the source code here to ensure synchrony.
// The runtime loaded data must match this version exactly or it won't load.
constexpr int OMNIBOX_PEDAL_CONCEPTS_DATA_VERSION = 15220441;
constexpr int OMNIBOX_PEDAL_CONCEPTS_DATA_VERSION = 15436849;
// Unique identifiers for Pedals, used to bind loaded data to implementations.
enum class OmniboxPedalId {
NONE = 0,
CLEAR_BROWSING_DATA = 1,
CHANGE_SEARCH_ENGINE = 2,
MANAGE_PASSWORDS = 3,
CHANGE_HOME_PAGE = 4,
UPDATE_CREDIT_CARD = 5,
LAUNCH_INCOGNITO = 6,
TRANSLATE = 7,
UPDATE_CHROME = 8,
MANAGE_PASSWORDS = 2,
UPDATE_CREDIT_CARD = 3,
LAUNCH_INCOGNITO = 4,
TRANSLATE = 5,
UPDATE_CHROME = 6,
};
#endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_PEDAL_CONCEPTS_H_
......@@ -18,31 +18,15 @@
// =============================================================================
OmniboxPedalClearBrowsingData::OmniboxPedalClearBrowsingData()
: OmniboxPedal(
LabelStrings(
IDS_OMNIBOX_PEDAL_CLEAR_BROWSING_DATA_HINT,
IDS_OMNIBOX_PEDAL_CLEAR_BROWSING_DATA_HINT_SHORT,
IDS_OMNIBOX_PEDAL_CLEAR_BROWSING_DATA_SUGGESTION_CONTENTS),
GURL("chrome://settings/clearBrowserData")) {}
#if (!defined(OS_ANDROID) || BUILDFLAG(ENABLE_VR)) && !defined(OS_IOS)
const gfx::VectorIcon& OmniboxPedalClearBrowsingData::GetVectorIcon() const {
return omnibox::kAnswerWhenIsIcon;
}
#endif
// =============================================================================
class OmniboxPedalChangeSearchEngine : public OmniboxPedal {
class OmniboxPedalClearBrowsingData : public OmniboxPedal {
public:
OmniboxPedalChangeSearchEngine()
OmniboxPedalClearBrowsingData()
: OmniboxPedal(
LabelStrings(
IDS_OMNIBOX_PEDAL_CHANGE_SEARCH_ENGINE_HINT,
IDS_OMNIBOX_PEDAL_CHANGE_SEARCH_ENGINE_HINT_SHORT,
IDS_OMNIBOX_PEDAL_CHANGE_SEARCH_ENGINE_SUGGESTION_CONTENTS),
GURL("chrome://settings/searchEngines")) {}
IDS_OMNIBOX_PEDAL_CLEAR_BROWSING_DATA_HINT,
IDS_OMNIBOX_PEDAL_CLEAR_BROWSING_DATA_HINT_SHORT,
IDS_OMNIBOX_PEDAL_CLEAR_BROWSING_DATA_SUGGESTION_CONTENTS),
GURL("chrome://settings/clearBrowserData")) {}
};
// =============================================================================
......@@ -60,20 +44,6 @@ class OmniboxPedalManagePasswords : public OmniboxPedal {
// =============================================================================
// TODO(orinj): Use better scoping for existing setting, or link to new UI.
class OmniboxPedalChangeHomePage : public OmniboxPedal {
public:
OmniboxPedalChangeHomePage()
: OmniboxPedal(
LabelStrings(
IDS_OMNIBOX_PEDAL_CHANGE_HOME_PAGE_HINT,
IDS_OMNIBOX_PEDAL_CHANGE_HOME_PAGE_HINT_SHORT,
IDS_OMNIBOX_PEDAL_CHANGE_HOME_PAGE_SUGGESTION_CONTENTS),
GURL("chrome://settings/?search=show+home+button")) {}
};
// =============================================================================
class OmniboxPedalUpdateCreditCard : public OmniboxPedal {
public:
OmniboxPedalUpdateCreditCard()
......@@ -141,10 +111,7 @@ GetPedalImplementations() {
pedals.insert(std::make_pair(id, std::unique_ptr<OmniboxPedal>(pedal)));
};
add(OmniboxPedalId::CLEAR_BROWSING_DATA, new OmniboxPedalClearBrowsingData());
add(OmniboxPedalId::CHANGE_SEARCH_ENGINE,
new OmniboxPedalChangeSearchEngine());
add(OmniboxPedalId::MANAGE_PASSWORDS, new OmniboxPedalManagePasswords());
add(OmniboxPedalId::CHANGE_HOME_PAGE, new OmniboxPedalChangeHomePage());
add(OmniboxPedalId::UPDATE_CREDIT_CARD, new OmniboxPedalUpdateCreditCard());
add(OmniboxPedalId::LAUNCH_INCOGNITO, new OmniboxPedalLaunchIncognito());
add(OmniboxPedalId::TRANSLATE, new OmniboxPedalTranslate());
......
......@@ -12,14 +12,6 @@
#include "components/omnibox/browser/omnibox_pedal.h"
#include "components/omnibox/browser/omnibox_pedal_concepts.h"
class OmniboxPedalClearBrowsingData : public OmniboxPedal {
public:
OmniboxPedalClearBrowsingData();
#if (!defined(OS_ANDROID) || BUILDFLAG(ENABLE_VR)) && !defined(OS_IOS)
const gfx::VectorIcon& GetVectorIcon() const override;
#endif
};
// Returns the full set of encapsulated OmniboxPedal implementations.
std::unordered_map<OmniboxPedalId, std::unique_ptr<OmniboxPedal>>
GetPedalImplementations();
......
{
"schema": "pedal_concepts_runtime",
"schema_version": 1,
"data_version": 15220441,
"data_version": 15436849,
"tokenize_characters": " -",
"dictionary": [
"aktualisieren",
......@@ -20,8 +20,6 @@
"die",
"diese",
"ein",
"einstellen",
"einstellungen",
"entfernen",
"fenster",
"google",
......@@ -57,19 +55,9 @@
"seinen",
"seite",
"sprache",
"standard",
"standardeinstellung",
"standardsuche",
"standardsuchmaschine",
"start",
"starten",
"startseite",
"suche",
"sucheinstellung",
"suchmaschine",
"suchverlauf",
"surfen",
"umstellen",
"update",
"upgrade",
"upgraden",
......@@ -77,7 +65,6 @@
"verwalten",
"webseite",
"website",
"wechseln",
"wie",
"wo",
"ändern",
......@@ -94,7 +81,7 @@
"single": true,
"synonyms": [
[
20,
18,
10
],
[
......@@ -110,13 +97,13 @@
"single": true,
"synonyms": [
[
18
16
],
[
35
33
],
[
34
32
]
]
},
......@@ -131,10 +118,10 @@
7
],
[
63
52
],
[
69
57
],
[
9
......@@ -146,97 +133,16 @@
}
]
},
{
"name": "CHANGE_SEARCH_ENGINE",
"id": 2,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
20,
10
],
[
6
],
[
10
],
[
20
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
16
],
[
65
],
[
73
],
[
76
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
54,
60
],
[
53,
62
],
[
53,
62
],
[
17,
60
],
[
53,
60
],
[
56
],
[
61
],
[
55
],
[
62
]
]
}
]
},
{
"name": "MANAGE_PASSWORDS",
"id": 3,
"id": 2,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
20,
18,
10
],
[
......@@ -252,7 +158,7 @@
"single": true,
"synonyms": [
[
70
58
],
[
1
......@@ -261,59 +167,7 @@
2
],
[
76
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
44
],
[
43
]
]
}
]
},
{
"name": "CHANGE_HOME_PAGE",
"id": 4,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
20,
10
],
[
6
],
[
10
]
]
},
{
"required": true,
"single": true,
"synonyms": [
[
16
],
[
65
],
[
73
],
[
76
63
]
]
},
......@@ -322,11 +176,10 @@
"single": true,
"synonyms": [
[
57,
51
42
],
[
59
41
]
]
}
......@@ -334,14 +187,14 @@
},
{
"name": "UPDATE_CREDIT_CARD",
"id": 5,
"id": 3,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
20,
18,
10
],
[
......@@ -363,7 +216,7 @@
5
],
[
76
63
]
]
},
......@@ -372,17 +225,17 @@
"single": true,
"synonyms": [
[
31,
29
29,
27
],
[
33
31
],
[
32
30
],
[
30
28
]
]
}
......@@ -390,14 +243,14 @@
},
{
"name": "LAUNCH_INCOGNITO",
"id": 6,
"id": 4,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
20,
18,
10
],
[
......@@ -416,13 +269,13 @@
3
],
[
58
51
],
[
77
64
],
[
64
53
]
]
},
......@@ -431,31 +284,31 @@
"single": true,
"synonyms": [
[
24,
19
22,
17
],
[
24,
42
22,
40
],
[
45,
42
43,
40
],
[
25
23
],
[
26
24
],
[
46
44
],
[
24
22
],
[
45
43
]
]
}
......@@ -463,14 +316,14 @@
},
{
"name": "TRANSLATE",
"id": 7,
"id": 5,
"groups": [
{
"required": false,
"single": true,
"synonyms": [
[
20,
18,
10
],
[
......@@ -486,11 +339,11 @@
"single": true,
"synonyms": [
[
52,
76
50,
63
],
[
78
65
]
]
},
......@@ -500,24 +353,24 @@
"synonyms": [
[
14,
71
59
],
[
14,
72
60
],
[
14,
51
49
],
[
71
59
],
[
72
60
],
[
51
49
]
]
},
......@@ -534,14 +387,14 @@
},
{
"name": "UPDATE_CHROME",
"id": 8,
"id": 6,
"groups": [
{
"required": true,
"single": true,
"synonyms": [
[
20,
18,
10
],
[
......@@ -560,16 +413,16 @@
0
],
[
27
25
],
[
68
56
],
[
67
55
],
[
66
54
]
]
}
......@@ -581,40 +434,40 @@
"single": false,
"synonyms": [
[
39
37
],
[
49
47
],
[
50
48
],
[
40
38
],
[
38
36
],
[
48
46
],
[
28
26
],
[
37
35
],
[
47
45
],
[
74
61
],
[
21
19
],
[
36
34
],
[
13
......@@ -623,7 +476,7 @@
4
],
[
41
39
],
[
12
......@@ -632,13 +485,13 @@
15
],
[
75
62
],
[
23
21
],
[
22
20
]
]
},
......
......@@ -110,16 +110,6 @@
Clear Chrome's browsing history data
</message>
<message name="IDS_OMNIBOX_PEDAL_CHANGE_SEARCH_ENGINE_HINT" desc="The button text contents to suggest pedal action, change search engine.">
Change Search Engine
</message>
<message name="IDS_OMNIBOX_PEDAL_CHANGE_SEARCH_ENGINE_HINT_SHORT" desc="The short one-word button text contents to suggest pedal action, change search engine.">
Change
</message>
<message name="IDS_OMNIBOX_PEDAL_CHANGE_SEARCH_ENGINE_SUGGESTION_CONTENTS" desc="The suggestion content text to suggest pedal action, change search engine.">
Change Search Engine settings in Chrome
</message>
<message name="IDS_OMNIBOX_PEDAL_MANAGE_PASSWORDS_HINT" desc="The button text contents to suggest pedal action, manage passwords.">
Manage Passwords
</message>
......@@ -130,16 +120,6 @@
Manage passwords in Chrome settings
</message>
<message name="IDS_OMNIBOX_PEDAL_CHANGE_HOME_PAGE_HINT" desc="The button text contents to suggest pedal action, change home page.">
Change Home Page
</message>
<message name="IDS_OMNIBOX_PEDAL_CHANGE_HOME_PAGE_HINT_SHORT" desc="The short one-word button text contents to suggest pedal action, change home page.">
Change
</message>
<message name="IDS_OMNIBOX_PEDAL_CHANGE_HOME_PAGE_SUGGESTION_CONTENTS" desc="The suggestion content text to suggest pedal action, change home page.">
Change home page in Chrome settings
</message>
<message name="IDS_OMNIBOX_PEDAL_UPDATE_CREDIT_CARD_HINT" desc="The button text contents to suggest pedal action, update credit card.">
Update Credit Card
</message>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment