| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/android/preferences/pref_service_bridge.h" | 5 #include "chrome/browser/android/preferences/pref_service_bridge.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 base::android::AppendJavaStringArrayToStringVector( | 640 base::android::AppendJavaStringArrayToStringVector( |
| 641 env, jignoring_domains.obj(), &ignoring_domains); | 641 env, jignoring_domains.obj(), &ignoring_domains); |
| 642 base::android::JavaIntArrayToIntVector(env, jignoring_domain_reasons.obj(), | 642 base::android::JavaIntArrayToIntVector(env, jignoring_domain_reasons.obj(), |
| 643 &ignoring_domain_reasons); | 643 &ignoring_domain_reasons); |
| 644 std::unique_ptr<RegistrableDomainFilterBuilder> filter_builder( | 644 std::unique_ptr<RegistrableDomainFilterBuilder> filter_builder( |
| 645 new RegistrableDomainFilterBuilder(BrowsingDataFilterBuilder::BLACKLIST)); | 645 new RegistrableDomainFilterBuilder(BrowsingDataFilterBuilder::BLACKLIST)); |
| 646 for (const std::string& domain : excluding_domains) { | 646 for (const std::string& domain : excluding_domains) { |
| 647 filter_builder->AddRegisterableDomain(domain); | 647 filter_builder->AddRegisterableDomain(domain); |
| 648 } | 648 } |
| 649 | 649 |
| 650 if (!excluding_domains.empty()) { | 650 if (!excluding_domains.empty() || !ignoring_domains.empty()) { |
| 651 ImportantSitesUtil::RecordBlacklistedAndIgnoredImportantSites( | 651 ImportantSitesUtil::RecordBlacklistedAndIgnoredImportantSites( |
| 652 GetOriginalProfile(), excluding_domains, excluding_domain_reasons, | 652 GetOriginalProfile(), excluding_domains, excluding_domain_reasons, |
| 653 ignoring_domains, ignoring_domain_reasons); | 653 ignoring_domains, ignoring_domain_reasons); |
| 654 } | 654 } |
| 655 | 655 |
| 656 // Delete the filterable types with a filter, and the rest completely. | 656 // Delete the filterable types with a filter, and the rest completely. |
| 657 // TODO(msramek): This is only necessary until the filter is implemented in | 657 // TODO(msramek): This is only necessary until the filter is implemented in |
| 658 // all data storage backends. | 658 // all data storage backends. |
| 659 int filterable_mask = remove_mask & BrowsingDataRemover::FILTERABLE_DATATYPES; | 659 int filterable_mask = remove_mask & BrowsingDataRemover::FILTERABLE_DATATYPES; |
| 660 int nonfilterable_mask = | 660 int nonfilterable_mask = |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 | 1210 |
| 1211 return ConvertJavaStringToUTF8(android_permission); | 1211 return ConvertJavaStringToUTF8(android_permission); |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 static void SetSupervisedUserId(JNIEnv* env, | 1214 static void SetSupervisedUserId(JNIEnv* env, |
| 1215 const JavaParamRef<jobject>& obj, | 1215 const JavaParamRef<jobject>& obj, |
| 1216 const JavaParamRef<jstring>& pref) { | 1216 const JavaParamRef<jstring>& pref) { |
| 1217 GetPrefService()->SetString(prefs::kSupervisedUserId, | 1217 GetPrefService()->SetString(prefs::kSupervisedUserId, |
| 1218 ConvertJavaStringToUTF8(env, pref)); | 1218 ConvertJavaStringToUTF8(env, pref)); |
| 1219 } | 1219 } |
| OLD | NEW |