Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: ios/web_view/internal/criwv_browser_state.mm

Issue 2650323002: Cleanup ios/web_view. (Closed)
Patch Set: Respond to comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/web_view/internal/criwv_web_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/criwv_browser_state.h" 5 #include "ios/web_view/internal/criwv_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_prefs.h" 18 #include "components/translate/core/browser/translate_prefs.h"
19 #include "components/translate/core/common/translate_pref_names.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/criwv_url_request_context_getter.h" 21 #include "ios/web_view/internal/criwv_url_request_context_getter.h"
22 #include "ios/web_view/internal/pref_names.h" 22 #include "ios/web_view/internal/pref_names.h"
23 #include "ui/base/l10n/l10n_util_mac.h" 23 #include "ui/base/l10n/l10n_util_mac.h"
24 24
25 namespace { 25 namespace {
26 const char kPreferencesFilename[] = "Preferences"; 26 const char kPreferencesFilename[] = FILE_PATH_LITERAL("Preferences");
27 } 27 }
28 28
29 namespace ios_web_view { 29 namespace ios_web_view {
30 30
31 CRIWVBrowserState::CRIWVBrowserState() : web::BrowserState() { 31 CRIWVBrowserState::CRIWVBrowserState() : web::BrowserState() {
32 CHECK(PathService::Get(base::DIR_APP_DATA, &path_)); 32 CHECK(PathService::Get(base::DIR_APP_DATA, &path_));
33 33
34 request_context_getter_ = new CRIWVURLRequestContextGetter( 34 request_context_getter_ = new CRIWVURLRequestContextGetter(
35 GetStatePath(), 35 GetStatePath(),
36 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), 36 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // TODO(crbug.com/679895): Find a good value for the kAcceptLanguages pref. 83 // TODO(crbug.com/679895): Find a good value for the kAcceptLanguages pref.
84 // TODO(crbug.com/679895): Pass this value to the network stack somehow, for 84 // TODO(crbug.com/679895): Pass this value to the network stack somehow, for
85 // the HTTP header. 85 // the HTTP header.
86 pref_registry->RegisterStringPref(prefs::kAcceptLanguages, 86 pref_registry->RegisterStringPref(prefs::kAcceptLanguages,
87 l10n_util::GetLocaleOverride()); 87 l10n_util::GetLocaleOverride());
88 pref_registry->RegisterBooleanPref(prefs::kEnableTranslate, true); 88 pref_registry->RegisterBooleanPref(prefs::kEnableTranslate, true);
89 translate::TranslatePrefs::RegisterProfilePrefs(pref_registry); 89 translate::TranslatePrefs::RegisterProfilePrefs(pref_registry);
90 } 90 }
91 91
92 } // namespace ios_web_view 92 } // namespace ios_web_view
OLDNEW
« no previous file with comments | « no previous file | ios/web_view/internal/criwv_web_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698