| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 base::android::AppendJavaStringArrayToStringVector( | 641 base::android::AppendJavaStringArrayToStringVector( |
| 642 env, jignoring_domains.obj(), &ignoring_domains); | 642 env, jignoring_domains.obj(), &ignoring_domains); |
| 643 base::android::JavaIntArrayToIntVector(env, jignoring_domain_reasons.obj(), | 643 base::android::JavaIntArrayToIntVector(env, jignoring_domain_reasons.obj(), |
| 644 &ignoring_domain_reasons); | 644 &ignoring_domain_reasons); |
| 645 std::unique_ptr<RegistrableDomainFilterBuilder> filter_builder( | 645 std::unique_ptr<RegistrableDomainFilterBuilder> filter_builder( |
| 646 new RegistrableDomainFilterBuilder(BrowsingDataFilterBuilder::BLACKLIST)); | 646 new RegistrableDomainFilterBuilder(BrowsingDataFilterBuilder::BLACKLIST)); |
| 647 for (const std::string& domain : excluding_domains) { | 647 for (const std::string& domain : excluding_domains) { |
| 648 filter_builder->AddRegisterableDomain(domain); | 648 filter_builder->AddRegisterableDomain(domain); |
| 649 } | 649 } |
| 650 | 650 |
| 651 if (!excluding_domains.empty()) { | 651 if (!excluding_domains.empty() || !ignoring_domains.empty()) { |
| 652 ImportantSitesUtil::RecordBlacklistedAndIgnoredImportantSites( | 652 ImportantSitesUtil::RecordBlacklistedAndIgnoredImportantSites( |
| 653 GetOriginalProfile(), excluding_domains, excluding_domain_reasons, | 653 GetOriginalProfile(), excluding_domains, excluding_domain_reasons, |
| 654 ignoring_domains, ignoring_domain_reasons); | 654 ignoring_domains, ignoring_domain_reasons); |
| 655 } | 655 } |
| 656 | 656 |
| 657 // Delete the types protected by Important Sites with a filter, | 657 // Delete the types protected by Important Sites with a filter, |
| 658 // and the rest completely. | 658 // and the rest completely. |
| 659 int filterable_mask = | 659 int filterable_mask = |
| 660 remove_mask & BrowsingDataRemover::IMPORTANT_SITES_DATATYPES; | 660 remove_mask & BrowsingDataRemover::IMPORTANT_SITES_DATATYPES; |
| 661 int nonfilterable_mask = remove_mask & | 661 int nonfilterable_mask = remove_mask & |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 | 1211 |
| 1212 return ConvertJavaStringToUTF8(android_permission); | 1212 return ConvertJavaStringToUTF8(android_permission); |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 static void SetSupervisedUserId(JNIEnv* env, | 1215 static void SetSupervisedUserId(JNIEnv* env, |
| 1216 const JavaParamRef<jobject>& obj, | 1216 const JavaParamRef<jobject>& obj, |
| 1217 const JavaParamRef<jstring>& pref) { | 1217 const JavaParamRef<jstring>& pref) { |
| 1218 GetPrefService()->SetString(prefs::kSupervisedUserId, | 1218 GetPrefService()->SetString(prefs::kSupervisedUserId, |
| 1219 ConvertJavaStringToUTF8(env, pref)); | 1219 ConvertJavaStringToUTF8(env, pref)); |
| 1220 } | 1220 } |
| OLD | NEW |