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

Side by Side Diff: chrome/browser/chromeos/settings/session_manager_operation.cc

Issue 2494843002: Don't pass domain and verification key to validation when not required (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/settings/session_manager_operation.h" 5 #include "chrome/browser/chromeos/settings/session_manager_operation.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // when you test Chrome with target_os = "chromeos" on Linux! 178 // when you test Chrome with target_os = "chromeos" on Linux!
179 validator->ValidateAgainstCurrentPolicy( 179 validator->ValidateAgainstCurrentPolicy(
180 policy_data_.get(), 180 policy_data_.get(),
181 policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_VALIDATED, 181 policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_VALIDATED,
182 policy::CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED, 182 policy::CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED,
183 policy::CloudPolicyValidatorBase::DEVICE_ID_NOT_REQUIRED); 183 policy::CloudPolicyValidatorBase::DEVICE_ID_NOT_REQUIRED);
184 validator->ValidatePolicyType(policy::dm_protocol::kChromeDevicePolicyType); 184 validator->ValidatePolicyType(policy::dm_protocol::kChromeDevicePolicyType);
185 validator->ValidatePayload(); 185 validator->ValidatePayload();
186 // We don't check the DMServer verification key below, because the signing 186 // We don't check the DMServer verification key below, because the signing
187 // key is validated when it is installed. 187 // key is validated when it is installed.
188 validator->ValidateSignature(public_key_->as_string(), 188 validator->ValidateSignature(public_key_->as_string());
189 std::string(), // No key validation check.
190 std::string(),
191 false);
192 validator->StartValidation( 189 validator->StartValidation(
193 base::Bind(&SessionManagerOperation::ReportValidatorStatus, 190 base::Bind(&SessionManagerOperation::ReportValidatorStatus,
194 weak_factory_.GetWeakPtr())); 191 weak_factory_.GetWeakPtr()));
195 } 192 }
196 193
197 void SessionManagerOperation::ReportValidatorStatus( 194 void SessionManagerOperation::ReportValidatorStatus(
198 policy::DeviceCloudPolicyValidator* validator) { 195 policy::DeviceCloudPolicyValidator* validator) {
199 DeviceSettingsService::Status status = 196 DeviceSettingsService::Status status =
200 DeviceSettingsService::STORE_VALIDATION_ERROR; 197 DeviceSettingsService::STORE_VALIDATION_ERROR;
201 if (validator->success()) { 198 if (validator->success()) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 238 }
242 239
243 void StoreSettingsOperation::HandleStoreResult(bool success) { 240 void StoreSettingsOperation::HandleStoreResult(bool success) {
244 if (!success) 241 if (!success)
245 ReportResult(DeviceSettingsService::STORE_OPERATION_FAILED); 242 ReportResult(DeviceSettingsService::STORE_OPERATION_FAILED);
246 else 243 else
247 StartLoading(); 244 StartLoading();
248 } 245 }
249 246
250 } // namespace chromeos 247 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698