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

Side by Side Diff: base/process_util_win.cc

Issue 12094073: Use an experiment value to set the instant_extended.enabled pref default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MAD review feedback. Created 7 years, 10 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
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/process_util.h" 5 #include "base/process_util.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <io.h> 8 #include <io.h>
9 #include <windows.h> 9 #include <windows.h>
10 #include <userenv.h> 10 #include <userenv.h>
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 HANDLE process_with_query_rights; 239 HANDLE process_with_query_rights;
240 if (DuplicateHandle(current_process, process, current_process, 240 if (DuplicateHandle(current_process, process, current_process,
241 &process_with_query_rights, PROCESS_QUERY_INFORMATION, 241 &process_with_query_rights, PROCESS_QUERY_INFORMATION,
242 false, 0)) { 242 false, 0)) {
243 DWORD id = GetProcessId(process_with_query_rights); 243 DWORD id = GetProcessId(process_with_query_rights);
244 CloseHandle(process_with_query_rights); 244 CloseHandle(process_with_query_rights);
245 return id; 245 return id;
246 } 246 }
247 247
248 // We're screwed. 248 // We're screwed.
249 NOTREACHED(); 249 //NOTREACHED();
MAD 2013/01/31 20:14:53 Really?
robertshield 2013/01/31 20:24:28 Heh, oops, local patch until Brett reads https://c
250 return 0; 250 return 0;
251 } 251 }
252 252
253 bool GetProcessIntegrityLevel(ProcessHandle process, IntegrityLevel *level) { 253 bool GetProcessIntegrityLevel(ProcessHandle process, IntegrityLevel *level) {
254 if (!level) 254 if (!level)
255 return false; 255 return false;
256 256
257 if (win::GetVersion() < base::win::VERSION_VISTA) 257 if (win::GetVersion() < base::win::VERSION_VISTA)
258 return false; 258 return false;
259 259
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 1006
1007 PERFORMANCE_INFORMATION info; 1007 PERFORMANCE_INFORMATION info;
1008 if (!InternalGetPerformanceInfo(&info, sizeof(info))) { 1008 if (!InternalGetPerformanceInfo(&info, sizeof(info))) {
1009 DLOG(ERROR) << "Failed to fetch internal performance info."; 1009 DLOG(ERROR) << "Failed to fetch internal performance info.";
1010 return 0; 1010 return 0;
1011 } 1011 }
1012 return (info.CommitTotal * system_info.dwPageSize) / 1024; 1012 return (info.CommitTotal * system_info.dwPageSize) / 1024;
1013 } 1013 }
1014 1014
1015 } // namespace base 1015 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_instant_controller.cc » ('j') | chrome/browser/ui/search/search.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698