Index: chrome/browser/android/browsing_data/browsing_data_counter_bridge.cc |
diff --git a/chrome/browser/android/browsing_data/browsing_data_counter_bridge.cc b/chrome/browser/android/browsing_data/browsing_data_counter_bridge.cc |
index ffd8e913d38dd52813c971b167f6b738f5503ef1..051a777f92872e242f54eccbc495533220b8c323 100644 |
--- a/chrome/browser/android/browsing_data/browsing_data_counter_bridge.cc |
+++ b/chrome/browser/android/browsing_data/browsing_data_counter_bridge.cc |
@@ -10,21 +10,28 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/common/pref_names.h" |
-#include "components/browsing_data/core/browsing_data_utils.h" |
#include "jni/BrowsingDataCounterBridge_jni.h" |
using base::android::JavaParamRef; |
using base::android::ScopedJavaLocalRef; |
BrowsingDataCounterBridge::BrowsingDataCounterBridge( |
- JNIEnv* env, const JavaParamRef<jobject>& obj, jint data_type) |
+ JNIEnv* env, |
+ const JavaParamRef<jobject>& obj, |
+ jint data_type, |
+ jint pref_type_int) |
: jobject_(obj) { |
DCHECK_GE(data_type, 0); |
DCHECK_LT(data_type, browsing_data::NUM_TYPES); |
msramek
2017/02/08 10:55:56
While you're here, can you please change this enum
dullweber
2017/02/08 23:03:18
I changed BrowsingDataType and also TimePeriod to
|
+ DCHECK_GE(pref_type_int, 0); |
msramek
2017/02/08 10:55:56
Please also add the other DCHECK.
dullweber
2017/02/08 23:03:18
Done.
|
+ |
+ pref_type_ = static_cast<browsing_data::ClearBrowsingDataPreferenceType>( |
+ pref_type_int); |
std::string pref; |
if (!browsing_data::GetDeletionPreferenceFromDataType( |
- static_cast<browsing_data::BrowsingDataType>(data_type), &pref)) { |
+ static_cast<browsing_data::BrowsingDataType>(data_type), pref_type_, |
+ &pref)) { |
return; |
} |
@@ -35,7 +42,7 @@ BrowsingDataCounterBridge::BrowsingDataCounterBridge( |
if (!counter_) |
return; |
- counter_->Init(profile->GetPrefs(), |
+ counter_->Init(profile->GetPrefs(), pref_type_, |
base::Bind(&BrowsingDataCounterBridge::onCounterFinished, |
base::Unretained(this))); |
counter_->Restart(); |
@@ -64,8 +71,10 @@ void BrowsingDataCounterBridge::onCounterFinished( |
result_string); |
} |
-static jlong Init( |
- JNIEnv* env, const JavaParamRef<jobject>& obj, int data_type) { |
+static jlong Init(JNIEnv* env, |
+ const JavaParamRef<jobject>& obj, |
+ jint data_type, |
+ jint pref_type) { |
return reinterpret_cast<intptr_t>( |
- new BrowsingDataCounterBridge(env, obj, data_type)); |
+ new BrowsingDataCounterBridge(env, obj, data_type, pref_type)); |
} |