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" |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "chrome/common/chrome_utility_messages.h" | 16 #include "chrome/common/chrome_utility_messages.h" |
17 #include "chrome/common/extensions/chrome_extensions_client.h" | 17 #include "chrome/common/extensions/chrome_extensions_client.h" |
18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
19 #include "chrome/common/extensions/extension_l10n_util.h" | 19 #include "chrome/common/extensions/extension_l10n_util.h" |
20 #include "chrome/common/extensions/update_manifest.h" | 20 #include "chrome/common/extensions/update_manifest.h" |
21 #include "chrome/common/safe_browsing/zip_analyzer.h" | 21 #include "chrome/common/safe_browsing/zip_analyzer.h" |
22 #include "chrome/utility/extensions/unpacker.h" | 22 #include "chrome/utility/extensions/unpacker.h" |
23 #include "chrome/utility/networking_private_handler.h" | |
23 #include "chrome/utility/profile_import_handler.h" | 24 #include "chrome/utility/profile_import_handler.h" |
24 #include "chrome/utility/web_resource_unpacker.h" | 25 #include "chrome/utility/web_resource_unpacker.h" |
25 #include "content/public/child/image_decoder_utils.h" | 26 #include "content/public/child/image_decoder_utils.h" |
26 #include "content/public/common/content_paths.h" | 27 #include "content/public/common/content_paths.h" |
27 #include "content/public/utility/utility_thread.h" | 28 #include "content/public/utility/utility_thread.h" |
28 #include "extensions/common/manifest.h" | 29 #include "extensions/common/manifest.h" |
29 #include "media/base/media.h" | 30 #include "media/base/media.h" |
30 #include "media/base/media_file_checker.h" | 31 #include "media/base/media_file_checker.h" |
31 #include "printing/page_range.h" | 32 #include "printing/page_range.h" |
32 #include "third_party/skia/include/core/SkBitmap.h" | 33 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); | 76 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); |
76 } | 77 } |
77 | 78 |
78 } // namespace | 79 } // namespace |
79 | 80 |
80 ChromeContentUtilityClient::ChromeContentUtilityClient() { | 81 ChromeContentUtilityClient::ChromeContentUtilityClient() { |
81 #if !defined(OS_ANDROID) | 82 #if !defined(OS_ANDROID) |
82 handlers_.push_back(new ProfileImportHandler()); | 83 handlers_.push_back(new ProfileImportHandler()); |
83 #endif // OS_ANDROID | 84 #endif // OS_ANDROID |
84 | 85 |
86 #if !defined(OS_ANDROID) | |
87 handlers_.push_back(new NetworkingPrivateHandler()); | |
stevenjb
2013/09/25 19:09:15
I know the code for this is not OS specific, but d
mef
2013/10/08 21:46:26
Done.
| |
88 #endif // OS_ANDROID | |
89 | |
85 #if defined(ENABLE_MDNS) | 90 #if defined(ENABLE_MDNS) |
86 if (CommandLine::ForCurrentProcess()->HasSwitch( | 91 if (CommandLine::ForCurrentProcess()->HasSwitch( |
87 switches::kUtilityProcessEnableMDns)) { | 92 switches::kUtilityProcessEnableMDns)) { |
88 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); | 93 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); |
89 } | 94 } |
90 #endif // ENABLE_MDNS | 95 #endif // ENABLE_MDNS |
91 } | 96 } |
92 | 97 |
93 ChromeContentUtilityClient::~ChromeContentUtilityClient() { | 98 ChromeContentUtilityClient::~ChromeContentUtilityClient() { |
94 } | 99 } |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
602 picasa::PicasaAlbumsIndexer indexer(album_uids); | 607 picasa::PicasaAlbumsIndexer indexer(album_uids); |
603 indexer.ParseFolderINI(folders_inis); | 608 indexer.ParseFolderINI(folders_inis); |
604 | 609 |
605 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( | 610 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( |
606 indexer.albums_images())); | 611 indexer.albums_images())); |
607 ReleaseProcessIfNeeded(); | 612 ReleaseProcessIfNeeded(); |
608 } | 613 } |
609 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 614 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
610 | 615 |
611 } // namespace chrome | 616 } // namespace chrome |
OLD | NEW |