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

Side by Side Diff: components/user_prefs/tracked/device_id_win.cc

Issue 1227973003: Componentize //chrome/browser/prefs/tracked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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 "chrome/browser/prefs/tracked/device_id.h" 5 #include "components/user_prefs/tracked/device_id.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <sddl.h> // For ConvertSidToStringSidA. 8 #include <sddl.h> // For ConvertSidToStringSidA.
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) { 14 MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) {
15 DCHECK(machine_id); 15 DCHECK(machine_id);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 char* sid_string = nullptr; 63 char* sid_string = nullptr;
64 if (!::ConvertSidToStringSidA(sid, &sid_string)) 64 if (!::ConvertSidToStringSidA(sid, &sid_string))
65 return MachineIdStatus::FAILURE; 65 return MachineIdStatus::FAILURE;
66 66
67 *machine_id = sid_string; 67 *machine_id = sid_string;
68 ::LocalFree(sid_string); 68 ::LocalFree(sid_string);
69 69
70 return MachineIdStatus::SUCCESS; 70 return MachineIdStatus::SUCCESS;
71 } 71 }
OLDNEW
« no previous file with comments | « components/user_prefs/tracked/device_id_unittest.cc ('k') | components/user_prefs/tracked/dictionary_hash_store_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698