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

Side by Side Diff: chrome/browser/android/foreign_session_helper.h

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 years, 10 months 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
« no previous file with comments | « no previous file | chrome/browser/android/foreign_session_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ 6 #define CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 30 matching lines...) Expand all
41 const base::android::JavaParamRef<jobject>& j_tab, 41 const base::android::JavaParamRef<jobject>& j_tab,
42 const base::android::JavaParamRef<jstring>& session_tag, 42 const base::android::JavaParamRef<jstring>& session_tag,
43 jint tab_id, 43 jint tab_id,
44 jint disposition); 44 jint disposition);
45 void DeleteForeignSession( 45 void DeleteForeignSession(
46 JNIEnv* env, 46 JNIEnv* env,
47 const base::android::JavaParamRef<jobject>& obj, 47 const base::android::JavaParamRef<jobject>& obj,
48 const base::android::JavaParamRef<jstring>& session_tag); 48 const base::android::JavaParamRef<jstring>& session_tag);
49 49
50 // syncer::SyncServiceObserver implementation 50 // syncer::SyncServiceObserver implementation
51 void OnStateChanged() override {} 51 void OnSyncConfigurationCompleted(syncer::SyncService* sync) override;
52 void OnSyncConfigurationCompleted() override; 52 void OnForeignSessionUpdated(syncer::SyncService* sync) override;
53 void OnForeignSessionUpdated() override;
54 53
55 static bool RegisterForeignSessionHelper(JNIEnv* env); 54 static bool RegisterForeignSessionHelper(JNIEnv* env);
56 55
57 private: 56 private:
58 ~ForeignSessionHelper() override; 57 ~ForeignSessionHelper() override;
59 58
60 // Fires |callback_| if it is not null. 59 // Fires |callback_| if it is not null.
61 void FireForeignSessionCallback(); 60 void FireForeignSessionCallback();
62 61
63 Profile* profile_; // weak 62 Profile* profile_; // weak
64 base::android::ScopedJavaGlobalRef<jobject> callback_; 63 base::android::ScopedJavaGlobalRef<jobject> callback_;
65 ScopedObserver<syncer::SyncService, syncer::SyncServiceObserver> 64 ScopedObserver<syncer::SyncService, syncer::SyncServiceObserver>
66 scoped_observer_; 65 scoped_observer_;
67 66
68 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHelper); 67 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHelper);
69 }; 68 };
70 69
71 #endif // CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_ 70 #endif // CHROME_BROWSER_ANDROID_FOREIGN_SESSION_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/foreign_session_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698