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

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 7524002: Merge 94322 - Rewire the metrics pref to the signed settings store on chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: Created 9 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
Index: chrome/browser/chromeos/login/wizard_controller.cc
===================================================================
--- chrome/browser/chromeos/login/wizard_controller.cc (revision 94348)
+++ chrome/browser/chromeos/login/wizard_controller.cc (working copy)
@@ -16,6 +16,7 @@
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/cros_settings_names.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/cryptohome_library.h"
#include "chrome/browser/chromeos/customization_document.h"
@@ -30,19 +31,24 @@
#include "chrome/browser/chromeos/login/network_screen.h"
#include "chrome/browser/chromeos/login/oobe_display.h"
#include "chrome/browser/chromeos/login/registration_screen.h"
+#include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
#include "chrome/browser/chromeos/login/update_screen.h"
#include "chrome/browser/chromeos/login/user_image_screen.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
-#include "chrome/browser/chromeos/metrics_cros_settings_provider.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/ui/options/options_util.h"
#include "chrome/common/pref_names.h"
#include "content/common/content_notification_types.h"
#include "content/common/notification_service.h"
#include "ui/base/l10n/l10n_util.h"
#include "views/accelerator.h"
+#if defined(USE_LINUX_BREAKPAD)
+#include "chrome/app/breakpad_linux.h"
+#endif
+
namespace {
// A boolean pref of the EULA accepted flag.
@@ -378,8 +384,24 @@
void WizardController::OnEulaAccepted() {
MarkEulaAccepted();
- chromeos::MetricsCrosSettingsProvider::SetMetricsStatus(
- usage_statistics_reporting_);
+ // TODO(pastarmovj): Make this code cache the value for the pref in a better
+ // way until we can store it in the policy blob. See explanation below:
+ // At this point we can not write this in the signed settings pref blob.
+ // But we can at least create the consent file and Chrome would port that
+ // if the device is owned by a local user. In case of enterprise enrolled
+ // device the setting will be respected only until the policy is not set.
+ SignedSettingsTempStorage::Store(
+ kStatsReportingPref,
+ (usage_statistics_reporting_ ? "true" : "false"),
+ g_browser_process->local_state());
+ bool enabled =
+ OptionsUtil::ResolveMetricsReportingEnabled(usage_statistics_reporting_);
+ if (enabled) {
+#if defined(USE_LINUX_BREAKPAD)
+ InitCrashReporter();
+#endif
+ }
+
InitiateOOBEUpdate();
}
« no previous file with comments | « chrome/browser/chromeos/login/signed_settings.cc ('k') | chrome/browser/chromeos/metrics_cros_settings_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698