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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 191513003: Check --utility-enable-mdns before local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStart… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/utility/chrome_content_utility_client.h" 5 #include "chrome/utility/chrome_content_utility_client.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 !handled && it != handlers_.end(); ++it) { 172 !handled && it != handlers_.end(); ++it) {
173 handled = (*it)->OnMessageReceived(message); 173 handled = (*it)->OnMessageReceived(message);
174 } 174 }
175 175
176 return handled; 176 return handled;
177 } 177 }
178 178
179 // static 179 // static
180 void ChromeContentUtilityClient::PreSandboxStartup() { 180 void ChromeContentUtilityClient::PreSandboxStartup() {
181 #if defined(ENABLE_MDNS) 181 #if defined(ENABLE_MDNS)
182 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup(); 182 if (CommandLine::ForCurrentProcess()->HasSwitch(
183 switches::kUtilityProcessEnableMDns)) {
184 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup();
185 }
183 #endif // ENABLE_MDNS 186 #endif // ENABLE_MDNS
184 187
185 // Load media libraries for media file validation. 188 // Load media libraries for media file validation.
186 base::FilePath media_path; 189 base::FilePath media_path;
187 PathService::Get(content::DIR_MEDIA_LIBS, &media_path); 190 PathService::Get(content::DIR_MEDIA_LIBS, &media_path);
188 if (!media_path.empty()) 191 if (!media_path.empty())
189 media::InitializeMediaLibrary(media_path); 192 media::InitializeMediaLibrary(media_path);
190 } 193 }
191 194
192 void ChromeContentUtilityClient::OnUnpackExtension( 195 void ChromeContentUtilityClient::OnUnpackExtension(
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 picasa::PicasaAlbumsIndexer indexer(album_uids); 626 picasa::PicasaAlbumsIndexer indexer(album_uids);
624 indexer.ParseFolderINI(folders_inis); 627 indexer.ParseFolderINI(folders_inis);
625 628
626 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( 629 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished(
627 indexer.albums_images())); 630 indexer.albums_images()));
628 ReleaseProcessIfNeeded(); 631 ReleaseProcessIfNeeded();
629 } 632 }
630 #endif // defined(OS_WIN) || defined(OS_MACOSX) 633 #endif // defined(OS_WIN) || defined(OS_MACOSX)
631 634
632 } // namespace chrome 635 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698