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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp

Issue 2143483002: Use the single char overload of append() when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 buildRawString(result, true); 498 buildRawString(result, true);
499 return result.toAtomicString(); 499 return result.toAtomicString();
500 } 500 }
501 501
502 void SecurityOrigin::buildRawString(StringBuilder& builder, bool includeSuborigi n) const 502 void SecurityOrigin::buildRawString(StringBuilder& builder, bool includeSuborigi n) const
503 { 503 {
504 builder.append(m_protocol); 504 builder.append(m_protocol);
505 builder.append("://"); 505 builder.append("://");
506 if (includeSuborigin && hasSuborigin()) { 506 if (includeSuborigin && hasSuborigin()) {
507 builder.append(m_suborigin.name()); 507 builder.append(m_suborigin.name());
508 builder.append("_"); 508 builder.append('_');
509 } 509 }
510 builder.append(m_host); 510 builder.append(m_host);
511 511
512 if (m_port) { 512 if (m_port) {
513 builder.append(':'); 513 builder.append(':');
514 builder.appendNumber(m_port); 514 builder.appendNumber(m_port);
515 } 515 }
516 } 516 }
517 517
518 PassRefPtr<SecurityOrigin> SecurityOrigin::createFromString(const String& origin String) 518 PassRefPtr<SecurityOrigin> SecurityOrigin::createFromString(const String& origin String)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 m_blockLocalAccessFromLocalOrigin = privilegeData->m_blockLocalAccessFromLoc alOrigin; 581 m_blockLocalAccessFromLocalOrigin = privilegeData->m_blockLocalAccessFromLoc alOrigin;
582 } 582 }
583 583
584 void SecurityOrigin::setUniqueOriginIsPotentiallyTrustworthy(bool isUniqueOrigin PotentiallyTrustworthy) 584 void SecurityOrigin::setUniqueOriginIsPotentiallyTrustworthy(bool isUniqueOrigin PotentiallyTrustworthy)
585 { 585 {
586 ASSERT(!isUniqueOriginPotentiallyTrustworthy || isUnique()); 586 ASSERT(!isUniqueOriginPotentiallyTrustworthy || isUnique());
587 m_isUniqueOriginPotentiallyTrustworthy = isUniqueOriginPotentiallyTrustworth y; 587 m_isUniqueOriginPotentiallyTrustworthy = isUniqueOriginPotentiallyTrustworth y;
588 } 588 }
589 589
590 } // namespace blink 590 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698