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

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

Issue 1419103009: [Sync] Componentize ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@max_bogue_sync_backend_host
Patch Set: Rebase Created 5 years, 1 month 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 | « chrome/browser/android/favicon_helper.cc ('k') | chrome/browser/android/most_visited_sites.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 #include "chrome/browser/android/foreign_session_helper.h" 5 #include "chrome/browser/android/foreign_session_helper.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/prefs/scoped_user_pref_update.h" 11 #include "base/prefs/scoped_user_pref_update.h"
12 #include "chrome/browser/android/tab_android.h" 12 #include "chrome/browser/android/tab_android.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/profiles/profile_android.h" 14 #include "chrome/browser/profiles/profile_android.h"
15 #include "chrome/browser/sessions/session_restore.h" 15 #include "chrome/browser/sessions/session_restore.h"
16 #include "chrome/browser/sync/profile_sync_service.h"
17 #include "chrome/browser/sync/profile_sync_service_factory.h" 16 #include "chrome/browser/sync/profile_sync_service_factory.h"
18 #include "chrome/browser/ui/android/tab_model/tab_model.h" 17 #include "chrome/browser/ui/android/tab_model/tab_model.h"
19 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" 18 #include "chrome/browser/ui/android/tab_model/tab_model_list.h"
20 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
21 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
21 #include "components/browser_sync/browser/profile_sync_service.h"
22 #include "components/sync_driver/open_tabs_ui_delegate.h" 22 #include "components/sync_driver/open_tabs_ui_delegate.h"
23 #include "content/public/browser/notification_details.h" 23 #include "content/public/browser/notification_details.h"
24 #include "content/public/browser/notification_service.h" 24 #include "content/public/browser/notification_service.h"
25 #include "content/public/browser/notification_source.h" 25 #include "content/public/browser/notification_source.h"
26 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
27 #include "jni/ForeignSessionHelper_jni.h" 27 #include "jni/ForeignSessionHelper_jni.h"
28 28
29 using base::android::ScopedJavaGlobalRef; 29 using base::android::ScopedJavaGlobalRef;
30 using base::android::ScopedJavaLocalRef; 30 using base::android::ScopedJavaLocalRef;
31 using base::android::AttachCurrentThread; 31 using base::android::AttachCurrentThread;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 jstring session_tag) { 319 jstring session_tag) {
320 OpenTabsUIDelegate* open_tabs = GetOpenTabsUIDelegate(profile_); 320 OpenTabsUIDelegate* open_tabs = GetOpenTabsUIDelegate(profile_);
321 if (open_tabs) 321 if (open_tabs)
322 open_tabs->DeleteForeignSession(ConvertJavaStringToUTF8(env, session_tag)); 322 open_tabs->DeleteForeignSession(ConvertJavaStringToUTF8(env, session_tag));
323 } 323 }
324 324
325 // static 325 // static
326 bool ForeignSessionHelper::RegisterForeignSessionHelper(JNIEnv* env) { 326 bool ForeignSessionHelper::RegisterForeignSessionHelper(JNIEnv* env) {
327 return RegisterNativesImpl(env); 327 return RegisterNativesImpl(env);
328 } 328 }
OLDNEW
« no previous file with comments | « chrome/browser/android/favicon_helper.cc ('k') | chrome/browser/android/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698