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

Side by Side Diff: remoting/host/desktop_session_win.cc

Issue 2887243002: Remove ScopedComPtr::CreateInstance() (Closed)
Patch Set: Created 3 years, 7 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 | « remoting/host/audio_capturer_win.cc ('k') | remoting/host/setup/win/auth_code_getter.cc » ('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 "remoting/host/desktop_session_win.h" 5 #include "remoting/host/desktop_session_win.h"
6 6
7 #include <objbase.h>
7 #include <sddl.h> 8 #include <sddl.h>
8 9
9 #include <limits> 10 #include <limits>
10 #include <memory> 11 #include <memory>
11 #include <utility> 12 #include <utility>
12 13
13 #include "base/base_switches.h" 14 #include "base/base_switches.h"
14 #include "base/command_line.h" 15 #include "base/command_line.h"
15 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
16 #include "base/guid.h" 17 #include "base/guid.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 260
260 bool RdpSession::Initialize(const ScreenResolution& resolution) { 261 bool RdpSession::Initialize(const ScreenResolution& resolution) {
261 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 262 DCHECK(caller_task_runner()->BelongsToCurrentThread());
262 263
263 if (!VerifyRdpSettings()) { 264 if (!VerifyRdpSettings()) {
264 LOG(ERROR) << "Could not create an RDP session due to invalid settings."; 265 LOG(ERROR) << "Could not create an RDP session due to invalid settings.";
265 return false; 266 return false;
266 } 267 }
267 268
268 // Create the RDP wrapper object. 269 // Create the RDP wrapper object.
269 HRESULT result = rdp_desktop_session_.CreateInstance( 270 HRESULT result =
270 __uuidof(RdpDesktopSession)); 271 ::CoCreateInstance(__uuidof(RdpDesktopSession), nullptr, CLSCTX_ALL,
272 IID_PPV_ARGS(&rdp_desktop_session_));
271 if (FAILED(result)) { 273 if (FAILED(result)) {
272 LOG(ERROR) << "Failed to create RdpSession object, 0x" 274 LOG(ERROR) << "Failed to create RdpSession object, 0x"
273 << std::hex << result << std::dec << "."; 275 << std::hex << result << std::dec << ".";
274 return false; 276 return false;
275 } 277 }
276 278
277 ScreenResolution local_resolution = resolution; 279 ScreenResolution local_resolution = resolution;
278 280
279 // If the screen resolution is not specified, use the default screen 281 // If the screen resolution is not specified, use the default screen
280 // resolution. 282 // resolution.
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 exploded.hour, 700 exploded.hour,
699 exploded.minute, 701 exploded.minute,
700 exploded.second, 702 exploded.second,
701 exploded.millisecond, 703 exploded.millisecond,
702 passed.c_str()); 704 passed.c_str());
703 705
704 last_timestamp_ = now; 706 last_timestamp_ = now;
705 } 707 }
706 708
707 } // namespace remoting 709 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/audio_capturer_win.cc ('k') | remoting/host/setup/win/auth_code_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698