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

Unified Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 397713007: Provide an option to launch the date and time preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_blocking_page.cc
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index ca97c2b60a0a90009235bd3716fc0b3b657f2126..9572a4a476f6e1fb6f3ddcda19bbb49b94daae03 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -10,6 +10,7 @@
#include "base/i18n/time_formatting.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
+#include "base/process/launch.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/stringprintf.h"
@@ -611,9 +612,42 @@ void SSLBlockingPage::CommandReceived(const std::string& command) {
break;
}
case CMD_CLOCK: {
- content::NavigationController::LoadURLParams help_page_params(GURL(
- "https://support.google.com/chrome/?p=ui_system_clock"));
- web_contents_->GetController().LoadURLWithParams(help_page_params);
+#if defined(OS_ANDROID)
+ CommandLine command(base::FilePath("/system/bin/am"));
+ command.AppendArg("start");
+ command.AppendArg(
+ "'com.android.settings/.Settings$DateTimeSettingsActivity'");
+#elif defined(OS_CHROMEOS)
stevenjb 2014/07/16 01:11:32 Puttung all of these #ifdefs inside a case block i
palmer 2014/07/16 02:14:35 Done.
+ // TODO(palmer)
+ break;
+#elif defined(OS_IOS)
+ // TODO(palmer)
+ break;
+#elif defined(OS_LINUX)
+ CommandLine command(base::FilePath("/usr/bin/gnome-control-center"));
+ // NOTE: On old Ubuntu, naming control panels doesn't work, so it
+ // opens the overview. This will have to be good enough.
+ command.AppendArg("datetime");
+ //
+ // TODO(palmer): Provide an option for KDE, et c.
+#elif defined(OS_MACOSX)
+ CommandLine command(base::FilePath("/usr/bin/open"));
+ command.AppendArg("/System/Library/PreferencePanes/DateAndTime.prefPane");
+#elif defined(OS_WIN)
+ base::FilePath path;
+ PathService::Get(base::DIR_SYSTEM, &path);
+ path = path.Append(L"control.exe");
+ CommandLine command(path);
+ command.AppendArg(L"/name");
+ command.AppendArg(L"Microsoft.DateAndTime");
+#else
+ break;
+#endif
+
+ VLOG(1) << "Running " << command.GetCommandLineString();
+ base::LaunchOptions options;
+ options.wait = false;
+ base::LaunchProcess(command, options, NULL);
break;
}
default: {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698