Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/crash_upload_list/crash_upload_list.h" | 5 #include "chrome/browser/crash_upload_list/crash_upload_list.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
| 12 #include "chrome/common/features.h" | |
| 12 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 13 | 14 |
| 14 #if defined(OS_MACOSX) || defined(OS_WIN) | 15 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 15 #include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h" | 16 #include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h" |
| 16 #endif | 17 #endif |
| 17 | 18 |
| 19 #if BUILDFLAG(ANDROID_JAVA_UI) | |
|
Ilya Sherman
2016/09/01 20:49:31
Hmm, is an OS check not more appropriate? I'm not
gayane -on leave until 09-2017
2016/09/01 22:17:58
It's not exactly clear for me, but I have seen mor
Ilya Sherman
2016/09/01 22:43:04
Okay. I think we should check with someone who's
| |
| 20 #include "chrome/browser/crash_upload_list/crash_upload_list_android.h" | |
| 21 #endif | |
| 22 | |
| 18 scoped_refptr<CrashUploadList> CreateCrashUploadList( | 23 scoped_refptr<CrashUploadList> CreateCrashUploadList( |
| 19 UploadList::Delegate* delegate) { | 24 UploadList::Delegate* delegate) { |
| 20 #if defined(OS_MACOSX) || defined(OS_WIN) | 25 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 21 return new CrashUploadListCrashpad(delegate, | 26 return new CrashUploadListCrashpad(delegate, |
| 22 content::BrowserThread::GetBlockingPool()); | 27 content::BrowserThread::GetBlockingPool()); |
| 23 #else | 28 #else |
| 24 base::FilePath crash_dir_path; | 29 base::FilePath crash_dir_path; |
| 25 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir_path); | 30 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir_path); |
| 26 base::FilePath upload_log_path = | 31 base::FilePath upload_log_path = |
| 27 crash_dir_path.AppendASCII(CrashUploadList::kReporterLogFilename); | 32 crash_dir_path.AppendASCII(CrashUploadList::kReporterLogFilename); |
| 33 #if BUILDFLAG(ANDROID_JAVA_UI) | |
| 34 return new CrashUploadListAndroid(delegate, upload_log_path, | |
| 35 content::BrowserThread::GetBlockingPool()); | |
| 36 #else | |
| 28 return new CrashUploadList(delegate, upload_log_path, | 37 return new CrashUploadList(delegate, upload_log_path, |
| 29 content::BrowserThread::GetBlockingPool()); | 38 content::BrowserThread::GetBlockingPool()); |
| 30 #endif | 39 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| 40 #endif // defined(OS_MACOSX) || defined(OS_WIN) | |
| 31 } | 41 } |
| OLD | NEW |