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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_registration_utility.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/supervised_user_registration_utility.h" 5 #include "chrome/browser/supervised_user/supervised_user_registration_utility.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 CompleteRegistration(true, error); 356 CompleteRegistration(true, error);
357 return; 357 return;
358 } 358 }
359 359
360 DCHECK(!token.empty()); 360 DCHECK(!token.empty());
361 pending_supervised_user_token_ = token; 361 pending_supervised_user_token_ = token;
362 CompleteRegistrationIfReady(); 362 CompleteRegistrationIfReady();
363 } 363 }
364 364
365 void SupervisedUserRegistrationUtilityImpl::CompleteRegistrationIfReady() { 365 void SupervisedUserRegistrationUtilityImpl::CompleteRegistrationIfReady() {
366 bool skip_check = CommandLine::ForCurrentProcess()->HasSwitch( 366 bool skip_check = base::CommandLine::ForCurrentProcess()->HasSwitch(
367 switches::kNoSupervisedUserAcknowledgmentCheck); 367 switches::kNoSupervisedUserAcknowledgmentCheck);
368 368
369 if (!pending_supervised_user_acknowledged_ && !skip_check) 369 if (!pending_supervised_user_acknowledged_ && !skip_check)
370 return; 370 return;
371 if (password_update_ && !skip_check) 371 if (password_update_ && !skip_check)
372 return; 372 return;
373 if (pending_supervised_user_token_.empty()) 373 if (pending_supervised_user_token_.empty())
374 return; 374 return;
375 375
376 GoogleServiceAuthError error(GoogleServiceAuthError::NONE); 376 GoogleServiceAuthError error(GoogleServiceAuthError::NONE);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 pending_supervised_user_id_); 408 pending_supervised_user_id_);
409 } 409 }
410 } 410 }
411 411
412 if (run_callback) 412 if (run_callback)
413 callback_.Run(error, pending_supervised_user_token_); 413 callback_.Run(error, pending_supervised_user_token_);
414 callback_.Reset(); 414 callback_.Reset();
415 } 415 }
416 416
417 } // namespace 417 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698