Chromium Code Reviews| Index: components/dom_distiller/core/profile_utils_android.cc |
| diff --git a/components/dom_distiller/core/profile_utils_android.cc b/components/dom_distiller/core/profile_utils_android.cc |
| index 50c22df06b4cb40de57ac6df0370efd7b8299274..fba99e8128e4eb5a4e41fd3324a92c87c14fb234 100644 |
| --- a/components/dom_distiller/core/profile_utils_android.cc |
| +++ b/components/dom_distiller/core/profile_utils_android.cc |
| @@ -3,10 +3,10 @@ |
| // found in the LICENSE file. |
| #include "components/dom_distiller/core/profile_utils_android.h" |
| -#include <string> |
| -#include "base/android/jni_string.h" |
| +#include "components/dom_distiller/core/reader_mode_preferences.h" |
| + |
| #include "jni/ProfileUtils_jni.h" |
| -#include <sstream> |
| + |
| namespace dom_distiller { |
| @@ -14,22 +14,19 @@ namespace profile_utils { |
| namespace android { |
| -jstring SetHighContrastMode(JNIEnv* env, jobject obj, jlong ptr, jboolean enabled) { |
| - // ProfileManager::GetActiveUserProfile()->GetOriginalProfile(); |
| - std::stringstream ss; |
| - ss << ptr; |
| - std::string s = "profile utils.cc called and the long we got was "+ss.str(); |
| - |
| - return base::android::ConvertUTF8ToJavaString(env, s).Release(); |
| +void SetHighContrastMode(JNIEnv* env, jobject obj, jlong ptr, |
|
robliao
2014/06/20 21:13:45
Apply 80 Character limit.
sunangel
2014/06/24 00:03:43
Done.
|
| + jboolean enabled) { |
| + ReaderModePrefs* myReaderModePrefs = |
| + reinterpret_cast<ReaderModePrefs*> (ptr); |
|
robliao
2014/06/20 21:13:45
Remove space between > and (
sunangel
2014/06/24 00:03:43
Done.
|
| + DCHECK(myReaderModePrefs); |
|
robliao
2014/06/20 21:13:45
A DCHECK isn't necessary here. We're going to cras
sunangel
2014/06/24 00:03:43
Done.
|
| + myReaderModePrefs->GetHighContrastPref(); |
| + myReaderModePrefs->OnChangeHighContrast(enabled); |
| } |
| - |
| - |
| bool RegisterProfileUtils(JNIEnv* env) { return RegisterNativesImpl(env); } |
| - |
| } // namespace android |
| -} // namespace url_utils |
| +} // namespace profile_utils |
| } // namespace dom_distiller |