Skip to content

Commit

Permalink
Remove unnecessary Starboardizations from /url
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidokert committed Dec 18, 2023
1 parent cec32f1 commit cae1766
Show file tree
Hide file tree
Showing 24 changed files with 31 additions and 51 deletions.
3 changes: 2 additions & 1 deletion url/gurl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "url/gurl.h"

#include <stddef.h>

#include <algorithm>
#include <ostream>

Expand All @@ -12,7 +14,6 @@
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "starboard/types.h"
#include "url/url_canon_stdstring.h"
#include "url/url_util.h"

Expand Down
3 changes: 2 additions & 1 deletion url/gurl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
#ifndef URL_GURL_H_
#define URL_GURL_H_

#include <stddef.h>

#include <iosfwd>
#include <memory>
#include <string>

#include "base/debug/alias.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "starboard/types.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_canon.h"
#include "url/url_canon_stdstring.h"
Expand Down
4 changes: 2 additions & 2 deletions url/gurl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>

#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "starboard/common/string.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/url_canon.h"
Expand Down
2 changes: 1 addition & 1 deletion url/origin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

#include "url/origin.h"

#include <stdint.h>
#include <string.h>

#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "starboard/types.h"
#include "url/gurl.h"
#include "url/url_canon.h"
#include "url/url_canon_stdstring.h"
Expand Down
3 changes: 2 additions & 1 deletion url/origin.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef URL_ORIGIN_H_
#define URL_ORIGIN_H_

#include <stdint.h>

#include <string>

#include "base/debug/alias.h"
Expand All @@ -13,7 +15,6 @@
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/unguessable_token.h"
#include "starboard/types.h"
#include "url/scheme_host_port.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_canon.h"
Expand Down
4 changes: 3 additions & 1 deletion url/origin_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>
#include <stdint.h>

#include "base/logging.h"
#include "base/macros.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
Expand Down
2 changes: 1 addition & 1 deletion url/scheme_host_port.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

#include "url/scheme_host_port.h"

#include <stdint.h>
#include <string.h>

#include <tuple>

#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "starboard/types.h"
#include "url/gurl.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_canon.h"
Expand Down
9 changes: 2 additions & 7 deletions url/scheme_host_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
#ifndef URL_SCHEME_HOST_PORT_H_
#define URL_SCHEME_HOST_PORT_H_

#include <stdint.h>

#include <string>

#include "base/strings/string_piece.h"
#include "starboard/types.h"
#include "url/url_export.h"

