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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/sync/ChromiumSyncAdapter.java

Issue 356453003: Don't share renderers between unrelated tabs on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move declaration of more services to a separate CL. Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
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 package org.chromium.chrome.browser.sync; 5 package org.chromium.chrome.browser.sync;
6 6
7 import android.accounts.Account; 7 import android.accounts.Account;
8 import android.app.Application; 8 import android.app.Application;
9 import android.content.AbstractThreadedSyncAdapter; 9 import android.content.AbstractThreadedSyncAdapter;
10 import android.content.ContentProviderClient; 10 import android.content.ContentProviderClient;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 Log.w(TAG, "Got exception when trying to request a sync. Informing A ndroid system.", e); 105 Log.w(TAG, "Got exception when trying to request a sync. Informing A ndroid system.", e);
106 // Using numIoExceptions so Android will treat this as a soft error. 106 // Using numIoExceptions so Android will treat this as a soft error.
107 syncResult.stats.numIoExceptions++; 107 syncResult.stats.numIoExceptions++;
108 semaphore.release(); 108 semaphore.release();
109 } 109 }
110 } 110 }
111 111
112 private void startBrowserProcessesSync( 112 private void startBrowserProcessesSync(
113 final BrowserStartupController.StartupCallback callback) { 113 final BrowserStartupController.StartupCallback callback) {
114 try { 114 try {
115 BrowserStartupController.get(mApplication).startBrowserProcessesSync ( 115 BrowserStartupController.get(mApplication).startBrowserProcessesSync (false);
116 BrowserStartupController.MAX_RENDERERS_LIMIT);
117 } catch (ProcessInitException e) { 116 } catch (ProcessInitException e) {
118 Log.e(TAG, "Unable to load native library.", e); 117 Log.e(TAG, "Unable to load native library.", e);
119 System.exit(-1); 118 System.exit(-1);
120 } 119 }
121 new Handler().post(new Runnable() { 120 new Handler().post(new Runnable() {
122 @Override 121 @Override
123 public void run() { 122 public void run() {
124 callback.onSuccess(false); 123 callback.onSuccess(false);
125 } 124 }
126 }); 125 });
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 public void requestSync(int objectSource, String objectId, long version, Str ing payload) { 170 public void requestSync(int objectSource, String objectId, long version, Str ing payload) {
172 ProfileSyncService.get(mApplication) 171 ProfileSyncService.get(mApplication)
173 .requestSyncFromNativeChrome(objectSource, objectId, version, pa yload); 172 .requestSyncFromNativeChrome(objectSource, objectId, version, pa yload);
174 } 173 }
175 174
176 @VisibleForTesting 175 @VisibleForTesting
177 public void requestSyncForAllTypes() { 176 public void requestSyncForAllTypes() {
178 ProfileSyncService.get(mApplication).requestSyncFromNativeChromeForAllTy pes(); 177 ProfileSyncService.get(mApplication).requestSyncFromNativeChromeForAllTy pes();
179 } 178 }
180 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698