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

Side by Side Diff: chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc

Issue 2335193007: Remove explicit usage of SequencedWorkerPool from UploadList. (Closed)
Patch Set: rebase on r417159 Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_crashpad.h" 5 #include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/threading/sequenced_worker_pool.h" 9 #include <utility>
10
11 #include "base/task_runner.h"
10 #include "base/time/time.h" 12 #include "base/time/time.h"
11 #include "build/build_config.h" 13 #include "build/build_config.h"
12 #include "chrome/common/chrome_constants.h" 14 #include "chrome/common/chrome_constants.h"
13 #include "components/crash/content/app/crashpad.h" 15 #include "components/crash/content/app/crashpad.h"
14 16
15 namespace { 17 namespace {
16 18
17 #if defined(OS_WIN) 19 #if defined(OS_WIN)
18 typedef void (*GetCrashReportsPointer)( 20 typedef void (*GetCrashReportsPointer)(
19 const crash_reporter::Report** reports, 21 const crash_reporter::Report** reports,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 75 }
74 76
75 NOTREACHED(); 77 NOTREACHED();
76 return UploadList::UploadInfo::State::Uploaded; 78 return UploadList::UploadInfo::State::Uploaded;
77 } 79 }
78 80
79 } // namespace 81 } // namespace
80 82
81 CrashUploadListCrashpad::CrashUploadListCrashpad( 83 CrashUploadListCrashpad::CrashUploadListCrashpad(
82 Delegate* delegate, 84 Delegate* delegate,
83 const scoped_refptr<base::SequencedWorkerPool>& worker_pool) 85 scoped_refptr<base::TaskRunner> task_runner)
84 : CrashUploadList(delegate, base::FilePath(), worker_pool) {} 86 : CrashUploadList(delegate, base::FilePath(), std::move(task_runner)) {}
85 87
86 CrashUploadListCrashpad::~CrashUploadListCrashpad() {} 88 CrashUploadListCrashpad::~CrashUploadListCrashpad() {}
87 89
88 void CrashUploadListCrashpad::LoadUploadList( 90 void CrashUploadListCrashpad::LoadUploadList(
89 std::vector<UploadList::UploadInfo>* uploads) { 91 std::vector<UploadList::UploadInfo>* uploads) {
90 std::vector<crash_reporter::Report> reports; 92 std::vector<crash_reporter::Report> reports;
91 #if defined(OS_WIN) 93 #if defined(OS_WIN)
92 // On Windows, we only link crash client into chrome.exe (not the dlls), and 94 // On Windows, we only link crash client into chrome.exe (not the dlls), and
93 // it does the registration. That means the global that holds the crash report 95 // it does the registration. That means the global that holds the crash report
94 // database lives in the .exe, so we need to grab a pointer to a helper in the 96 // database lives in the .exe, so we need to grab a pointer to a helper in the
(...skipping 14 matching lines...) Expand all
109 void CrashUploadListCrashpad::RequestSingleCrashUpload( 111 void CrashUploadListCrashpad::RequestSingleCrashUpload(
110 const std::string& local_id) { 112 const std::string& local_id) {
111 #if defined(OS_WIN) 113 #if defined(OS_WIN)
112 // On Windows, crash reporting is handled by chrome_elf.dll, that's why we 114 // On Windows, crash reporting is handled by chrome_elf.dll, that's why we
113 // can't call crash_reporter::RequestSingleCrashUpload directly. 115 // can't call crash_reporter::RequestSingleCrashUpload directly.
114 RequestSingleCrashUploadThunk(local_id); 116 RequestSingleCrashUploadThunk(local_id);
115 #else 117 #else
116 crash_reporter::RequestSingleCrashUpload(local_id); 118 crash_reporter::RequestSingleCrashUpload(local_id);
117 #endif 119 #endif
118 } 120 }
OLDNEW
« no previous file with comments | « chrome/browser/crash_upload_list/crash_upload_list_crashpad.h ('k') | components/upload_list/crash_upload_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698