OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "chrome/browser/android/signin/signin_manager_android.h" | 7 #include "chrome/browser/android/signin/signin_manager_android.h" |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 class ProfileDataRemover : public BrowsingDataRemover::Observer { | 54 class ProfileDataRemover : public BrowsingDataRemover::Observer { |
55 public: | 55 public: |
56 ProfileDataRemover(Profile* profile, const base::Closure& callback) | 56 ProfileDataRemover(Profile* profile, const base::Closure& callback) |
57 : callback_(callback), | 57 : callback_(callback), |
58 origin_loop_(base::MessageLoopProxy::current()), | 58 origin_loop_(base::MessageLoopProxy::current()), |
59 remover_(BrowsingDataRemover::CreateForUnboundedRange(profile)) { | 59 remover_(BrowsingDataRemover::CreateForUnboundedRange(profile)) { |
60 remover_->AddObserver(this); | 60 remover_->AddObserver(this); |
61 remover_->Remove(BrowsingDataRemover::REMOVE_ALL, BrowsingDataHelper::ALL); | 61 remover_->Remove(BrowsingDataRemover::REMOVE_ALL, BrowsingDataHelper::ALL); |
62 } | 62 } |
63 | 63 |
64 virtual ~ProfileDataRemover() {} | 64 ~ProfileDataRemover() override {} |
65 | 65 |
66 void OnBrowsingDataRemoverDone() override { | 66 void OnBrowsingDataRemoverDone() override { |
67 remover_->RemoveObserver(this); | 67 remover_->RemoveObserver(this); |
68 origin_loop_->PostTask(FROM_HERE, callback_); | 68 origin_loop_->PostTask(FROM_HERE, callback_); |
69 origin_loop_->DeleteSoon(FROM_HERE, this); | 69 origin_loop_->DeleteSoon(FROM_HERE, this); |
70 } | 70 } |
71 | 71 |
72 private: | 72 private: |
73 base::Closure callback_; | 73 base::Closure callback_; |
74 scoped_refptr<base::MessageLoopProxy> origin_loop_; | 74 scoped_refptr<base::MessageLoopProxy> origin_loop_; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username); | 309 return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username); |
310 #else | 310 #else |
311 return false; | 311 return false; |
312 #endif | 312 #endif |
313 } | 313 } |
314 | 314 |
315 // static | 315 // static |
316 bool SigninManagerAndroid::Register(JNIEnv* env) { | 316 bool SigninManagerAndroid::Register(JNIEnv* env) { |
317 return RegisterNativesImpl(env); | 317 return RegisterNativesImpl(env); |
318 } | 318 } |
OLD | NEW |