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/sequenced_task_runner.h" |
13 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
14 #include "components/pref_registry/pref_registry_syncable.h" | 15 #include "components/pref_registry/pref_registry_syncable.h" |
15 #include "components/prefs/json_pref_store.h" | 16 #include "components/prefs/json_pref_store.h" |
16 #include "components/prefs/pref_filter.h" | 17 #include "components/prefs/pref_filter.h" |
17 #include "components/prefs/pref_service_factory.h" | 18 #include "components/prefs/pref_service_factory.h" |
18 #include "components/translate/core/browser/translate_pref_names.h" | 19 #include "components/translate/core/browser/translate_pref_names.h" |
19 #include "components/translate/core/browser/translate_prefs.h" | 20 #include "components/translate/core/browser/translate_prefs.h" |
20 #include "ios/web/public/web_thread.h" | 21 #include "ios/web/public/web_thread.h" |
21 #include "ios/web_view/internal/pref_names.h" | 22 #include "ios/web_view/internal/pref_names.h" |
22 #include "ios/web_view/internal/web_view_url_request_context_getter.h" | 23 #include "ios/web_view/internal/web_view_url_request_context_getter.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // TODO(crbug.com/679895): Find a good value for the kAcceptLanguages pref. | 96 // 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 | 97 // TODO(crbug.com/679895): Pass this value to the network stack somehow, for |
97 // the HTTP header. | 98 // the HTTP header. |
98 pref_registry->RegisterStringPref(prefs::kAcceptLanguages, | 99 pref_registry->RegisterStringPref(prefs::kAcceptLanguages, |
99 l10n_util::GetLocaleOverride()); | 100 l10n_util::GetLocaleOverride()); |
100 pref_registry->RegisterBooleanPref(prefs::kEnableTranslate, true); | 101 pref_registry->RegisterBooleanPref(prefs::kEnableTranslate, true); |
101 translate::TranslatePrefs::RegisterProfilePrefs(pref_registry); | 102 translate::TranslatePrefs::RegisterProfilePrefs(pref_registry); |
102 } | 103 } |
103 | 104 |
104 } // namespace ios_web_view | 105 } // namespace ios_web_view |
OLD | NEW |