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

Side by Side Diff: chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media_galleries/fileapi/safe_iapps_library_parser.h" 5 #include "chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h"
6 6
7 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" 7 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
8 #include "chrome/common/chrome_utility_messages.h" 8 #include "chrome/common/chrome_utility_messages.h"
9 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" 9 #include "chrome/common/extensions/chrome_utility_extensions_messages.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 BrowserThread::IO, FROM_HERE, 57 BrowserThread::IO, FROM_HERE,
58 base::Bind(&SafeIAppsLibraryParser::StartProcessOnIOThread, this)); 58 base::Bind(&SafeIAppsLibraryParser::StartProcessOnIOThread, this));
59 } 59 }
60 60
61 SafeIAppsLibraryParser::~SafeIAppsLibraryParser() {} 61 SafeIAppsLibraryParser::~SafeIAppsLibraryParser() {}
62 62
63 void SafeIAppsLibraryParser::StartProcessOnIOThread() { 63 void SafeIAppsLibraryParser::StartProcessOnIOThread() {
64 DCHECK_CURRENTLY_ON(BrowserThread::IO); 64 DCHECK_CURRENTLY_ON(BrowserThread::IO);
65 DCHECK_EQ(INITIAL_STATE, parser_state_); 65 DCHECK_EQ(INITIAL_STATE, parser_state_);
66 66
67 scoped_refptr<base::MessageLoopProxy> message_loop_proxy = 67 scoped_refptr<base::SingleThreadTaskRunner> task_runner =
68 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 68 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
69 utility_process_host_ = 69 utility_process_host_ =
70 UtilityProcessHost::Create(this, message_loop_proxy.get())->AsWeakPtr(); 70 UtilityProcessHost::Create(this, task_runner.get())->AsWeakPtr();
71 utility_process_host_->SetName(l10n_util::GetStringUTF16( 71 utility_process_host_->SetName(l10n_util::GetStringUTF16(
72 IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME)); 72 IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME));
73 // Wait for the startup notification before sending the main IPC to the 73 // Wait for the startup notification before sending the main IPC to the
74 // utility process, so that we can dup the file handle. 74 // utility process, so that we can dup the file handle.
75 utility_process_host_->Send(new ChromeUtilityMsg_StartupPing); 75 utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
76 parser_state_ = PINGED_UTILITY_PROCESS_STATE; 76 parser_state_ = PINGED_UTILITY_PROCESS_STATE;
77 } 77 }
78 78
79 void SafeIAppsLibraryParser::OnUtilityProcessStarted() { 79 void SafeIAppsLibraryParser::OnUtilityProcessStarted() {
80 DCHECK_CURRENTLY_ON(BrowserThread::IO); 80 DCHECK_CURRENTLY_ON(BrowserThread::IO);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 OnGotIPhotoLibrary) 167 OnGotIPhotoLibrary)
168 #endif 168 #endif
169 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GotITunesLibrary, 169 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GotITunesLibrary,
170 OnGotITunesLibrary) 170 OnGotITunesLibrary)
171 IPC_MESSAGE_UNHANDLED(handled = false) 171 IPC_MESSAGE_UNHANDLED(handled = false)
172 IPC_END_MESSAGE_MAP() 172 IPC_END_MESSAGE_MAP()
173 return handled; 173 return handled;
174 } 174 }
175 175
176 } // namespace iapps 176 } // namespace iapps
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698