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

Side by Side Diff: cloud_print/service/win/service_utils.cc

Issue 13039002: Send data back from service using IPC, not file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cloud_print/service/win/service_utils.h ('k') | cloud_print/service/win/setup_listener.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 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 "cloud_print/service/win/service_utils.h" 5 #include "cloud_print/service/win/service_utils.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <security.h> // NOLINT 8 #include <security.h> // NOLINT
9 9
10 string16 GetCurrentUserName() { 10 string16 GetCurrentUserName() {
11 ULONG size = 0; 11 ULONG size = 0;
12 string16 result; 12 string16 result;
13 ::GetUserNameEx(::NameSamCompatible, NULL, &size); 13 ::GetUserNameEx(::NameSamCompatible, NULL, &size);
14 result.resize(size); 14 result.resize(size);
15 if (result.empty()) 15 if (result.empty())
16 return result; 16 return result;
17 if (!::GetUserNameEx(::NameSamCompatible, &result[0], &size)) 17 if (!::GetUserNameEx(::NameSamCompatible, &result[0], &size))
18 result.clear(); 18 result.clear();
19 result.resize(size); 19 result.resize(size);
20 return result; 20 return result;
21 } 21 }
22 22
23 23
OLDNEW
« no previous file with comments | « cloud_print/service/win/service_utils.h ('k') | cloud_print/service/win/setup_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698