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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrowserInitializer.java

Issue 2247143004: Remove app context init from LibraryLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix per review. Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.init; 5 package org.chromium.chrome.browser.init;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.os.AsyncTask; 9 import android.os.AsyncTask;
10 import android.os.Build; 10 import android.os.Build;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 352 }
353 } 353 }
354 354
355 private void startChromeBrowserProcessesSync() throws ProcessInitException { 355 private void startChromeBrowserProcessesSync() throws ProcessInitException {
356 try { 356 try {
357 TraceEvent.begin("ChromeBrowserInitializer.startChromeBrowserProcess esSync"); 357 TraceEvent.begin("ChromeBrowserInitializer.startChromeBrowserProcess esSync");
358 ThreadUtils.assertOnUiThread(); 358 ThreadUtils.assertOnUiThread();
359 mApplication.initCommandLine(); 359 mApplication.initCommandLine();
360 LibraryLoader libraryLoader = LibraryLoader.get(LibraryProcessType.P ROCESS_BROWSER); 360 LibraryLoader libraryLoader = LibraryLoader.get(LibraryProcessType.P ROCESS_BROWSER);
361 StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads( ); 361 StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads( );
362 libraryLoader.ensureInitialized(mApplication); 362 libraryLoader.ensureInitialized();
363 StrictMode.setThreadPolicy(oldPolicy); 363 StrictMode.setThreadPolicy(oldPolicy);
364 libraryLoader.asyncPrefetchLibrariesToMemory(); 364 libraryLoader.asyncPrefetchLibrariesToMemory();
365 BrowserStartupController.get(mApplication, LibraryProcessType.PROCES S_BROWSER) 365 BrowserStartupController.get(mApplication, LibraryProcessType.PROCES S_BROWSER)
366 .startBrowserProcessesSync(false); 366 .startBrowserProcessesSync(false);
367 GoogleServicesManager.get(mApplication); 367 GoogleServicesManager.get(mApplication);
368 } finally { 368 } finally {
369 TraceEvent.end("ChromeBrowserInitializer.startChromeBrowserProcesses Sync"); 369 TraceEvent.end("ChromeBrowserInitializer.startChromeBrowserProcesses Sync");
370 } 370 }
371 } 371 }
372 372
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 Log.e(TAG, "Killing process because of locale change."); 430 Log.e(TAG, "Killing process because of locale change.");
431 Process.killProcess(Process.myPid()); 431 Process.killProcess(Process.myPid());
432 } 432 }
433 433
434 DeviceFormFactor.resetValuesIfNeeded(mApplication); 434 DeviceFormFactor.resetValuesIfNeeded(mApplication);
435 } 435 }
436 } 436 }
437 }; 437 };
438 } 438 }
439 } 439 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698