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

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

Issue 18308004: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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/chromeos/settings/session_manager_operation.h" 5 #include "chrome/browser/chromeos/settings/session_manager_operation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 SignAndStoreSettingsOperation::~SignAndStoreSettingsOperation() {} 231 SignAndStoreSettingsOperation::~SignAndStoreSettingsOperation() {}
232 232
233 void SignAndStoreSettingsOperation::Run() { 233 void SignAndStoreSettingsOperation::Run() {
234 EnsureOwnerKey(base::Bind(&SignAndStoreSettingsOperation::StartSigning, 234 EnsureOwnerKey(base::Bind(&SignAndStoreSettingsOperation::StartSigning,
235 weak_factory_.GetWeakPtr())); 235 weak_factory_.GetWeakPtr()));
236 } 236 }
237 237
238 void SignAndStoreSettingsOperation::StartSigning() { 238 void SignAndStoreSettingsOperation::StartSigning() {
239 if (!owner_key() || !owner_key()->private_key() || username_.empty()) { 239 if (!owner_key().get() || !owner_key()->private_key() || username_.empty()) {
240 ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE); 240 ReportResult(DeviceSettingsService::STORE_KEY_UNAVAILABLE);
241 return; 241 return;
242 } 242 }
243 243
244 base::PostTaskAndReplyWithResult( 244 base::PostTaskAndReplyWithResult(
245 content::BrowserThread::GetBlockingPool(), 245 content::BrowserThread::GetBlockingPool(),
246 FROM_HERE, 246 FROM_HERE,
247 base::Bind(&SignAndStoreSettingsOperation::AssembleAndSignPolicy, 247 base::Bind(&SignAndStoreSettingsOperation::AssembleAndSignPolicy,
248 base::Passed(&new_settings_), username_, owner_key()), 248 base::Passed(&new_settings_), username_, owner_key()),
249 base::Bind(&SignAndStoreSettingsOperation::StoreDeviceSettingsBlob, 249 base::Bind(&SignAndStoreSettingsOperation::StoreDeviceSettingsBlob,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 void SignAndStoreSettingsOperation::HandleStoreResult(bool success) { 303 void SignAndStoreSettingsOperation::HandleStoreResult(bool success) {
304 if (!success) 304 if (!success)
305 ReportResult(DeviceSettingsService::STORE_OPERATION_FAILED); 305 ReportResult(DeviceSettingsService::STORE_OPERATION_FAILED);
306 else 306 else
307 StartLoading(); 307 StartLoading();
308 } 308 }
309 309
310 } // namespace chromeos 310 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698