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

Unified Diff: chrome/browser/chrome_browser_main_android.cc

Issue 2832263002: Clipboard Android - Store and Read Last Modified Time from Prefs (Closed)
Patch Set: final comments 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
« no previous file with comments | « chrome/browser/android/preferences/clipboard_android.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+ // 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()));
« no previous file with comments | « chrome/browser/android/preferences/clipboard_android.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698