Skip to content

Commit

Permalink
Fix typo.
Browse files Browse the repository at this point in the history
s/canoncial/canonical/ in variable names and comments.  No functional change.

TBR=brettw
BUG=

Review URL: https://codereview.chromium.org/685463002

Cr-Commit-Position: refs/heads/master@{#301857}
  • Loading branch information
bnc authored and Commit bot committed Oct 29, 2014
1 parent 8ab49ba commit 9d5d141
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion device/bluetooth/bluetooth_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class BluetoothDevice {
virtual BluetoothGattService* GetGattService(
const std::string& identifier) const;

// Returns the |address| in the canoncial format: XX:XX:XX:XX:XX:XX, where
// Returns the |address| in the canonical format: XX:XX:XX:XX:XX:XX, where
// each 'X' is a hex digit. If the input |address| is invalid, returns an
// empty string.
static std::string CanonicalizeAddress(const std::string& address);
Expand Down
2 changes: 1 addition & 1 deletion google_apis/gaia/gaia_auth_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ std::string CanonicalizeDomain(const std::string& domain);
std::string SanitizeEmail(const std::string& email_address);

// Returns true if the two specified email addresses are the same. Both
// addresses are first sanitized and then canoncialized before comparing.
// addresses are first sanitized and then canonicalized before comparing.
bool AreEmailsSame(const std::string& email1, const std::string& email2);

// Extract the domain part from the canonical form of the given email.
Expand Down
30 changes: 15 additions & 15 deletions net/http/http_server_properties_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ HttpServerPropertiesImpl::HttpServerPropertiesImpl()
spdy_settings_map_(SpdySettingsMap::NO_AUTO_EVICT),
alternate_protocol_probability_threshold_(1),
weak_ptr_factory_(this) {
canoncial_suffixes_.push_back(".c.youtube.com");
canoncial_suffixes_.push_back(".googlevideo.com");
canoncial_suffixes_.push_back(".googleusercontent.com");
canonical_suffixes_.push_back(".c.youtube.com");
canonical_suffixes_.push_back(".googlevideo.com");
canonical_suffixes_.push_back(".googleusercontent.com");
}

HttpServerPropertiesImpl::~HttpServerPropertiesImpl() {
Expand Down Expand Up @@ -69,8 +69,8 @@ void HttpServerPropertiesImpl::InitializeAlternateProtocolServers(

// Attempt to find canonical servers.
int canonical_ports[] = { 80, 443 };
for (size_t i = 0; i < canoncial_suffixes_.size(); ++i) {
std::string canonical_suffix = canoncial_suffixes_[i];
for (size_t i = 0; i < canonical_suffixes_.size(); ++i) {
std::string canonical_suffix = canonical_suffixes_[i];
for (size_t j = 0; j < arraysize(canonical_ports); ++j) {
HostPortPair canonical_host(canonical_suffix, canonical_ports[j]);
// If we already have a valid canonical server, we're done.
Expand All @@ -84,7 +84,7 @@ void HttpServerPropertiesImpl::InitializeAlternateProtocolServers(
for (AlternateProtocolMap::const_iterator it =
alternate_protocol_map_.begin();
it != alternate_protocol_map_.end(); ++it) {
if (EndsWith(it->first.host(), canoncial_suffixes_[i], false)) {
if (EndsWith(it->first.host(), canonical_suffixes_[i], false)) {
canonical_host_to_origin_map_[canonical_host] = it->first;
break;
}
Expand Down Expand Up @@ -217,9 +217,9 @@ std::string HttpServerPropertiesImpl::GetCanonicalSuffix(
const HostPortPair& server) {
// If this host ends with a canonical suffix, then return the canonical
// suffix.
for (size_t i = 0; i < canoncial_suffixes_.size(); ++i) {
std::string canonical_suffix = canoncial_suffixes_[i];
if (EndsWith(server.host(), canoncial_suffixes_[i], false)) {
for (size_t i = 0; i < canonical_suffixes_.size(); ++i) {
std::string canonical_suffix = canonical_suffixes_[i];
if (EndsWith(server.host(), canonical_suffixes_[i], false)) {
return canonical_suffix;
}
}
Expand Down Expand Up @@ -293,9 +293,9 @@ void HttpServerPropertiesImpl::SetAlternateProtocol(

// If this host ends with a canonical suffix, then set it as the
// canonical host.
for (size_t i = 0; i < canoncial_suffixes_.size(); ++i) {
std::string canonical_suffix = canoncial_suffixes_[i];
if (EndsWith(server.host(), canoncial_suffixes_[i], false)) {
for (size_t i = 0; i < canonical_suffixes_.size(); ++i) {
std::string canonical_suffix = canonical_suffixes_[i];
if (EndsWith(server.host(), canonical_suffixes_[i], false)) {
HostPortPair canonical_host(canonical_suffix, server.port());
canonical_host_to_origin_map_[canonical_host] = server;
break;
Expand Down Expand Up @@ -452,9 +452,9 @@ void HttpServerPropertiesImpl::SetAlternateProtocolProbabilityThreshold(

HttpServerPropertiesImpl::CanonicalHostMap::const_iterator
HttpServerPropertiesImpl::GetCanonicalHost(HostPortPair server) const {
for (size_t i = 0; i < canoncial_suffixes_.size(); ++i) {
std::string canonical_suffix = canoncial_suffixes_[i];
if (EndsWith(server.host(), canoncial_suffixes_[i], false)) {
for (size_t i = 0; i < canonical_suffixes_.size(); ++i) {
std::string canonical_suffix = canonical_suffixes_[i];
if (EndsWith(server.host(), canonical_suffixes_[i], false)) {
HostPortPair canonical_host(canonical_suffix, server.port());
return canonical_host_to_origin_map_.find(canonical_host);
}
Expand Down
4 changes: 2 additions & 2 deletions net/http/http_server_properties_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ class NET_EXPORT HttpServerPropertiesImpl
// actual origin, which has a plausible alternate protocol mapping.
CanonicalHostMap canonical_host_to_origin_map_;
// Contains list of suffixes (for exmaple ".c.youtube.com",
// ".googlevideo.com", ".googleusercontent.com") of canoncial hostnames.
CanonicalSufficList canoncial_suffixes_;
// ".googlevideo.com", ".googleusercontent.com") of canonical hostnames.
CanonicalSufficList canonical_suffixes_;

double alternate_protocol_probability_threshold_;

Expand Down
10 changes: 5 additions & 5 deletions net/quic/crypto/quic_crypto_client_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ void QuicCryptoClientConfig::InitializeFrom(
}

void QuicCryptoClientConfig::AddCanonicalSuffix(const string& suffix) {
canoncial_suffixes_.push_back(suffix);
canonical_suffixes_.push_back(suffix);
}

void QuicCryptoClientConfig::PreferAesGcm() {
Expand All @@ -834,15 +834,15 @@ void QuicCryptoClientConfig::PopulateFromCanonicalConfig(
CachedState* server_state) {
DCHECK(server_state->IsEmpty());
size_t i = 0;
for (; i < canoncial_suffixes_.size(); ++i) {
if (EndsWith(server_id.host(), canoncial_suffixes_[i], false)) {
for (; i < canonical_suffixes_.size(); ++i) {
if (EndsWith(server_id.host(), canonical_suffixes_[i], false)) {
break;
}
}
if (i == canoncial_suffixes_.size())
if (i == canonical_suffixes_.size())
return;

QuicServerId suffix_server_id(canoncial_suffixes_[i], server_id.port(),
QuicServerId suffix_server_id(canonical_suffixes_[i], server_id.port(),
server_id.is_https(),
server_id.privacy_mode());
if (!ContainsKey(canonical_server_map_, suffix_server_id)) {
Expand Down
6 changes: 3 additions & 3 deletions net/quic/crypto/quic_crypto_client_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
CachedState* cached,
std::string* error_details);

// If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|,
// If the suffix of the hostname in |server_id| is in |canonical_suffixes_|,
// then populate |cached| with the canonical cached state from
// |canonical_server_map_| for that suffix.
void PopulateFromCanonicalConfig(const QuicServerId& server_id,
Expand All @@ -297,8 +297,8 @@ class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
std::map<QuicServerId, QuicServerId> canonical_server_map_;

// Contains list of suffixes (for exmaple ".c.youtube.com",
// ".googlevideo.com") of canoncial hostnames.
std::vector<std::string> canoncial_suffixes_;
// ".googlevideo.com") of canonical hostnames.
std::vector<std::string> canonical_suffixes_;

scoped_ptr<ProofVerifier> proof_verifier_;
scoped_ptr<ChannelIDSource> channel_id_source_;
Expand Down
2 changes: 1 addition & 1 deletion url/url_util_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ TEST(URLUtilTest, TestResolveRelativeWithNonStandardBase) {
// URL doesn't alter the authority section.
{"scheme://Authority/", "../path", true, "scheme://Authority/path"},
// A non-standard hierarchical base is resolved with path URL
// canoncialization rules.
// canonicalization rules.
{"data:/Blah:Blah/", "file.html", true, "data:/Blah:Blah/file.html"},
{"data:/Path/../part/part2", "file.html", true,
"data:/Path/../part/file.html"},
Expand Down

0 comments on commit 9d5d141

Please sign in to comment.