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

Unified Diff: chrome/browser/automation/automation_provider.cc

Issue 378031: Revert 31419 - Commit Issue 255057: Unit Test for Toggling of Encoding AutoDe... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/automation/automation_provider.h ('k') | chrome/browser/browser_encoding_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider.cc
===================================================================
--- chrome/browser/automation/automation_provider.cc (revision 31464)
+++ chrome/browser/automation/automation_provider.cc (working copy)
@@ -417,8 +417,6 @@
SetBooleanPreference)
IPC_MESSAGE_HANDLER(AutomationMsg_GetPageCurrentEncoding,
GetPageCurrentEncoding)
- IPC_MESSAGE_HANDLER(AutomationMsg_ToggleEncodingAutoDetect,
- ToggleEncodingAutoDetect)
IPC_MESSAGE_HANDLER(AutomationMsg_OverrideEncoding, OverrideEncoding)
IPC_MESSAGE_HANDLER(AutomationMsg_SavePackageShouldPromptUser,
SavePackageShouldPromptUser)
@@ -1892,8 +1890,8 @@
void AutomationProvider::GetBooleanPreference(int handle,
const std::wstring& name,
- bool* value,
- bool* success) {
+ bool* success,
+ bool* value) {
*success = false;
*value = false;
if (browser_tracker_->ContainsHandle(handle)) {
@@ -1928,30 +1926,7 @@
}
}
-// Toggles the encoding auto-detect setting.
-// While the setting is global, the tab needs to be specified as it may need
-// to be reloaded.
-void AutomationProvider::ToggleEncodingAutoDetect(int tab_handle,
- bool* success) {
- *success = false;
-#if defined(OS_WIN)
- if (tab_tracker_->ContainsHandle(tab_handle)) {
- NavigationController* nav = tab_tracker_->GetResource(tab_handle);
- Browser* browser = FindAndActivateTab(nav);
- DCHECK(browser);
-
- if (browser->command_updater()->IsCommandEnabled(IDC_ENCODING_MENU)) {
- browser->ToggleEncodingAutoDetect();
- *success = true;
- }
- }
-#else
- // TODO(port): Enable when encoding-related parts of Browser are ported.
- NOTIMPLEMENTED();
-#endif
-}
-
-// Sets the override encoding for the page in the specified tab.
+// Gets the current used encoding name of the page in the specified tab.
void AutomationProvider::OverrideEncoding(int tab_handle,
const std::string& encoding_name,
bool* success) {
« no previous file with comments | « chrome/browser/automation/automation_provider.h ('k') | chrome/browser/browser_encoding_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698