Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6733)

Unified Diff: chrome/browser/ui/webui/translate_internals/translate_internals_handler.h

Issue 1903593002: Allows to manually change the stored permanent country in Variations from the translate-internals d… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/translate_internals/translate_internals_handler.h
diff --git a/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h b/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h
index 7293dc6740466044d17480fa523fda9ae2a1f9cd..c834dabeaf6291344f8a3d2758f542d2cd3370c9 100644
--- a/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h
+++ b/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h
@@ -61,6 +61,10 @@ class TranslateInternalsHandler : public content::WebUIMessageHandler,
// when UI requests to remove an item in the preference.
void OnRemovePrefItem(const base::ListValue* args);
+ // Handles the Javascript message 'overrideCountry'. This message is sent
+ // when UI requests to override the stored country.
+ void OnOverrideCountry(const base::ListValue* country);
+
// Handles the Javascript message 'requestInfo'. This message is sent
// when UI needs to show information concerned with the translation.
// For now, this returns only prefs to Javascript.
@@ -76,6 +80,10 @@ class TranslateInternalsHandler : public content::WebUIMessageHandler,
// Sends the languages currently supported by the server to JavaScript.
void SendSupportedLanguagesToJs();
+ // Sends the stored permanent country to Javascript.
+ // |was_updated| tells Javascript if the country has been updated or not.
+ void SendCountryToJs(bool was_updated);
+
// Subscription for translate events coming from the translate language list.
std::unique_ptr<
translate::TranslateLanguageList::EventCallbackList::Subscription>

Powered by Google App Engine
This is Rietveld 408576698