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 "chrome/browser/android/signin/signin_manager_android.h" | 5 #include "chrome/browser/android/signin/signin_manager_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 ProfileDataRemover(Profile* profile, const base::Closure& callback) | 49 ProfileDataRemover(Profile* profile, const base::Closure& callback) |
50 : callback_(callback), | 50 : callback_(callback), |
51 origin_loop_(base::MessageLoopProxy::current()), | 51 origin_loop_(base::MessageLoopProxy::current()), |
52 remover_(BrowsingDataRemover::CreateForUnboundedRange(profile)) { | 52 remover_(BrowsingDataRemover::CreateForUnboundedRange(profile)) { |
53 remover_->AddObserver(this); | 53 remover_->AddObserver(this); |
54 remover_->Remove(BrowsingDataRemover::REMOVE_ALL, BrowsingDataHelper::ALL); | 54 remover_->Remove(BrowsingDataRemover::REMOVE_ALL, BrowsingDataHelper::ALL); |
55 } | 55 } |
56 | 56 |
57 virtual ~ProfileDataRemover() {} | 57 virtual ~ProfileDataRemover() {} |
58 | 58 |
59 virtual void OnBrowsingDataRemoverDone() OVERRIDE { | 59 virtual void OnBrowsingDataRemoverDone() override { |
60 remover_->RemoveObserver(this); | 60 remover_->RemoveObserver(this); |
61 origin_loop_->PostTask(FROM_HERE, callback_); | 61 origin_loop_->PostTask(FROM_HERE, callback_); |
62 origin_loop_->DeleteSoon(FROM_HERE, this); | 62 origin_loop_->DeleteSoon(FROM_HERE, this); |
63 } | 63 } |
64 | 64 |
65 private: | 65 private: |
66 base::Closure callback_; | 66 base::Closure callback_; |
67 scoped_refptr<base::MessageLoopProxy> origin_loop_; | 67 scoped_refptr<base::MessageLoopProxy> origin_loop_; |
68 BrowsingDataRemover* remover_; | 68 BrowsingDataRemover* remover_; |
69 | 69 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 } | 288 } |
289 | 289 |
290 static jboolean IsNewProfileManagementEnabled(JNIEnv* env, jclass clazz) { | 290 static jboolean IsNewProfileManagementEnabled(JNIEnv* env, jclass clazz) { |
291 return switches::IsNewProfileManagement(); | 291 return switches::IsNewProfileManagement(); |
292 } | 292 } |
293 | 293 |
294 // static | 294 // static |
295 bool SigninManagerAndroid::Register(JNIEnv* env) { | 295 bool SigninManagerAndroid::Register(JNIEnv* env) { |
296 return RegisterNativesImpl(env); | 296 return RegisterNativesImpl(env); |
297 } | 297 } |
OLD | NEW |