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

Side by Side Diff: chrome/browser/policy/cloud/cloud_policy_validator.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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) 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/policy/cloud/cloud_policy_validator.h" 5 #include "chrome/browser/policy/cloud/cloud_policy_validator.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" 10 #include "chrome/browser/policy/cloud/cloud_policy_constants.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 validation_flags_(0), 121 validation_flags_(0),
122 timestamp_not_before_(0), 122 timestamp_not_before_(0),
123 timestamp_not_after_(0), 123 timestamp_not_after_(0),
124 timestamp_option_(TIMESTAMP_REQUIRED), 124 timestamp_option_(TIMESTAMP_REQUIRED),
125 dm_token_option_(DM_TOKEN_REQUIRED), 125 dm_token_option_(DM_TOKEN_REQUIRED),
126 allow_key_rotation_(false) {} 126 allow_key_rotation_(false) {}
127 127
128 void CloudPolicyValidatorBase::PostValidationTask( 128 void CloudPolicyValidatorBase::PostValidationTask(
129 const base::Closure& completion_callback) { 129 const base::Closure& completion_callback) {
130 content::BrowserThread::PostTask( 130 content::BrowserThread::PostTask(
131 content::BrowserThread::FILE, FROM_HERE, 131 content::BrowserThread::FILE,
132 FROM_HERE,
132 base::Bind(&CloudPolicyValidatorBase::PerformValidation, 133 base::Bind(&CloudPolicyValidatorBase::PerformValidation,
133 base::Passed(scoped_ptr<CloudPolicyValidatorBase>(this)), 134 base::Passed(scoped_ptr<CloudPolicyValidatorBase>(this)),
134 MessageLoop::current()->message_loop_proxy(), 135 base::MessageLoop::current()->message_loop_proxy(),
135 completion_callback)); 136 completion_callback));
136 } 137 }
137 138
138 // static 139 // static
139 void CloudPolicyValidatorBase::PerformValidation( 140 void CloudPolicyValidatorBase::PerformValidation(
140 scoped_ptr<CloudPolicyValidatorBase> self, 141 scoped_ptr<CloudPolicyValidatorBase> self,
141 scoped_refptr<base::MessageLoopProxy> message_loop, 142 scoped_refptr<base::MessageLoopProxy> message_loop,
142 const base::Closure& completion_callback) { 143 const base::Closure& completion_callback) {
143 // Run the validation activities on this thread. 144 // Run the validation activities on this thread.
144 self->RunValidation(); 145 self->RunValidation();
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 368 }
368 verifier.VerifyUpdate(reinterpret_cast<const uint8*>(data.c_str()), 369 verifier.VerifyUpdate(reinterpret_cast<const uint8*>(data.c_str()),
369 data.size()); 370 data.size());
370 return verifier.VerifyFinal(); 371 return verifier.VerifyFinal();
371 } 372 }
372 373
373 template class CloudPolicyValidator<em::CloudPolicySettings>; 374 template class CloudPolicyValidator<em::CloudPolicySettings>;
374 template class CloudPolicyValidator<em::ExternalPolicyData>; 375 template class CloudPolicyValidator<em::ExternalPolicyData>;
375 376
376 } // namespace policy 377 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698