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

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

Issue 7741045: 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: Addressed nits. 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 !pol.metrics_enabled().metrics_enabled()) { 776 return kVeritas[pol.metrics_enabled().metrics_enabled()];
777 return kVeritas[0]; // Default to not collecting metrics.
778 } 777 }
779 return kVeritas[pol.metrics_enabled().metrics_enabled()];
780
781 } 778 }
782 return std::string(); 779 return std::string();
783 } 780 }
784 781
785 void RetrievePropertyOp::PerformCallback(SignedSettings::ReturnCode code, 782 void RetrievePropertyOp::PerformCallback(SignedSettings::ReturnCode code,
786 const std::string& value) { 783 const std::string& value) {
787 d_->OnSettingsOpCompleted(code, value); 784 d_->OnSettingsOpCompleted(code, value);
788 } 785 }
789 786
790 StorePolicyOp::StorePolicyOp(em::PolicyFetchResponse* policy, 787 StorePolicyOp::StorePolicyOp(em::PolicyFetchResponse* policy,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length()); 955 sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length());
959 service_->StartVerifyAttempt(policy_.policy_data(), sig, this); 956 service_->StartVerifyAttempt(policy_.policy_data(), sig, this);
960 } 957 }
961 958
962 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code, 959 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code,
963 const em::PolicyFetchResponse& value) { 960 const em::PolicyFetchResponse& value) {
964 d_->OnSettingsOpCompleted(code, value); 961 d_->OnSettingsOpCompleted(code, value);
965 } 962 }
966 963
967 } // namespace chromeos 964 } // 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