| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |