OLD | NEW |
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 "base/win/metro.h" | 5 #include "base/win/metro.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/win/scoped_comptr.h" | 9 #include "base/win/scoped_comptr.h" |
10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 wchar_t* LocalAllocAndCopyString(const string16& src) { | 69 wchar_t* LocalAllocAndCopyString(const string16& src) { |
70 size_t dest_size = (src.length() + 1) * sizeof(wchar_t); | 70 size_t dest_size = (src.length() + 1) * sizeof(wchar_t); |
71 wchar_t* dest = reinterpret_cast<wchar_t*>(LocalAlloc(LPTR, dest_size)); | 71 wchar_t* dest = reinterpret_cast<wchar_t*>(LocalAlloc(LPTR, dest_size)); |
72 base::wcslcpy(dest, src.c_str(), dest_size); | 72 base::wcslcpy(dest, src.c_str(), dest_size); |
73 return dest; | 73 return dest; |
74 } | 74 } |
75 | 75 |
76 bool IsParentalControlActivityLoggingOn() { | 76 bool IsParentalControlActivityLoggingOn() { |
77 // Query this info on Windows Vista and above. | 77 // Query this info on Windows 7 and above. |
78 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 78 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
79 return false; | 79 return false; |
80 | 80 |
81 static bool parental_control_logging_required = false; | 81 static bool parental_control_logging_required = false; |
82 static bool parental_control_status_determined = false; | 82 static bool parental_control_status_determined = false; |
83 | 83 |
84 if (parental_control_status_determined) | 84 if (parental_control_status_determined) |
85 return parental_control_logging_required; | 85 return parental_control_logging_required; |
86 | 86 |
87 parental_control_status_determined = true; | 87 parental_control_status_determined = true; |
88 | 88 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 reinterpret_cast<GetInitialSearchString>( | 136 reinterpret_cast<GetInitialSearchString>( |
137 ::GetProcAddress(metro, "GetInitialSearchString")); | 137 ::GetProcAddress(metro, "GetInitialSearchString")); |
138 DCHECK(initial_search_string); | 138 DCHECK(initial_search_string); |
139 *params = initial_search_string(); | 139 *params = initial_search_string(); |
140 } | 140 } |
141 return launch_type; | 141 return launch_type; |
142 } | 142 } |
143 | 143 |
144 } // namespace win | 144 } // namespace win |
145 } // namespace base | 145 } // namespace base |
OLD | NEW |