class GURL;
Expand Down Expand Up @@ -112,12 +113,6 @@ class URL_EXPORT SchemeHostPort {
SchemeHostPort& operator=(const SchemeHostPort&) = default;
SchemeHostPort(SchemeHostPort&&) = default;
SchemeHostPort& operator=(SchemeHostPort&&) = default;
#if defined(STARBOARD)
// Cobalt's compiler can not generate operator== by default yet.
bool operator==(const SchemeHostPort& rhs) const {
return scheme_ == rhs.scheme_ && host_ == rhs.host_ && port_ == rhs.port_;
}
#endif

~SchemeHostPort();

Expand Down
4 changes: 3 additions & 1 deletion url/scheme_host_port_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>
#include <stdint.h>

#include "base/macros.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/scheme_host_port.h"
Expand Down
2 changes: 0 additions & 2 deletions url/third_party/mozilla/url_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include <stdlib.h>

#include "base/logging.h"
#include "starboard/common/string.h"
#include "starboard/types.h"
#include "url/url_parse_internal.h"
#include "url/url_util.h"
#include "url/url_util_internal.h"
Expand Down
2 changes: 0 additions & 2 deletions url/url_canon.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#include "base/export_template.h"
#include "base/strings/string16.h"
#include "starboard/memory.h"
#include "starboard/types.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_export.h"

Expand Down
1 change: 0 additions & 1 deletion url/url_canon_etc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <string.h>

#include "starboard/types.h"
#include "url/url_canon.h"
#include "url/url_canon_internal.h"

Expand Down
3 changes: 1 addition & 2 deletions url/url_canon_icu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

// ICU-based character set converter.

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "base/logging.h"
#include "starboard/common/string.h"
#include "starboard/types.h"
#include "third_party/icu/source/common/unicode/ucnv.h"
#include "third_party/icu/source/common/unicode/ucnv_cb.h"
#include "third_party/icu/source/common/unicode/utypes.h"
Expand Down
4 changes: 2 additions & 2 deletions url/url_canon_icu_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>

#include "base/macros.h"
#include "starboard/common/string.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/icu/source/common/unicode/ucnv.h"
#include "url/url_canon.h"
Expand Down
6 changes: 1 addition & 5 deletions url/url_canon_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
// template bloat because everything is inlined when anybody calls any of our
// functions.

#if defined(STARBOARD)
#include "starboard/common/string.h"
#else
#include <stddef.h>
#include <stdlib.h>
#endif

#include "base/logging.h"
#include "starboard/types.h"
#include "url/url_canon.h"

namespace url {
Expand Down
3 changes: 1 addition & 2 deletions url/url_canon_ip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

#include "url/url_canon_ip.h"

#include <stdint.h>
#include <stdlib.h>
#include <limits>

#include "base/logging.h"
#include "starboard/common/string.h"
#include "starboard/types.h"
#include "url/url_canon_internal.h"

namespace url {
Expand Down
1 change: 0 additions & 1 deletion url/url_canon_path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <limits.h>

#include "base/logging.h"
#include "starboard/types.h"
#include "url/url_canon.h"
#include "url/url_canon_internal.h"
#include "url/url_parse_internal.h"
Expand Down
4 changes: 1 addition & 3 deletions url/url_canon_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
// found in the LICENSE file.

#include <errno.h>
#include <stddef.h>

#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "starboard/common/string.h"
#include "starboard/memory.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_canon.h"
Expand Down
2 changes: 1 addition & 1 deletion url/url_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef URL_URL_CONSTANTS_H_
#define URL_URL_CONSTANTS_H_

#include "starboard/types.h"
#include <stddef.h>

#include "url/url_export.h"

Expand Down
2 changes: 1 addition & 1 deletion url/url_idna_icu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

// ICU-based IDNA converter.

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "base/lazy_instance.h"
#include "base/logging.h"
#include "starboard/types.h"
#include "third_party/icu/source/common/unicode/uidna.h"
#include "third_party/icu/source/common/unicode/utypes.h"
#include "url/url_canon_icu.h"
Expand Down
1 change: 0 additions & 1 deletion url/url_idna_icu_alternatives_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "jni/IDNStringUtil_jni.h"
#include "starboard/types.h"
#include "url/url_canon_internal.h"

using base::android::ScopedJavaLocalRef;
Expand Down
8 changes: 2 additions & 6 deletions url/url_parse_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@

#include "url/third_party/mozilla/url_parse.h"

#include <stddef.h>

#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/third_party/mozilla/url_parse.h"

#if defined(STARBOARD)
#include "starboard/client_porting/poem/string_poem.h"
#include "starboard/common/string.h"
#include "starboard/types.h"
#endif

// Interesting IE file:isms...
//
// file:/foo/bar file:///foo/bar
Expand Down
5 changes: 1 addition & 4 deletions url/url_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

#include "url/url_util.h"

#include <stddef.h>
#include <string.h>

#include "base/debug/leak_annotations.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "starboard/common/string.h"
#include "starboard/configuration.h"
#include "starboard/memory.h"
#include "starboard/types.h"
#include "url/url_canon_internal.h"
#include "url/url_constants.h"
#include "url/url_file.h"
Expand Down
4 changes: 2 additions & 2 deletions url/url_util_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>

#include "base/macros.h"
#include "starboard/common/string.h"
#include "starboard/types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_canon.h"
Expand Down

0 comments on commit cae1766

Please sign in to comment.