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

Unified Diff: chrome/browser/chrome_browser_main_android.cc

Issue 2832263002: Clipboard Android - Store and Read Last Modified Time from Prefs (Closed)
Patch Set: iadd missing files Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_browser_main_android.cc
diff --git a/chrome/browser/chrome_browser_main_android.cc b/chrome/browser/chrome_browser_main_android.cc
index 6617e4f27fee52472f19b19ab6e695d48a7e9969..a788005129d7f680ef90198827a506ac0ed68ed9 100644
--- a/chrome/browser/chrome_browser_main_android.cc
+++ b/chrome/browser/chrome_browser_main_android.cc
@@ -12,7 +12,9 @@
#include "base/task_scheduler/post_task.h"
#include "base/trace_event/trace_event.h"
#include "chrome/browser/android/mojo/chrome_interface_registrar_android.h"
+#include "chrome/browser/android/preferences/clipboard_android.h"
#include "chrome/browser/android/seccomp_support_detector.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/descriptors_android.h"
@@ -97,6 +99,13 @@ void ChromeBrowserMainPartsAndroid::PostProfileInit() {
content::BrowserThread::FILE, FROM_HERE,
base::Bind(&DeleteFileTask, bookmark_image_file_path),
base::TimeDelta::FromMinutes(1));
+
+ // Idempotent. Needs to be called once on startup. If
+ // InitializeClipboardAndroidFromLocalState() is called multiple times (e.g.,
+ // once per profile load), that's okay; the additional calls don't change
Bernhard Bauer 2017/04/27 09:27:17 Just for the sake of completeness: There aren't ac
Mark P 2017/04/27 19:25:59 Thanks for the remark. Did you want me to add tha
+ // anything.
+ android::InitClipboardAndroidFromLocalState(g_browser_process->local_state());
+
// Start watching the preferences that need to be backed up backup using
// Android backup, so that we create a new backup if they change.
backup_watcher_.reset(new chrome::android::ChromeBackupWatcher(profile()));

Powered by Google App Engine
This is Rietveld 408576698