Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/browsing_data/core/browsing_data_utils.h" | 5 #include "components/browsing_data/core/browsing_data_utils.h" |
| 6 | 6 |
| 7 #include "components/browsing_data/core/counters/autofill_counter.h" | 7 #include "components/browsing_data/core/counters/autofill_counter.h" |
| 8 #include "components/browsing_data/core/counters/history_counter.h" | 8 #include "components/browsing_data/core/counters/history_counter.h" |
| 9 #include "components/browsing_data/core/counters/passwords_counter.h" | 9 #include "components/browsing_data/core/counters/passwords_counter.h" |
| 10 #include "components/browsing_data/core/pref_names.h" | 10 #include "components/browsing_data/core/pref_names.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 displayed_strings[1], displayed_strings[2]); | 134 displayed_strings[1], displayed_strings[2]); |
| 135 break; | 135 break; |
| 136 default: | 136 default: |
| 137 NOTREACHED(); | 137 NOTREACHED(); |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 return text; | 141 return text; |
| 142 } | 142 } |
| 143 | 143 |
| 144 bool GetDeletionPreferenceFromDataType( | |
| 145 browsing_data::BrowsingDataType data_type, | |
|
msramek
2016/08/11 09:12:45
Ditto here. Please remove the browsing_data qualif
ioanap
2016/08/11 11:19:58
Done.
| |
| 146 std::string* out_pref) { | |
| 147 switch (data_type) { | |
| 148 case browsing_data::HISTORY: | |
| 149 *out_pref = browsing_data::prefs::kDeleteBrowsingHistory; | |
| 150 return true; | |
| 151 case browsing_data::CACHE: | |
| 152 *out_pref = browsing_data::prefs::kDeleteCache; | |
| 153 return true; | |
| 154 case browsing_data::COOKIES: | |
| 155 *out_pref = browsing_data::prefs::kDeleteCookies; | |
| 156 return true; | |
| 157 case browsing_data::PASSWORDS: | |
| 158 *out_pref = browsing_data::prefs::kDeletePasswords; | |
| 159 return true; | |
| 160 case browsing_data::FORM_DATA: | |
| 161 *out_pref = browsing_data::prefs::kDeleteFormData; | |
| 162 return true; | |
| 163 case browsing_data::BOOKMARKS: | |
| 164 // Bookmarks are deleted on the Android side. No corresponding deletion | |
| 165 // preference. | |
| 166 return false; | |
| 167 case browsing_data::NUM_TYPES: | |
| 168 // This is not an actual type. | |
| 169 NOTREACHED(); | |
| 170 return false; | |
| 171 } | |
| 172 NOTREACHED(); | |
| 173 return false; | |
| 174 } | |
| 175 | |
| 144 } // namespace browsing_data | 176 } // namespace browsing_data |
| OLD | NEW |