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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); | 81 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); |
81 } | 82 } |
82 | 83 |
83 } // namespace | 84 } // namespace |
84 | 85 |
85 ChromeContentUtilityClient::ChromeContentUtilityClient() { | 86 ChromeContentUtilityClient::ChromeContentUtilityClient() { |
86 #if !defined(OS_ANDROID) | 87 #if !defined(OS_ANDROID) |
87 handlers_.push_back(new ProfileImportHandler()); | 88 handlers_.push_back(new ProfileImportHandler()); |
88 #endif // OS_ANDROID | 89 #endif // OS_ANDROID |
89 | 90 |
| 91 #if defined(OS_WIN) |
| 92 handlers_.push_back(new NetworkingPrivateHandler()); |
| 93 #endif // OS_WIN |
| 94 |
90 #if defined(ENABLE_MDNS) | 95 #if defined(ENABLE_MDNS) |
91 if (CommandLine::ForCurrentProcess()->HasSwitch( | 96 if (CommandLine::ForCurrentProcess()->HasSwitch( |
92 switches::kUtilityProcessEnableMDns)) { | 97 switches::kUtilityProcessEnableMDns)) { |
93 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); | 98 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); |
94 } | 99 } |
95 #endif // ENABLE_MDNS | 100 #endif // ENABLE_MDNS |
96 } | 101 } |
97 | 102 |
98 ChromeContentUtilityClient::~ChromeContentUtilityClient() { | 103 ChromeContentUtilityClient::~ChromeContentUtilityClient() { |
99 } | 104 } |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 picasa::PicasaAlbumsIndexer indexer(album_uids); | 628 picasa::PicasaAlbumsIndexer indexer(album_uids); |
624 indexer.ParseFolderINI(folders_inis); | 629 indexer.ParseFolderINI(folders_inis); |
625 | 630 |
626 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( | 631 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( |
627 indexer.albums_images())); | 632 indexer.albums_images())); |
628 ReleaseProcessIfNeeded(); | 633 ReleaseProcessIfNeeded(); |
629 } | 634 } |
630 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 635 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
631 | 636 |
632 } // namespace chrome | 637 } // namespace chrome |
OLD | NEW |