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

Side by Side Diff: chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/safe_browsing/sandboxed_dmg_analyzer_mac.h" 5 #include "chrome/browser/safe_browsing/sandboxed_dmg_analyzer_mac.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/common/chrome_utility_messages.h" 10 #include "chrome/common/chrome_utility_messages.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 53 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
54 base::Bind(&SandboxedDMGAnalyzer::StartAnalysis, 54 base::Bind(&SandboxedDMGAnalyzer::StartAnalysis,
55 this)); 55 this));
56 } 56 }
57 57
58 void SandboxedDMGAnalyzer::StartAnalysis() { 58 void SandboxedDMGAnalyzer::StartAnalysis() {
59 DCHECK_CURRENTLY_ON(BrowserThread::IO); 59 DCHECK_CURRENTLY_ON(BrowserThread::IO);
60 60
61 content::UtilityProcessHost* utility_process_host = 61 content::UtilityProcessHost* utility_process_host =
62 content::UtilityProcessHost::Create(this, 62 content::UtilityProcessHost::Create(
63 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 63 this, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
64 64
65 utility_process_host->SetName(l10n_util::GetStringUTF16( 65 utility_process_host->SetName(l10n_util::GetStringUTF16(
66 IDS_UTILITY_PROCESS_SAFE_BROWSING_ZIP_FILE_ANALYZER_NAME)); 66 IDS_UTILITY_PROCESS_SAFE_BROWSING_ZIP_FILE_ANALYZER_NAME));
67 utility_process_host->Send( 67 utility_process_host->Send(
68 new ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection( 68 new ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection(
69 IPC::TakePlatformFileForTransit(std::move(file_)))); 69 IPC::TakePlatformFileForTransit(std::move(file_))));
70 } 70 }
71 71
72 void SandboxedDMGAnalyzer::OnProcessCrashed(int exit_code) { 72 void SandboxedDMGAnalyzer::OnProcessCrashed(int exit_code) {
73 OnAnalysisFinished(zip_analyzer::Results()); 73 OnAnalysisFinished(zip_analyzer::Results());
(...skipping 19 matching lines...) Expand all
93 DCHECK_CURRENTLY_ON(BrowserThread::IO); 93 DCHECK_CURRENTLY_ON(BrowserThread::IO);
94 if (callback_called_) 94 if (callback_called_)
95 return; 95 return;
96 96
97 callback_called_ = true; 97 callback_called_ = true;
98 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 98 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
99 base::Bind(callback_, results)); 99 base::Bind(callback_, results));
100 } 100 }
101 101
102 } // namespace safe_browsing 102 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698