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

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

Issue 2079233004: Add the Windows.IsPinnedToTaskbar metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Constexpr TimeDelta Created 4 years, 5 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
« no previous file with comments | « chrome/utility/DEPS ('k') | chrome/utility/ipc_shell_handler_win.h » ('j') | 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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 20 matching lines...) Expand all
31 31
32 #if !defined(OS_ANDROID) 32 #if !defined(OS_ANDROID)
33 #include "chrome/common/resource_usage_reporter.mojom.h" 33 #include "chrome/common/resource_usage_reporter.mojom.h"
34 #include "chrome/utility/profile_import_handler.h" 34 #include "chrome/utility/profile_import_handler.h"
35 #include "mojo/public/cpp/bindings/strong_binding.h" 35 #include "mojo/public/cpp/bindings/strong_binding.h"
36 #include "net/proxy/mojo_proxy_resolver_factory_impl.h" 36 #include "net/proxy/mojo_proxy_resolver_factory_impl.h"
37 #include "net/proxy/proxy_resolver_v8.h" 37 #include "net/proxy/proxy_resolver_v8.h"
38 #endif 38 #endif
39 39
40 #if defined(OS_WIN) 40 #if defined(OS_WIN)
41 #include "chrome/utility/shell_handler_win.h" 41 #include "chrome/utility/ipc_shell_handler_win.h"
42 #include "chrome/utility/shell_handler_impl_win.h"
42 #endif 43 #endif
43 44
44 #if defined(ENABLE_EXTENSIONS) 45 #if defined(ENABLE_EXTENSIONS)
45 #include "chrome/utility/extensions/extensions_handler.h" 46 #include "chrome/utility/extensions/extensions_handler.h"
46 #include "chrome/utility/image_writer/image_writer_handler.h" 47 #include "chrome/utility/image_writer/image_writer_handler.h"
47 #endif 48 #endif
48 49
49 #if defined(ENABLE_PRINT_PREVIEW) || \ 50 #if defined(ENABLE_PRINT_PREVIEW) || \
50 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) 51 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN))
51 #include "chrome/utility/printing_handler.h" 52 #include "chrome/utility/printing_handler.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 handlers_.push_back(new extensions::ExtensionsHandler(this)); 121 handlers_.push_back(new extensions::ExtensionsHandler(this));
121 handlers_.push_back(new image_writer::ImageWriterHandler()); 122 handlers_.push_back(new image_writer::ImageWriterHandler());
122 #endif 123 #endif
123 124
124 #if defined(ENABLE_PRINT_PREVIEW) || \ 125 #if defined(ENABLE_PRINT_PREVIEW) || \
125 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) 126 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN))
126 handlers_.push_back(new printing::PrintingHandler()); 127 handlers_.push_back(new printing::PrintingHandler());
127 #endif 128 #endif
128 129
129 #if defined(OS_WIN) 130 #if defined(OS_WIN)
130 handlers_.push_back(new ShellHandler()); 131 handlers_.push_back(new IPCShellHandler());
131 #endif 132 #endif
132 } 133 }
133 134
134 ChromeContentUtilityClient::~ChromeContentUtilityClient() { 135 ChromeContentUtilityClient::~ChromeContentUtilityClient() {
135 } 136 }
136 137
137 void ChromeContentUtilityClient::UtilityThreadStarted() { 138 void ChromeContentUtilityClient::UtilityThreadStarted() {
138 #if defined(ENABLE_EXTENSIONS) 139 #if defined(ENABLE_EXTENSIONS)
139 extensions::UtilityHandler::UtilityThreadStarted(); 140 extensions::UtilityHandler::UtilityThreadStarted();
140 #endif 141 #endif
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return; 203 return;
203 204
204 #if !defined(OS_ANDROID) 205 #if !defined(OS_ANDROID)
205 registry->AddInterface<net::interfaces::ProxyResolverFactory>( 206 registry->AddInterface<net::interfaces::ProxyResolverFactory>(
206 base::Bind(CreateProxyResolverFactory)); 207 base::Bind(CreateProxyResolverFactory));
207 registry->AddInterface(base::Bind(CreateResourceUsageReporter)); 208 registry->AddInterface(base::Bind(CreateResourceUsageReporter));
208 #endif 209 #endif
209 registry->AddInterface(base::Bind(&CreateImageDecoder)); 210 registry->AddInterface(base::Bind(&CreateImageDecoder));
210 registry->AddInterface( 211 registry->AddInterface(
211 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create)); 212 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create));
213 #if defined(OS_WIN)
214 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create));
215 #endif
212 } 216 }
213 217
214 void ChromeContentUtilityClient::AddHandler( 218 void ChromeContentUtilityClient::AddHandler(
215 std::unique_ptr<UtilityMessageHandler> handler) { 219 std::unique_ptr<UtilityMessageHandler> handler) {
216 handlers_.push_back(std::move(handler)); 220 handlers_.push_back(std::move(handler));
217 } 221 }
218 222
219 // static 223 // static
220 void ChromeContentUtilityClient::PreSandboxStartup() { 224 void ChromeContentUtilityClient::PreSandboxStartup() {
221 #if defined(ENABLE_EXTENSIONS) 225 #if defined(ENABLE_EXTENSIONS)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 safe_browsing::zip_analyzer::Results results; 309 safe_browsing::zip_analyzer::Results results;
306 safe_browsing::dmg::AnalyzeDMGFile( 310 safe_browsing::dmg::AnalyzeDMGFile(
307 IPC::PlatformFileForTransitToFile(dmg_file), &results); 311 IPC::PlatformFileForTransitToFile(dmg_file), &results);
308 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( 312 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished(
309 results)); 313 results));
310 ReleaseProcessIfNeeded(); 314 ReleaseProcessIfNeeded();
311 } 315 }
312 #endif // defined(OS_MACOSX) 316 #endif // defined(OS_MACOSX)
313 317
314 #endif // defined(FULL_SAFE_BROWSING) 318 #endif // defined(FULL_SAFE_BROWSING)
OLDNEW
« no previous file with comments | « chrome/utility/DEPS ('k') | chrome/utility/ipc_shell_handler_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698