| 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 "ios/web_view/internal/web_view_browser_state.h" | 5 #include "ios/web_view/internal/web_view_browser_state.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
| 14 #include "components/pref_registry/pref_registry_syncable.h" | 14 #include "components/pref_registry/pref_registry_syncable.h" |
| 15 #include "components/prefs/json_pref_store.h" | 15 #include "components/prefs/json_pref_store.h" |
| 16 #include "components/prefs/pref_filter.h" | 16 #include "components/prefs/pref_filter.h" |
| 17 #include "components/prefs/pref_service_factory.h" | 17 #include "components/prefs/pref_service_factory.h" |
| 18 #include "components/translate/core/browser/translate_pref_names.h" |
| 18 #include "components/translate/core/browser/translate_prefs.h" | 19 #include "components/translate/core/browser/translate_prefs.h" |
| 19 #include "components/translate/core/common/translate_pref_names.h" | |
| 20 #include "ios/web/public/web_thread.h" | 20 #include "ios/web/public/web_thread.h" |
| 21 #include "ios/web_view/internal/pref_names.h" | 21 #include "ios/web_view/internal/pref_names.h" |
| 22 #include "ios/web_view/internal/web_view_url_request_context_getter.h" | 22 #include "ios/web_view/internal/web_view_url_request_context_getter.h" |
| 23 #include "ui/base/l10n/l10n_util_mac.h" | 23 #include "ui/base/l10n/l10n_util_mac.h" |
| 24 | 24 |
| 25 #if !defined(__has_feature) || !__has_feature(objc_arc) | 25 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 26 #error "This file requires ARC support." | 26 #error "This file requires ARC support." |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // TODO(crbug.com/679895): Find a good value for the kAcceptLanguages pref. | 95 // TODO(crbug.com/679895): Find a good value for the kAcceptLanguages pref. |
| 96 // TODO(crbug.com/679895): Pass this value to the network stack somehow, for | 96 // TODO(crbug.com/679895): Pass this value to the network stack somehow, for |
| 97 // the HTTP header. | 97 // the HTTP header. |
| 98 pref_registry->RegisterStringPref(prefs::kAcceptLanguages, | 98 pref_registry->RegisterStringPref(prefs::kAcceptLanguages, |
| 99 l10n_util::GetLocaleOverride()); | 99 l10n_util::GetLocaleOverride()); |
| 100 pref_registry->RegisterBooleanPref(prefs::kEnableTranslate, true); | 100 pref_registry->RegisterBooleanPref(prefs::kEnableTranslate, true); |
| 101 translate::TranslatePrefs::RegisterProfilePrefs(pref_registry); | 101 translate::TranslatePrefs::RegisterProfilePrefs(pref_registry); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace ios_web_view | 104 } // namespace ios_web_view |
| OLD | NEW |