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

Unified Diff: remoting/host/plugin/daemon_controller_mac.cc

Issue 10537182: The user's consent to crash dumps reporting can now be set via the UI (Windows only). The checkbox … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback & rebased. Created 8 years, 6 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
Index: remoting/host/plugin/daemon_controller_mac.cc
diff --git a/remoting/host/plugin/daemon_controller_mac.cc b/remoting/host/plugin/daemon_controller_mac.cc
index 4e2345826b39d0988b7f8d2074c307932538aa95..f6a60bb97f941d418b3c24314a1e2bcb1440edfe 100644
--- a/remoting/host/plugin/daemon_controller_mac.cc
+++ b/remoting/host/plugin/daemon_controller_mac.cc
@@ -23,6 +23,7 @@
#include "base/threading/thread.h"
#include "base/time.h"
#include "base/values.h"
+#include "remoting/host/breakpad.h"
#include "remoting/host/json_host_config.h"
namespace remoting {
@@ -64,18 +65,21 @@ class DaemonControllerMac : public remoting::DaemonController {
virtual void GetConfig(const GetConfigCallback& callback) OVERRIDE;
virtual void SetConfigAndStart(
scoped_ptr<base::DictionaryValue> config,
- const CompletionCallback& done_callback) OVERRIDE;
+ bool consent,
+ const CompletionCallback& done) OVERRIDE;
virtual void UpdateConfig(scoped_ptr<base::DictionaryValue> config,
const CompletionCallback& done_callback) OVERRIDE;
virtual void Stop(const CompletionCallback& done_callback) OVERRIDE;
virtual void SetWindow(void* window_handle) OVERRIDE;
virtual void GetVersion(const GetVersionCallback& done_callback) OVERRIDE;
+ virtual void GetUsageStatsConsent(
+ const GetUsageStatsConsentCallback& callback) OVERRIDE;
private:
void DoGetConfig(const GetConfigCallback& callback);
void DoGetVersion(const GetVersionCallback& callback);
void DoSetConfigAndStart(scoped_ptr<base::DictionaryValue> config,
- const CompletionCallback& done_callback);
+ const CompletionCallback& done);
void DoUpdateConfig(scoped_ptr<base::DictionaryValue> config,
const CompletionCallback& done_callback);
void DoStop(const CompletionCallback& done_callback);
@@ -148,11 +152,12 @@ void DaemonControllerMac::GetConfig(const GetConfigCallback& callback) {
void DaemonControllerMac::SetConfigAndStart(
scoped_ptr<base::DictionaryValue> config,
- const CompletionCallback& done_callback) {
+ bool /* consent */,
+ const CompletionCallback& done) {
auth_thread_.message_loop_proxy()->PostTask(
FROM_HERE, base::Bind(
&DaemonControllerMac::DoSetConfigAndStart, base::Unretained(this),
- base::Passed(&config), done_callback));
+ base::Passed(&config), done));
}
void DaemonControllerMac::UpdateConfig(
@@ -180,6 +185,13 @@ void DaemonControllerMac::GetVersion(const GetVersionCallback& callback) {
callback));
}
+void DaemonControllerMac::GetUsageStatsConsent(
+ const GetUsageStatsConsentCallback& callback) {
+ // Crash dump collection is not implemented on Mac yet.
+ // http://crbug.com/130678.
+ callback.Run(false, false, false);
+}
+
void DaemonControllerMac::DoGetConfig(const GetConfigCallback& callback) {
FilePath config_path(kHostConfigFile);
JsonHostConfig host_config(config_path);
@@ -223,10 +235,10 @@ void DaemonControllerMac::DoGetVersion(const GetVersionCallback& callback) {
void DaemonControllerMac::DoSetConfigAndStart(
scoped_ptr<base::DictionaryValue> config,
- const CompletionCallback& done_callback) {
+ const CompletionCallback& done) {
std::string config_data;
base::JSONWriter::Write(config.get(), &config_data);
- ShowPreferencePane(config_data, done_callback);
+ ShowPreferencePane(config_data, done);
}
void DaemonControllerMac::DoUpdateConfig(

Powered by Google App Engine
This is Rietveld 408576698