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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMURLUtils.cpp

Issue 2401523002: Replace ASSERT family with DCHECK and so on in core/dom/. (Closed)
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Motorola Mobility Inc. 3 * Copyright (C) 2012 Motorola Mobility Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 return; 108 return;
109 kurl.setPath(value); 109 kurl.setPath(value);
110 setURL(kurl); 110 setURL(kurl);
111 } 111 }
112 112
113 void DOMURLUtils::setSearch(const String& value) { 113 void DOMURLUtils::setSearch(const String& value) {
114 setSearchInternal(value); 114 setSearchInternal(value);
115 } 115 }
116 116
117 void DOMURLUtils::setSearchInternal(const String& value) { 117 void DOMURLUtils::setSearchInternal(const String& value) {
118 ASSERT(!m_isInUpdate); 118 DCHECK(!m_isInUpdate);
119 KURL kurl = url(); 119 KURL kurl = url();
120 if (!kurl.isValid()) 120 if (!kurl.isValid())
121 return; 121 return;
122 122
123 // FIXME: have KURL do this clearing of the query component 123 // FIXME: have KURL do this clearing of the query component
124 // instead, if practical. Will require addressing 124 // instead, if practical. Will require addressing
125 // http://crbug.com/108690, for one. 125 // http://crbug.com/108690, for one.
126 if (value[0] == '?') 126 if (value[0] == '?')
127 kurl.setQuery(value.length() == 1 ? String() : value.substring(1)); 127 kurl.setQuery(value.length() == 1 ? String() : value.substring(1));
128 else 128 else
(...skipping 12 matching lines...) Expand all
141 if (value[0] == '#') 141 if (value[0] == '#')
142 kurl.setFragmentIdentifier(value.length() == 1 ? String() 142 kurl.setFragmentIdentifier(value.length() == 1 ? String()
143 : value.substring(1)); 143 : value.substring(1));
144 else 144 else
145 kurl.setFragmentIdentifier(value.isEmpty() ? String() : value); 145 kurl.setFragmentIdentifier(value.isEmpty() ? String() : value);
146 146
147 setURL(kurl); 147 setURL(kurl);
148 } 148 }
149 149
150 } // namespace blink 150 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMURL.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698