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

Unified Diff: chrome/browser/translate/translate_manager.h

Issue 601069: Fix the TranslateManager and unit-tests.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.h
===================================================================
--- chrome/browser/translate/translate_manager.h (revision 38991)
+++ chrome/browser/translate/translate_manager.h (working copy)
@@ -30,10 +30,10 @@
const NotificationSource& source,
const NotificationDetails& details);
+ // Used by unit-test to enable the TranslateManager for testing purpose.
+ static void set_test_enabled(bool enabled) { test_enabled_ = enabled; }
+
protected:
- // Overriden by unit-tests to enable the TranslateManager.
- virtual bool TestEnabled() { return false; }
-
TranslateManager();
private:
@@ -58,6 +58,8 @@
typedef std::map<PrefService*, LanguageSet> PrefServiceLanguagesMap;
PrefServiceLanguagesMap accept_languages_;
+ static bool test_enabled_;
+
DISALLOW_COPY_AND_ASSIGN(TranslateManager);
};
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698