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

Side by Side Diff: chrome/browser/chromeos/login/signed_settings.cc

Issue 7830020: Revert 99169 - Delay the metrics policy migration call to make sure ownership has been taken. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/login/signed_settings.h" 5 #include "chrome/browser/chromeos/login/signed_settings.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 return serialized; 765 return serialized;
766 766
767 } else if (prop == kReleaseChannel) { 767 } else if (prop == kReleaseChannel) {
768 if (!pol.has_release_channel() || 768 if (!pol.has_release_channel() ||
769 !pol.release_channel().has_release_channel()) { 769 !pol.release_channel().has_release_channel()) {
770 return ""; // Default to an invalid channel (will be ignored). 770 return ""; // Default to an invalid channel (will be ignored).
771 } 771 }
772 return pol.release_channel().release_channel(); 772 return pol.release_channel().release_channel();
773 773
774 } else if (prop == kStatsReportingPref) { 774 } else if (prop == kStatsReportingPref) {
775 if (pol.has_metrics_enabled()) { 775 if (!pol.has_metrics_enabled() ||
776 return kVeritas[pol.metrics_enabled().metrics_enabled()]; 776 !pol.metrics_enabled().metrics_enabled()) {
777 return kVeritas[0]; // Default to not collecting metrics.
777 } 778 }
779 return kVeritas[pol.metrics_enabled().metrics_enabled()];
780
778 } 781 }
779 return std::string(); 782 return std::string();
780 } 783 }
781 784
782 void RetrievePropertyOp::PerformCallback(SignedSettings::ReturnCode code, 785 void RetrievePropertyOp::PerformCallback(SignedSettings::ReturnCode code,
783 const std::string& value) { 786 const std::string& value) {
784 d_->OnSettingsOpCompleted(code, value); 787 d_->OnSettingsOpCompleted(code, value);
785 } 788 }
786 789
787 StorePolicyOp::StorePolicyOp(em::PolicyFetchResponse* policy, 790 StorePolicyOp::StorePolicyOp(em::PolicyFetchResponse* policy,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length()); 958 sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length());
956 service_->StartVerifyAttempt(policy_.policy_data(), sig, this); 959 service_->StartVerifyAttempt(policy_.policy_data(), sig, this);
957 } 960 }
958 961
959 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code, 962 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code,
960 const em::PolicyFetchResponse& value) { 963 const em::PolicyFetchResponse& value) {
961 d_->OnSettingsOpCompleted(code, value); 964 d_->OnSettingsOpCompleted(code, value);
962 } 965 }
963 966
964 } // namespace chromeos 967 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ownership_status_checker.cc ('k') | chrome/browser/chromeos/user_cros_settings_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698