Chromium Code Reviews| Index: chrome/browser/android/chrome_backup_watcher.h |
| diff --git a/chrome/browser/android/chrome_backup_watcher.h b/chrome/browser/android/chrome_backup_watcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3bef2452a11518960b75b8dd46a2a674c1519994 |
| --- /dev/null |
| +++ b/chrome/browser/android/chrome_backup_watcher.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_ANDROID_CHROME_BACKUP_WATCHER_H_ |
| +#define CHROME_BROWSER_ANDROID_CHROME_BACKUP_WATCHER_H_ |
| + |
| +#include <jni.h> |
| + |
| +#include <memory> |
| + |
| +#include "base/android/scoped_java_ref.h" |
| +#include "base/macros.h" |
| +#include "components/prefs/pref_change_registrar.h" |
| + |
| +class Profile; |
| + |
| +namespace chrome { |
| +namespace android { |
| + |
| +// Watch the preferences that we backup using Android Backup, so that we can |
|
Bernhard Bauer
2016/11/14 10:05:39
Nit: the verb is "back up", only the noun is "back
aberent
2016/11/14 17:23:40
Done.
Bernhard Bauer
2016/11/14 18:02:03
Thanks. The correct use of the three forms "back u
|
| +// create a new backup whenever any of them change. |
| +class ChromeBackupWatcher { |
| + public: |
| + explicit ChromeBackupWatcher(Profile* profile); |
|
Bernhard Bauer
2016/11/14 10:05:39
Add an empty destructor?
aberent
2016/11/14 17:23:40
Done.
|
| + |
| + private: |
| + std::unique_ptr<PrefChangeRegistrar> registrar_; |
|
Bernhard Bauer
2016/11/14 10:05:39
Make this a direct member?
aberent
2016/11/14 17:23:40
Done.
|
| + base::android::ScopedJavaGlobalRef<jobject> java_watcher_; |
| + DISALLOW_COPY_AND_ASSIGN(ChromeBackupWatcher); |
| +}; |
| + |
| +} // namespace android |
| +} // namespace chrome |
| +#endif // CHROME_BROWSER_ANDROID_CHROME_BACKUP_WATCHER_H_ |