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

Side by Side Diff: base/win/metro.cc

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « base/metrics/field_trial_unittest.cc ('k') | build/all.gyp » ('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 "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
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
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
OLDNEW
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | build/all.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698