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

Side by Side Diff: services/preferences/tracked/device_id_win.cc

Issue 2782803002: Move tracked prefs into services/preferences/tracked. (Closed)
Patch Set: rebase Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/user_prefs/tracked/device_id.h" 5 #include "services/preferences/tracked/device_id.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8
8 #include <sddl.h> // For ConvertSidToStringSidA. 9 #include <sddl.h> // For ConvertSidToStringSidA.
9 10
10 #include <memory> 11 #include <memory>
11 12
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 15
15 MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) { 16 MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) {
16 DCHECK(machine_id); 17 DCHECK(machine_id);
17 18
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 64
64 char* sid_string = nullptr; 65 char* sid_string = nullptr;
65 if (!::ConvertSidToStringSidA(sid, &sid_string)) 66 if (!::ConvertSidToStringSidA(sid, &sid_string))
66 return MachineIdStatus::FAILURE; 67 return MachineIdStatus::FAILURE;
67 68
68 *machine_id = sid_string; 69 *machine_id = sid_string;
69 ::LocalFree(sid_string); 70 ::LocalFree(sid_string);
70 71
71 return MachineIdStatus::SUCCESS; 72 return MachineIdStatus::SUCCESS;
72 } 73 }
OLDNEW
« no previous file with comments | « services/preferences/tracked/device_id_unittest.cc ('k') | services/preferences/tracked/dictionary_hash_store_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698