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

Side by Side Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc

Issue 1411863002: Use kMetricsReportingEnabled instead of kStatsReporingPref on metrics side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/ownership/owner_settings_service_chromeos.h" 5 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
6 6
7 #include <keyhi.h> 7 #include <keyhi.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 else 611 else
612 NOTREACHED(); 612 NOTREACHED();
613 } else if (path == kReleaseChannel) { 613 } else if (path == kReleaseChannel) {
614 em::ReleaseChannelProto* release_channel = 614 em::ReleaseChannelProto* release_channel =
615 settings.mutable_release_channel(); 615 settings.mutable_release_channel();
616 std::string channel_value; 616 std::string channel_value;
617 if (value.GetAsString(&channel_value)) 617 if (value.GetAsString(&channel_value))
618 release_channel->set_release_channel(channel_value); 618 release_channel->set_release_channel(channel_value);
619 else 619 else
620 NOTREACHED(); 620 NOTREACHED();
621 } else if (path == kStatsReportingPref) {
622 em::MetricsEnabledProto* metrics = settings.mutable_metrics_enabled();
623 bool metrics_value = false;
624 if (value.GetAsBoolean(&metrics_value))
625 metrics->set_metrics_enabled(metrics_value);
626 else
627 NOTREACHED();
628 } else if (path == kAccountsPrefUsers) { 621 } else if (path == kAccountsPrefUsers) {
629 em::UserWhitelistProto* whitelist_proto = settings.mutable_user_whitelist(); 622 em::UserWhitelistProto* whitelist_proto = settings.mutable_user_whitelist();
630 whitelist_proto->clear_user_whitelist(); 623 whitelist_proto->clear_user_whitelist();
631 const base::ListValue* users; 624 const base::ListValue* users;
632 if (value.GetAsList(&users)) { 625 if (value.GetAsList(&users)) {
633 for (base::ListValue::const_iterator i = users->begin(); 626 for (base::ListValue::const_iterator i = users->begin();
634 i != users->end(); 627 i != users->end();
635 ++i) { 628 ++i) {
636 std::string email; 629 std::string email;
637 if ((*i)->GetAsString(&email)) 630 if ((*i)->GetAsString(&email))
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 std::vector<OnManagementSettingsSetCallback> callbacks; 807 std::vector<OnManagementSettingsSetCallback> callbacks;
815 pending_management_settings_callbacks_.swap(callbacks); 808 pending_management_settings_callbacks_.swap(callbacks);
816 for (const auto& callback : callbacks) { 809 for (const auto& callback : callbacks) {
817 if (!callback.is_null()) 810 if (!callback.is_null())
818 callback.Run(success); 811 callback.Run(success);
819 } 812 }
820 StorePendingChanges(); 813 StorePendingChanges();
821 } 814 }
822 815
823 } // namespace chromeos 816 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698