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

Side by Side Diff: third_party/WebKit/WebCore/page/SecurityOrigin.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (isEmpty()) 214 if (isEmpty())
215 return "null"; 215 return "null";
216 216
217 if (m_noAccess) 217 if (m_noAccess)
218 return "null"; 218 return "null";
219 219
220 if (m_protocol == "file") 220 if (m_protocol == "file")
221 return String("file://"); 221 return String("file://");
222 222
223 Vector<UChar> result; 223 Vector<UChar> result;
224 result.reserveCapacity(m_protocol.length() + m_host.length() + 10); 224 result.reserveInitialCapacity(m_protocol.length() + m_host.length() + 10);
225 append(result, m_protocol); 225 append(result, m_protocol);
226 append(result, "://"); 226 append(result, "://");
227 append(result, m_host); 227 append(result, m_host);
228 228
229 if (m_port) { 229 if (m_port) {
230 append(result, ":"); 230 append(result, ":");
231 append(result, String::number(m_port)); 231 append(result, String::number(m_port));
232 } 232 }
233 233
234 return String::adopt(result); 234 return String::adopt(result);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return false; 301 return false;
302 302
303 if (m_port != other->m_port) 303 if (m_port != other->m_port)
304 return false; 304 return false;
305 305
306 return true; 306 return true;
307 } 307 }
308 308
309 } // namespace WebCore 309 } // namespace WebCore
310 310
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/page/DragController.cpp ('k') | third_party/WebKit/WebCore/page/mac/AccessibilityObjectWrapper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698