| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/extensions_handler.h" | 5 #include "chrome/utility/extensions/extensions_handler.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 void ExtensionsHandler::PreSandboxStartup() { | 182 void ExtensionsHandler::PreSandboxStartup() { |
| 183 // Initialize media libraries for media file validation. | 183 // Initialize media libraries for media file validation. |
| 184 media::InitializeMediaLibrary(); | 184 media::InitializeMediaLibrary(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 // static | 187 // static |
| 188 void ExtensionsHandler::ExposeInterfacesToBrowser( | 188 void ExtensionsHandler::ExposeInterfacesToBrowser( |
| 189 service_manager::InterfaceRegistry* registry, | 189 service_manager::InterfaceRegistry* registry, |
| 190 bool running_elevated) { | 190 bool running_elevated) { |
| 191 // If our process runs with elevated privileges, only add elevated Mojo | 191 // If our process runs with elevated privileges, only add elevated Mojo |
| 192 // services to the interface registry. | 192 // interfaces to the interface registry. |
| 193 if (running_elevated) { | 193 if (running_elevated) { |
| 194 #if defined(OS_WIN) | 194 #if defined(OS_WIN) |
| 195 registry->AddInterface(base::Bind(&RemovableStorageWriterImpl::Create)); | 195 registry->AddInterface(base::Bind(&RemovableStorageWriterImpl::Create)); |
| 196 registry->AddInterface(base::Bind(&WiFiCredentialsGetterImpl::Create)); | 196 registry->AddInterface(base::Bind(&WiFiCredentialsGetterImpl::Create)); |
| 197 #endif | 197 #endif |
| 198 return; | 198 return; |
| 199 } | 199 } |
| 200 | 200 |
| 201 registry->AddInterface(base::Bind(&MediaParserImpl::Create)); | 201 registry->AddInterface(base::Bind(&MediaParserImpl::Create)); |
| 202 #if !defined(OS_WIN) | 202 #if !defined(OS_WIN) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 picasa::PicasaAlbumsIndexer indexer(album_uids); | 281 picasa::PicasaAlbumsIndexer indexer(album_uids); |
| 282 indexer.ParseFolderINI(folders_inis); | 282 indexer.ParseFolderINI(folders_inis); |
| 283 content::UtilityThread::Get()->Send( | 283 content::UtilityThread::Get()->Send( |
| 284 new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( | 284 new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( |
| 285 indexer.albums_images())); | 285 indexer.albums_images())); |
| 286 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); | 286 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); |
| 287 } | 287 } |
| 288 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 288 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 289 | 289 |
| 290 } // namespace extensions | 290 } // namespace extensions |
| OLD | NEW |