OLD | NEW |
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/login/login_performer.h" | 5 #include "chrome/browser/chromeos/login/login_performer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 weak_factory_(this) { | 62 weak_factory_(this) { |
63 DCHECK(default_performer_ == NULL) | 63 DCHECK(default_performer_ == NULL) |
64 << "LoginPerformer should have only one instance."; | 64 << "LoginPerformer should have only one instance."; |
65 default_performer_ = this; | 65 default_performer_ = this; |
66 } | 66 } |
67 | 67 |
68 LoginPerformer::~LoginPerformer() { | 68 LoginPerformer::~LoginPerformer() { |
69 DVLOG(1) << "Deleting LoginPerformer"; | 69 DVLOG(1) << "Deleting LoginPerformer"; |
70 DCHECK(default_performer_ != NULL) << "Default instance should exist."; | 70 DCHECK(default_performer_ != NULL) << "Default instance should exist."; |
71 default_performer_ = NULL; | 71 default_performer_ = NULL; |
72 if (authenticator_) | 72 if (authenticator_.get()) |
73 authenticator_->SetConsumer(NULL); | 73 authenticator_->SetConsumer(NULL); |
74 } | 74 } |
75 | 75 |
76 //////////////////////////////////////////////////////////////////////////////// | 76 //////////////////////////////////////////////////////////////////////////////// |
77 // LoginPerformer, LoginStatusConsumer implementation: | 77 // LoginPerformer, LoginStatusConsumer implementation: |
78 | 78 |
79 void LoginPerformer::OnLoginFailure(const LoginFailure& failure) { | 79 void LoginPerformer::OnLoginFailure(const LoginFailure& failure) { |
80 content::RecordAction(UserMetricsAction("Login_Failure")); | 80 content::RecordAction(UserMetricsAction("Login_Failure")); |
81 UMA_HISTOGRAM_ENUMERATION("Login.FailureReason", failure.reason(), | 81 UMA_HISTOGRAM_ENUMERATION("Login.FailureReason", failure.reason(), |
82 LoginFailure::NUM_FAILURE_REASONS); | 82 LoginFailure::NUM_FAILURE_REASONS); |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 profile, | 519 profile, |
520 user_context_, | 520 user_context_, |
521 std::string(), | 521 std::string(), |
522 std::string())); | 522 std::string())); |
523 } | 523 } |
524 user_context_.password.clear(); | 524 user_context_.password.clear(); |
525 user_context_.auth_code.clear(); | 525 user_context_.auth_code.clear(); |
526 } | 526 } |
527 | 527 |
528 } // namespace chromeos | 528 } // namespace chromeos |
OLD | NEW |