org.chromium.chrome.browser.FileProviderHelper Java Examples

The following examples show how to use org.chromium.chrome.browser.FileProviderHelper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChromeBrowserInitializer.java    From delion with Apache License 2.0 6 votes vote down vote up
private void onFinishNativeInitialization() {
    if (mNativeInitializationComplete) return;

    mNativeInitializationComplete = true;
    ContentUriUtils.setFileProviderUtil(new FileProviderHelper());

    if (TextUtils.equals("true", VariationsAssociatedData.getVariationParamValue(
            MinidumpDirectoryObserver.MINIDUMP_EXPERIMENT_NAME, "Enabled"))) {

        // Start the file observer to watch the minidump directory.
        new AsyncTask<Void, Void, MinidumpDirectoryObserver>() {
            @Override
            protected MinidumpDirectoryObserver doInBackground(Void... params) {
                return new MinidumpDirectoryObserver();
            }

            @Override
            protected void onPostExecute(MinidumpDirectoryObserver minidumpDirectoryObserver) {
                mMinidumpDirectoryObserver = minidumpDirectoryObserver;
                mMinidumpDirectoryObserver.startWatching();
            }
        }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    }
}
 
Example #2
Source File: ChromeBrowserInitializer.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
private void onFinishNativeInitialization() {
    if (mNativeInitializationComplete) return;

    mNativeInitializationComplete = true;
    ContentUriUtils.setFileProviderUtil(new FileProviderHelper());

    // Start the file observer to watch the minidump directory.
    new AsyncTask<Void, Void, MinidumpDirectoryObserver>() {
        @Override
        protected MinidumpDirectoryObserver doInBackground(Void... params) {
            return new MinidumpDirectoryObserver();
        }

        @Override
        protected void onPostExecute(MinidumpDirectoryObserver minidumpDirectoryObserver) {
            mMinidumpDirectoryObserver = minidumpDirectoryObserver;
            mMinidumpDirectoryObserver.startWatching();
        }
    }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
 
Example #3
Source File: ChromeBrowserInitializer.java    From 365browser with Apache License 2.0 6 votes vote down vote up
private void onFinishNativeInitialization() {
    if (mNativeInitializationComplete) return;

    mNativeInitializationComplete = true;
    ContentUriUtils.setFileProviderUtil(new FileProviderHelper());

    // When a minidump is detected, extract and append a logcat to it, then upload it to the
    // crash server. Note that the logcat extraction might fail. This is ok; in that case, the
    // minidump will be found and uploaded upon the next browser launch.
    CrashDumpManager.registerUploadCallback(new CrashDumpManager.UploadMinidumpCallback() {
        @Override
        public void tryToUploadMinidump(File minidump) {
            AsyncTask.THREAD_POOL_EXECUTOR.execute(new LogcatExtractionRunnable(minidump));
        }
    });
}