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

Side by Side Diff: ios/chrome/browser/interstitials/ios_security_interstitial_page.mm

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chrome/browser/interstitials/ios_security_interstitial_page.h" 5 #include "ios/chrome/browser/interstitials/ios_security_interstitial_page.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "components/prefs/pref_service.h"
9 #include "components/security_interstitials/core/common_string_util.h" 9 #include "components/security_interstitials/core/common_string_util.h"
10 #include "components/security_interstitials/core/metrics_helper.h" 10 #include "components/security_interstitials/core/metrics_helper.h"
11 #include "grit/components_resources.h" 11 #include "grit/components_resources.h"
12 #include "ios/chrome/browser/application_context.h" 12 #include "ios/chrome/browser/application_context.h"
13 #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h" 13 #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h"
14 #include "ios/chrome/browser/pref_names.h" 14 #include "ios/chrome/browser/pref_names.h"
15 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state. h" 15 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state. h"
16 #include "ios/web/public/interstitials/web_interstitial.h" 16 #include "ios/web/public/interstitials/web_interstitial.h"
17 #include "ios/web/public/web_state/web_state.h" 17 #include "ios/web/public/web_state/web_state.h"
18 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 browser_state->GetPrefs()->GetString(prefs::kAcceptLanguages); 59 browser_state->GetPrefs()->GetString(prefs::kAcceptLanguages);
60 return security_interstitials::common_string_util::GetFormattedHostName( 60 return security_interstitials::common_string_util::GetFormattedHostName(
61 request_url_, languages); 61 request_url_, languages);
62 } 62 }
63 63
64 bool IOSSecurityInterstitialPage::IsPrefEnabled(const char* pref_name) const { 64 bool IOSSecurityInterstitialPage::IsPrefEnabled(const char* pref_name) const {
65 ios::ChromeBrowserState* browser_state = 65 ios::ChromeBrowserState* browser_state =
66 ios::ChromeBrowserState::FromBrowserState(web_state_->GetBrowserState()); 66 ios::ChromeBrowserState::FromBrowserState(web_state_->GetBrowserState());
67 return browser_state->GetPrefs()->GetBoolean(pref_name); 67 return browser_state->GetPrefs()->GetBoolean(pref_name);
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698