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

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

Issue 21165: Revert the merge. Mac build is mysteriously broken. (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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 int port = databaseIdentifier.right(databaseIdentifier.length() - separator2 - 1).toInt(&portOkay); 262 int port = databaseIdentifier.right(databaseIdentifier.length() - separator2 - 1).toInt(&portOkay);
263 if (!portOkay && separator2 + 1 == static_cast<int>(databaseIdentifier.lengt h())) 263 if (!portOkay && separator2 + 1 == static_cast<int>(databaseIdentifier.lengt h()))
264 return create(KURL()); 264 return create(KURL());
265 265
266 if (port < 0 || port > 65535) 266 if (port < 0 || port > 65535)
267 return create(KURL()); 267 return create(KURL());
268 268
269 // Split out the 3 sections of data 269 // Split out the 3 sections of data
270 String protocol = databaseIdentifier.substring(0, separator1); 270 String protocol = databaseIdentifier.substring(0, separator1);
271 String host = databaseIdentifier.substring(separator1 + 1, separator2 - sepa rator1 - 1); 271 String host = databaseIdentifier.substring(separator1 + 1, separator2 - sepa rator1 - 1);
272 return create(KURL(KURL(), protocol + "://" + host + ":" + String::number(po rt))); 272 return create(KURL(protocol + "://" + host + ":" + String::number(port)));
273 } 273 }
274 274
275 String SecurityOrigin::databaseIdentifier() const 275 String SecurityOrigin::databaseIdentifier() const
276 { 276 {
277 DEFINE_STATIC_LOCAL(String, separatorString, (&SeparatorCharacter, 1)); 277 DEFINE_STATIC_LOCAL(String, separatorString, (&SeparatorCharacter, 1));
278 return m_protocol + separatorString + m_host + separatorString + String::num ber(m_port); 278 return m_protocol + separatorString + m_host + separatorString + String::num ber(m_port);
279 } 279 }
280 280
281 bool SecurityOrigin::equal(const SecurityOrigin* other) const 281 bool SecurityOrigin::equal(const SecurityOrigin* other) const
282 { 282 {
(...skipping 18 matching lines...) Expand all
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/Page.cpp ('k') | third_party/WebKit/WebCore/page/animation/AnimationBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698