OLD | NEW |
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/chromeos/login/easy_unlock/short_lived_user_context.h" | 5 #include "chrome/browser/chromeos/login/easy_unlock/short_lived_user_context.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 void ShortLivedUserContext::Reset() { | 43 void ShortLivedUserContext::Reset() { |
44 if (user_context_.get()) { | 44 if (user_context_.get()) { |
45 user_context_->ClearSecrets(); | 45 user_context_->ClearSecrets(); |
46 user_context_.reset(); | 46 user_context_.reset(); |
47 app_lifetime_monitor_->RemoveObserver(this); | 47 app_lifetime_monitor_->RemoveObserver(this); |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
51 void ShortLivedUserContext::OnAppDeactivated(Profile* profile, | 51 void ShortLivedUserContext::OnAppDeactivated(content::BrowserContext* context, |
52 const std::string& app_id) { | 52 const std::string& app_id) { |
53 if (app_id == extension_misc::kEasyUnlockAppId) | 53 if (app_id == extension_misc::kEasyUnlockAppId) |
54 Reset(); | 54 Reset(); |
55 } | 55 } |
56 | 56 |
57 } // namespace chromeos | 57 } // namespace chromeos |
OLD | NEW |