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

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

Issue 1062873003: Give names to all utility processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typos Created 5 years, 8 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 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_itunes_pref_parser_win.h" 5 #include "chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.h"
6 6
7 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" 7 #include "chrome/common/extensions/chrome_utility_extensions_messages.h"
8 #include "chrome/grit/generated_resources.h"
8 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/utility_process_host.h" 10 #include "content/public/browser/utility_process_host.h"
11 #include "ui/base/l10n/l10n_util.h"
10 12
11 using content::BrowserThread; 13 using content::BrowserThread;
12 using content::UtilityProcessHost; 14 using content::UtilityProcessHost;
13 15
14 namespace itunes { 16 namespace itunes {
15 17
16 SafeITunesPrefParserWin::SafeITunesPrefParserWin( 18 SafeITunesPrefParserWin::SafeITunesPrefParserWin(
17 const std::string& unsafe_xml, 19 const std::string& unsafe_xml,
18 const ParserCallback& callback) 20 const ParserCallback& callback)
19 : unsafe_xml_(unsafe_xml), 21 : unsafe_xml_(unsafe_xml),
(...skipping 13 matching lines...) Expand all
33 35
34 SafeITunesPrefParserWin::~SafeITunesPrefParserWin() { 36 SafeITunesPrefParserWin::~SafeITunesPrefParserWin() {
35 } 37 }
36 38
37 void SafeITunesPrefParserWin::StartWorkOnIOThread() { 39 void SafeITunesPrefParserWin::StartWorkOnIOThread() {
38 DCHECK_CURRENTLY_ON(BrowserThread::IO); 40 DCHECK_CURRENTLY_ON(BrowserThread::IO);
39 DCHECK_EQ(INITIAL_STATE, parser_state_); 41 DCHECK_EQ(INITIAL_STATE, parser_state_);
40 42
41 UtilityProcessHost* host = 43 UtilityProcessHost* host =
42 UtilityProcessHost::Create(this, base::MessageLoopProxy::current()); 44 UtilityProcessHost::Create(this, base::MessageLoopProxy::current());
45 host->SetName(l10n_util::GetStringUTF16(
46 IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME));
43 host->Send(new ChromeUtilityMsg_ParseITunesPrefXml(unsafe_xml_)); 47 host->Send(new ChromeUtilityMsg_ParseITunesPrefXml(unsafe_xml_));
44 parser_state_ = STARTED_PARSING_STATE; 48 parser_state_ = STARTED_PARSING_STATE;
45 } 49 }
46 50
47 void SafeITunesPrefParserWin::OnGotITunesDirectory( 51 void SafeITunesPrefParserWin::OnGotITunesDirectory(
48 const base::FilePath& library_file) { 52 const base::FilePath& library_file) {
49 DCHECK_CURRENTLY_ON(BrowserThread::IO); 53 DCHECK_CURRENTLY_ON(BrowserThread::IO);
50 54
51 if (parser_state_ != STARTED_PARSING_STATE) 55 if (parser_state_ != STARTED_PARSING_STATE)
52 return; 56 return;
(...skipping 11 matching lines...) Expand all
64 bool handled = true; 68 bool handled = true;
65 IPC_BEGIN_MESSAGE_MAP(SafeITunesPrefParserWin, message) 69 IPC_BEGIN_MESSAGE_MAP(SafeITunesPrefParserWin, message)
66 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GotITunesDirectory, 70 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GotITunesDirectory,
67 OnGotITunesDirectory) 71 OnGotITunesDirectory)
68 IPC_MESSAGE_UNHANDLED(handled = false) 72 IPC_MESSAGE_UNHANDLED(handled = false)
69 IPC_END_MESSAGE_MAP() 73 IPC_END_MESSAGE_MAP()
70 return handled; 74 return handled;
71 } 75 }
72 76
73 } // namespace itunes 77 } // namespace itunes
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698