• Takeshi Yoshino's avatar
    Change the port argument of SecurityOrigin::Create() methods to be uint16_t · e0ec8039
    Takeshi Yoshino authored
    The automatic fallback to a unique origin in SecurityOrigin::Create() is
    error prone. A unique origin should be created explicitly. In the first
    place, it never gets such invalid values. To clarify that, change the
    type of the port argument to uint16_t.
    
    In SchemeHostPort, add DCHECKs to clarify that the results of
    GURL::EffectiveIntPort() can never be outside of the uint16_t range.
    
    One of the users of the methods, the CreateFromTupleWithSuborigin()
    method is no longer used by anyone. So, just remove it.
    
    Bug: 788289
    Change-Id: Ib0abd718d5553f6b3b06388c4f5c684033202500
    Reviewed-on: https://chromium-review.googlesource.com/796172
    Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org>
    Reviewed-by: default avatarMike West <mkwst@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#523742}
    e0ec8039
WebSecurityOrigin.h 5.23 KB