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

Side by Side Diff: chrome/browser/interstitials/chrome_controller_client.cc

Issue 1467063002: Introduce the ChromeControllerClient class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix Created 5 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/interstitials/chrome_controller_client.h"
6
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/pref_names.h"
11 #include "content/public/browser/web_contents.h"
12 #include "content/public/common/referrer.h"
13
14 using content::Referrer;
15
16 ChromeControllerClient::ChromeControllerClient(
17 content::WebContents* web_contents)
18 : web_contents_(web_contents) {}
19
20 ChromeControllerClient::~ChromeControllerClient() {}
21
22 void ChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) {
23 content::OpenURLParams params(url, Referrer(), CURRENT_TAB,
24 ui::PAGE_TRANSITION_LINK, false);
25 web_contents_->OpenURL(params);
26 }
27
28 const std::string& ChromeControllerClient::GetApplicationLocale() {
29 return g_browser_process->GetApplicationLocale();
30 }
31
32 PrefService* ChromeControllerClient::GetPrefService() {
33 Profile* profile =
34 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
35 return profile->GetPrefs();
36 }
37
38 const std::string ChromeControllerClient::GetExtendedReportingPrefName() {
39 return prefs::kSafeBrowsingExtendedReportingEnabled;
40 }
OLDNEW
« no previous file with comments | « chrome/browser/interstitials/chrome_controller_client.h ('k') | chrome/browser/interstitials/security_interstitial_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698