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

Side by Side Diff: chrome/installer/util/shell_util.cc

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 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
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/renderer/extensions/chrome_v8_context.cc » ('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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 } 1140 }
1141 1141
1142 // A helper function that probes default protocol handler registration (in a 1142 // A helper function that probes default protocol handler registration (in a
1143 // manner appropriate for the current version of Windows) to determine if 1143 // manner appropriate for the current version of Windows) to determine if
1144 // Chrome is the default handler for |protocols|. Returns IS_DEFAULT 1144 // Chrome is the default handler for |protocols|. Returns IS_DEFAULT
1145 // only if Chrome is the default for all specified protocols. 1145 // only if Chrome is the default for all specified protocols.
1146 ShellUtil::DefaultState ProbeProtocolHandlers( 1146 ShellUtil::DefaultState ProbeProtocolHandlers(
1147 const base::FilePath& chrome_exe, 1147 const base::FilePath& chrome_exe,
1148 const wchar_t* const* protocols, 1148 const wchar_t* const* protocols,
1149 size_t num_protocols) { 1149 size_t num_protocols) {
1150 #if DCHECK_IS_ON
1150 DCHECK(!num_protocols || protocols); 1151 DCHECK(!num_protocols || protocols);
1151 if (DCHECK_IS_ON()) { 1152 for (size_t i = 0; i < num_protocols; ++i)
1152 for (size_t i = 0; i < num_protocols; ++i) 1153 DCHECK(protocols[i] && *protocols[i]);
1153 DCHECK(protocols[i] && *protocols[i]); 1154 #endif
1154 }
1155 1155
1156 const base::win::Version windows_version = base::win::GetVersion(); 1156 const base::win::Version windows_version = base::win::GetVersion();
1157 1157
1158 if (windows_version >= base::win::VERSION_WIN8) 1158 if (windows_version >= base::win::VERSION_WIN8)
1159 return ProbeCurrentDefaultHandlers(chrome_exe, protocols, num_protocols); 1159 return ProbeCurrentDefaultHandlers(chrome_exe, protocols, num_protocols);
1160 else if (windows_version >= base::win::VERSION_VISTA) 1160 else if (windows_version >= base::win::VERSION_VISTA)
1161 return ProbeAppIsDefaultHandlers(chrome_exe, protocols, num_protocols); 1161 return ProbeAppIsDefaultHandlers(chrome_exe, protocols, num_protocols);
1162 1162
1163 return ProbeOpenCommandHandlers(chrome_exe, protocols, num_protocols); 1163 return ProbeOpenCommandHandlers(chrome_exe, protocols, num_protocols);
1164 } 1164 }
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 // are any left...). 2264 // are any left...).
2265 if (free_bits >= 8 && next_byte_index < size) { 2265 if (free_bits >= 8 && next_byte_index < size) {
2266 free_bits -= 8; 2266 free_bits -= 8;
2267 bit_stream += bytes[next_byte_index++] << free_bits; 2267 bit_stream += bytes[next_byte_index++] << free_bits;
2268 } 2268 }
2269 } 2269 }
2270 2270
2271 DCHECK_EQ(ret.length(), encoded_length); 2271 DCHECK_EQ(ret.length(), encoded_length);
2272 return ret; 2272 return ret;
2273 } 2273 }
OLDNEW
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/renderer/extensions/chrome_v8_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698