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

Side by Side Diff: remoting/host/setup/me2me_native_messaging_host_main.cc

Issue 2961333002: Fix field trials not working in utility processes. (Closed)
Patch Set: review comment Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/host/setup/me2me_native_messaging_host_main.h" 5 #include "remoting/host/setup/me2me_native_messaging_host_main.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 21 matching lines...) Expand all
32 #include "remoting/host/pairing_registry_delegate.h" 32 #include "remoting/host/pairing_registry_delegate.h"
33 #include "remoting/host/setup/me2me_native_messaging_host.h" 33 #include "remoting/host/setup/me2me_native_messaging_host.h"
34 #include "remoting/host/switches.h" 34 #include "remoting/host/switches.h"
35 #include "remoting/host/usage_stats_consent.h" 35 #include "remoting/host/usage_stats_consent.h"
36 36
37 #if defined(OS_MACOSX) 37 #if defined(OS_MACOSX)
38 #include "base/mac/scoped_nsautorelease_pool.h" 38 #include "base/mac/scoped_nsautorelease_pool.h"
39 #endif // defined(OS_MACOSX) 39 #endif // defined(OS_MACOSX)
40 40
41 #if defined(OS_WIN) 41 #if defined(OS_WIN)
42 #include "base/process/process_info.h"
42 #include "base/win/registry.h" 43 #include "base/win/registry.h"
43 #include "remoting/host/pairing_registry_delegate_win.h" 44 #include "remoting/host/pairing_registry_delegate_win.h"
44 #include "remoting/host/win/elevation_helpers.h"
45 #endif // defined(OS_WIN) 45 #endif // defined(OS_WIN)
46 46
47 #if defined(USE_GLIB) && !defined(OS_CHROMEOS) 47 #if defined(USE_GLIB) && !defined(OS_CHROMEOS)
48 #include <glib-object.h> 48 #include <glib-object.h>
49 #endif // defined(USE_GLIB) && !defined(OS_CHROMEOS) 49 #endif // defined(USE_GLIB) && !defined(OS_CHROMEOS)
50 50
51 using remoting::protocol::PairingRegistry; 51 using remoting::protocol::PairingRegistry;
52 52
53 namespace remoting { 53 namespace remoting {
54 54
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 LOG(WARNING) << "Invalid parameter value --" << kParentWindowSwitchName 116 LOG(WARNING) << "Invalid parameter value --" << kParentWindowSwitchName
117 << "=" << native_view; 117 << "=" << native_view;
118 } 118 }
119 } 119 }
120 120
121 base::File read_file; 121 base::File read_file;
122 base::File write_file; 122 base::File write_file;
123 bool needs_elevation = false; 123 bool needs_elevation = false;
124 124
125 #if defined(OS_WIN) 125 #if defined(OS_WIN)
126 needs_elevation = !IsProcessElevated(); 126 needs_elevation = !base::IsCurrentProcessElevated();
127 127
128 if (command_line->HasSwitch(kElevateSwitchName)) { 128 if (command_line->HasSwitch(kElevateSwitchName)) {
129 DCHECK(!needs_elevation); 129 DCHECK(!needs_elevation);
130 130
131 // The "elevate" switch is always accompanied by the "input" and "output" 131 // The "elevate" switch is always accompanied by the "input" and "output"
132 // switches whose values name named pipes that should be used in place of 132 // switches whose values name named pipes that should be used in place of
133 // stdin and stdout. 133 // stdin and stdout.
134 DCHECK(command_line->HasSwitch(kInputSwitchName)); 134 DCHECK(command_line->HasSwitch(kInputSwitchName));
135 DCHECK(command_line->HasSwitch(kOutputSwitchName)); 135 DCHECK(command_line->HasSwitch(kOutputSwitchName));
136 136
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Run the loop until channel is alive. 267 // Run the loop until channel is alive.
268 run_loop.Run(); 268 run_loop.Run();
269 269
270 // Block until tasks blocking shutdown have completed their execution. 270 // Block until tasks blocking shutdown have completed their execution.
271 base::TaskScheduler::GetInstance()->Shutdown(); 271 base::TaskScheduler::GetInstance()->Shutdown();
272 272
273 return kSuccessExitCode; 273 return kSuccessExitCode;
274 } 274 }
275 275
276 } // namespace remoting 276 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698