| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_ANDROID_CHROME_BACKUP_WATCHER_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_CHROME_BACKUP_WATCHER_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include <memory> | |
| 11 | |
| 12 #include "base/android/scoped_java_ref.h" | |
| 13 #include "base/macros.h" | |
| 14 #include "components/prefs/pref_change_registrar.h" | |
| 15 | |
| 16 class Profile; | |
| 17 | |
| 18 namespace chrome { | |
| 19 namespace android { | |
| 20 | |
| 21 // Watch the preferences that we back up using Android Backup, so that we can | |
| 22 // create a new backup whenever any of them change. | |
| 23 class ChromeBackupWatcher { | |
| 24 public: | |
| 25 explicit ChromeBackupWatcher(Profile* profile); | |
| 26 virtual ~ChromeBackupWatcher(); | |
| 27 | |
| 28 private: | |
| 29 PrefChangeRegistrar registrar_; | |
| 30 base::android::ScopedJavaGlobalRef<jobject> java_watcher_; | |
| 31 DISALLOW_COPY_AND_ASSIGN(ChromeBackupWatcher); | |
| 32 }; | |
| 33 | |
| 34 } // namespace android | |
| 35 } // namespace chrome | |
| 36 #endif // CHROME_BROWSER_ANDROID_CHROME_BACKUP_WATCHER_H_ | |
| OLD | NEW |