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

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

Issue 2455113003: MD Settings: Fix Client Navigations to Search Query URLs (Closed)
Patch Set: Fix implementation Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/system_tray_client.cc » ('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 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 "chrome/browser/interstitials/chrome_controller_client.h" 5 #include "chrome/browser/interstitials/chrome_controller_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/process/launch.h" 10 #include "base/process/launch.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/public/common/referrer.h" 21 #include "content/public/common/referrer.h"
22 22
23 #if defined(OS_ANDROID) 23 #if defined(OS_ANDROID)
24 #include "chrome/browser/android/intent_helper.h" 24 #include "chrome/browser/android/intent_helper.h"
25 #endif 25 #endif
26 26
27 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
28 #include "chrome/browser/profiles/profile_manager.h" 28 #include "chrome/browser/profiles/profile_manager.h"
29 #include "chrome/browser/ui/chrome_pages.h" 29 #include "chrome/browser/ui/chrome_pages.h"
30 #include "chrome/common/url_constants.h" 30 #include "chrome/common/url_constants.h"
31 #include "chrome/grit/generated_resources.h"
32 #include "ui/base/l10n/l10n_util.h"
33 #endif 31 #endif
34 32
35 #if defined(OS_WIN) 33 #if defined(OS_WIN)
36 #include "base/base_paths_win.h" 34 #include "base/base_paths_win.h"
37 #include "base/path_service.h" 35 #include "base/path_service.h"
38 #include "base/strings/string16.h" 36 #include "base/strings/string16.h"
39 #include "base/win/windows_version.h" 37 #include "base/win/windows_version.h"
40 #endif 38 #endif
41 39
42 using content::Referrer; 40 using content::Referrer;
43 41
44 namespace { 42 namespace {
45 43
46 void LaunchDateAndTimeSettingsOnFile() { 44 void LaunchDateAndTimeSettingsOnFile() {
47 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); 45 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
48 // The code for each OS is completely separate, in order to avoid bugs like 46 // The code for each OS is completely separate, in order to avoid bugs like
49 // https://crbug.com/430877 . 47 // https://crbug.com/430877 .
50 #if defined(OS_ANDROID) 48 #if defined(OS_ANDROID)
51 chrome::android::OpenDateAndTimeSettings(); 49 chrome::android::OpenDateAndTimeSettings();
52 50
53 #elif defined(OS_CHROMEOS) 51 #elif defined(OS_CHROMEOS)
54 std::string sub_page =
55 std::string(chrome::kSearchSubPage) + "#" +
56 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
57 chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(), 52 chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(),
58 sub_page); 53 chrome::kDateTimeSubPage);
59 54
60 #elif defined(OS_LINUX) 55 #elif defined(OS_LINUX)
61 struct ClockCommand { 56 struct ClockCommand {
62 const char* pathname; 57 const char* pathname;
63 const char* argument; 58 const char* argument;
64 }; 59 };
65 static const ClockCommand kClockCommands[] = { 60 static const ClockCommand kClockCommands[] = {
66 // Unity 61 // Unity
67 {"/usr/bin/unity-control-center", "datetime"}, 62 {"/usr/bin/unity-control-center", "datetime"},
68 // GNOME 63 // GNOME
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 176
182 PrefService* ChromeControllerClient::GetPrefService() { 177 PrefService* ChromeControllerClient::GetPrefService() {
183 Profile* profile = 178 Profile* profile =
184 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 179 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
185 return profile->GetPrefs(); 180 return profile->GetPrefs();
186 } 181 }
187 182
188 const std::string ChromeControllerClient::GetExtendedReportingPrefName() { 183 const std::string ChromeControllerClient::GetExtendedReportingPrefName() {
189 return safe_browsing::GetExtendedReportingPrefName(*GetPrefService()); 184 return safe_browsing::GetExtendedReportingPrefName(*GetPrefService());
190 } 185 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/system_tray_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698