OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |