Skip to content

Commit

Permalink
ios: Fix common misspellings
Browse files Browse the repository at this point in the history
Bug: 750830
Change-Id: I111573a408d251fc0042fa7a7b4d253b8129409c
Reviewed-on: https://chromium-review.googlesource.com/594989
Reviewed-by: Ed Chin <edchin@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
Commit-Queue: Julien Brianceau <jbriance@cisco.com>
Cr-Commit-Position: refs/heads/master@{#491038}
  • Loading branch information
jbrianceau authored and Commit Bot committed Aug 1, 2017
1 parent e40927a commit b7e590a
Show file tree
Hide file tree
Showing 101 changed files with 151 additions and 150 deletions.
2 changes: 1 addition & 1 deletion ios/build/tools/setup-gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def WriteToFileIfChanged(filename, content, overwrite):


def NinjaNeedEscape(arg):
'''Returns True if |arg| need to be escaped when writen to .ninja file.'''
'''Returns True if |arg| needs to be escaped when written to .ninja file.'''
return ':' in arg or '*' in arg or ';' in arg


Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/app/startup/register_experimental_settings.mm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ + (NSArray*)registerExperimentalSettingsForFile:(NSString*)filepath
NSArray* preferencesArray =
[rootDictionary objectForKey:@"PreferenceSpecifiers"];

// Scan thru all the preferences in the plist file.
// Scan through all the preferences in the plist file.
for (NSDictionary* preferenceSpecifier in preferencesArray) {
NSString* keyValue = [preferenceSpecifier objectForKey:@"Key"];
if (!keyValue)
Expand Down
4 changes: 2 additions & 2 deletions ios/chrome/app/strings/ios_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -1218,10 +1218,10 @@ Handoff must also be enabled in the General section of Settings, and your device
<message name="IDS_IOS_SHOW_PASSWORD_VIEW_PASSWORD" desc="Label indicating that the text displayed below is a password. [Length: 20em] [iOS only]">
Password
</message>
<message name="IDS_IOS_SHOW_PASSWORD_VIEW_SITE" desc="Label indicating that the text displayed below is the site on which the associated password was saved. The password is displayed in the same view, but under a diferent label. [Length: 20em] [iOS only]">
<message name="IDS_IOS_SHOW_PASSWORD_VIEW_SITE" desc="Label indicating that the text displayed below is the site on which the associated password was saved. The password is displayed in the same view, but under a different label. [Length: 20em] [iOS only]">
Site
</message>
<message name="IDS_IOS_SHOW_PASSWORD_VIEW_USERNAME" desc="Label indicating that the text displayed below is the username to which a saved password corresponds. The password is displayed in the same view, but under a diferent label. [Length: 20em] [iOS only]">
<message name="IDS_IOS_SHOW_PASSWORD_VIEW_USERNAME" desc="Label indicating that the text displayed below is the username to which a saved password corresponds. The password is displayed in the same view, but under a different label. [Length: 20em] [iOS only]">
Username
</message>
<message name="IDS_IOS_SHOW_PASSWORD_VIEW_FEDERATION" desc="Label indicating that the text displayed below is the hostname of the identity provider used for the displayed credential. [Length: to fit on one line] [iOS only]">
Expand Down
6 changes: 3 additions & 3 deletions ios/chrome/browser/autofill/autofill_controller_unittest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void CheckField(const FormStructure& form,
FAIL() << "Missing field " << name;
}

// WebDataServiceConsumer for receving vectors of strings and making them
// WebDataServiceConsumer for receiving vectors of strings and making them
// available to tests.
class TestConsumer : public WebDataServiceConsumer {
public:
Expand Down Expand Up @@ -497,8 +497,8 @@ void OnWebDataServiceRequestDone(
};

// Checks that typing events (simulated in script) result in suggestions. Note
// that the field is not explictly focused before typing starts; this can happen
// in practice and should not result in a crash or incorrect behavior.
// that the field is not explicitly focused before typing starts; this can
// happen in practice and should not result in a crash or incorrect behavior.
TEST_F(AutofillControllerTest, KeyValueTypedSuggestions) {
SetUpKeyValueData();
ExecuteJavaScript(@"document.forms[0].greeting.select()");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ChromeBrowserStateIOData {
static bool IsHandledProtocol(const std::string& scheme);

// Utility to install additional WebUI handlers into the |job_factory|.
// Ownership of the handlers is transfered from |protocol_handlers|
// Ownership of the handlers is transferred from |protocol_handlers|
// to the |job_factory|.
static void InstallProtocolHandlers(
net::URLRequestJobFactoryImpl* job_factory,
Expand Down Expand Up @@ -169,7 +169,7 @@ class ChromeBrowserStateIOData {
std::unique_ptr<net::ProxyConfigService> proxy_config_service;

// The browser state this struct was populated from. It's passed as a void*
// to ensure it's not accidently used on the IO thread.
// to ensure it's not accidentally used on the IO thread.
void* browser_state;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void NotReachedErrorCallback(WebDataServiceWrapper::ErrorType,
base::FilePath system_tmp_dir;
bool success = PathService::Get(base::DIR_TEMP, &system_tmp_dir);

// We're severly screwed if we can't get the system temporary
// We're severely screwed if we can't get the system temporary
// directory. Die now to avoid writing to the filesystem root
// or other bad places.
CHECK(success);
Expand Down
10 changes: 5 additions & 5 deletions ios/chrome/browser/find_in_page/find_in_page_js_unittest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
NSString* kJavaScriptIndex = @"__gCrWeb.findInPage.index";
NSString* kJavaScriptSpansLength = @"__gCrWeb.findInPage.spans.length";

// HTML that contains several occurences of the string 'foo', some visible and
// HTML that contains several occurrences of the string 'foo', some visible and
// some not visible (the first 'foo' is hidden, the next is visible, the next is
// hidden and so on until the final 'foo' which is hidden.
NSString* kHtmlWithFoos = @"<html><body>"
Expand All @@ -53,7 +53,7 @@
// The number of times 'foo' occurs in |kHtmlWithFoos| (hidden and visible).
const int kNumberOfFoosInHtml = 7;

// HTML that contains several occurences of the string 'foo', none visible.
// HTML that contains several occurrences of the string 'foo', none visible.
NSString* kHtmlWithNoVisibleFoos = @"<html><body>"
" <span style='display:none'>foo</span>"
" <span style='display:none'>foo</span>"
Expand Down Expand Up @@ -87,7 +87,7 @@ void AssertJavaScriptValue(NSString* script, int expected_value) {

// Loads the test HTML containing 'foo' strings and invokes the JavaScript
// necessary to search for and highlight any matches. Note that the JavaScript
// sets the current index to the first visible occurence of 'foo'.
// sets the current index to the first visible occurrence of 'foo'.
void SearchForFoo() {
LoadHtml(kHtmlWithFoos);

Expand All @@ -96,7 +96,7 @@ void SearchForFoo() {
AssertJavaScriptValue(kJavaScriptSpansLength, 0);

// Search for 'foo'. Performing the search sets the index to point to the
// first visible occurence of 'foo'.
// first visible occurrence of 'foo'.
ExecuteJavaScript(kJavaScriptToSearchForFoo);
AssertJavaScriptValue(kJavaScriptIndex, 1);
AssertJavaScriptValue(kJavaScriptSpansLength, kNumberOfFoosInHtml);
Expand Down Expand Up @@ -217,7 +217,7 @@ void SetUp() override {
AssertJavaScriptValue(kJavaScriptSpansLength, 0);

// Search for the non-Ascii value. Performing the search sets the index to
// point to the first visible occurence of the non-Ascii.
// point to the first visible occurrence of the non-Ascii.
NSString* result = ExecuteJavaScript([NSString
stringWithFormat:@"__gCrWeb.findInPage.highlightWord('%@', false, 1000)",
kNonAscii]);
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/find_in_page/js_findinpage_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern FindInPageEntry FindInPageEntryZero;
completionHandler:(void (^)(BOOL, CGPoint))completionHandler;

// Searches for more matches. Calls |completionHandler| with a success BOOL and
// scroll position if pumping was successful. If the pumping was unsuccessfull
// scroll position if pumping was successful. If the pumping was unsuccessful
// another pumping call maybe required. |completionHandler| cannot be nil.
- (void)pumpWithCompletionHandler:(void (^)(BOOL, CGPoint))completionHandler;

Expand Down
4 changes: 2 additions & 2 deletions ios/chrome/browser/memory/memory_debugger.mm
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ @implementation MemoryDebugger {
UITextField* _refreshField;
UITextField* _continuousMemoryWarningField;

// A place to store the artifical memory bloat.
// A place to store the artificial memory bloat.
std::unique_ptr<uint8_t> _bloat;

// Distance the view was pushed up to accomodate the keyboard.
// Distance the view was pushed up to accommodate the keyboard.
CGFloat _keyboardOffset;

// The current orientation of the device.
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ - (void)testPageLoadCountBeforeEvictedTab {
}

// Evict the tab. Create a dummy tab so that switching back to normal mode
// does not trigger a reload immediatly.
// does not trigger a reload immediately.
chrome_test_util::OpenNewTab();
OpenNewIncognitoTabUsingUIAndEvictMainTabs();
[ChromeEarlGrey waitForIncognitoTabCount:1];
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/net/cookie_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct CookieStoreConfig {
net::CookieCryptoDelegate* crypto_delegate;
};

// Creates a cookie store wich is internally either a CookieMonster or a
// Creates a cookie store which is internally either a CookieMonster or a
// CookieStoreIOS.
std::unique_ptr<net::CookieStore> CreateCookieStore(
const CookieStoreConfig& config);
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/omaha/omaha_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class OmahaService : public net::URLFetcherDelegate {
void SetInstallRetryRequestId(const std::string& request_id);

// Clears the stored request id for a installation/update ping retry. Must be
// called after a successfull installation/update ping.
// called after a successful installation/update ping.
void ClearInstallRetryRequestId();

// Clears the all persistent state. Should only be used for testing.
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/payments/ios_payment_instrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace payments {

// A map is maintained to enumerate scheme names corresponding with iOS
// payment apps. These scheme names are needed as a form of installation
// check. If canOpenURL of UIApplication suceeds on the scheme name then
// check. If canOpenURL of UIApplication succeeds on the scheme name then
// that's a guarantee that the app is installed on the user's device.
// These scheme names MUST be enumerated in LSApplicationQueriesSchemes
// in the plist file.
Expand Down
4 changes: 2 additions & 2 deletions ios/chrome/browser/payments/payment_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ class PaymentRequest : public PaymentOptionsProvider,
// use |supported_card_networks_| for merchant support checks.
std::set<std::string> basic_card_specified_networks_;

// A vector of url-based payment method identifers supported by the merchant
// which encompasses one of the two types of payment method identifers, the
// A vector of url-based payment method identifiers supported by the merchant
// which encompasses one of the two types of payment method identifiers, the
// other being standardized payment method identifiers i.e., basic-card.
std::vector<std::string> url_payment_method_identifiers_;

Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/pref_names.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const char kDesktopIOSPromotionLastImpression[] =
// SMS.
const char kDesktopIOSPromotionDone[] = "ios.desktop_ios_promo_done";

// True if the user is eligible to recieve "desktop to iOS" promotion.
// True if the user is eligible to receive "desktop to iOS" promotion.
const char kDesktopIOSPromotionEligible[] = "ios.desktoptomobileeligible";

// Integer that represents which variation of title and text of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
original_url_, CurrentWebState()->GetContentsMimeType());
}
if (!CurrentWebState()->ContentIsHTML()) {
// If content is not HTML, distillation will fail immediatly.
// If content is not HTML, distillation will fail immediately.
// Call the handler to make sure cleaning methods are called correctly.
// There is no need to wait for rendering either.
DistillerPageIOS::OnLoadURLDone(load_completion_status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void OpenURL(const web::WebState::OpenURLParams& params) override {
GURL distilled_url = reading_list::OfflineURLForPath(
entry->DistilledPath(), entry->URL(), entry->DistilledURL());

// Test on commited entry, there must be no pending item.
// Test on committed entry, there must be no pending item.
test_navigation_manager_->SetPendingItem(nullptr);
test_navigation_manager_->GetLastCommittedItem()->SetURL(url);
test_web_state_.SetLoading(true);
Expand Down
4 changes: 2 additions & 2 deletions ios/chrome/browser/signin/authentication_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class AuthenticationService : public KeyedService,
bool ShouldPromptForSignIn();

// Returns whether the token service accounts have changed since the last time
// they were stored in the browser state prefs. This storing happens everytime
// the accounts change in foreground.
// they were stored in the browser state prefs. This storing happens every
// time the accounts change in foreground.
// This reloads the cached accounts if the information might be stale.
virtual bool HaveAccountsChanged();

Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/signin/gaia_auth_fetcher_ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class GaiaAuthFetcherIOS : public GaiaAuthFetcher {
// Sets whether the iOS specialization of the GaiaAuthFetcher should be used.
// Mainly used for testing.
// Note that if |should_use| is true, it might still not be used if it is
// unecessary or WKWebView isn't enabled.
// unnecessary or WKWebView isn't enabled.
static void SetShouldUseGaiaAuthFetcherIOSForTesting(
bool use_gaia_fetcher_ios);

Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"}"
"</script></html>";

// JavaScript template to read the reponse to a GET or POST request. There is
// JavaScript template to read the response to a GET or POST request. There is
// two different cases:
// * GET request, which was made by simply loading a request to the correct
// URL. The response is the inner text (to avoid formatting in case of JSON
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/snapshots/snapshot_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class WebState;
overlays:(NSArray*)overlays;

// Retrieve a cached snapshot for the |sessionID| and return it via the callback
// if it exists. The callback is garanteed to be called synchronously if the
// if it exists. The callback is guaranteed to be called synchronously if the
// image is in memory. It will be called asynchronously if the image is on disk
// or with nil if the image is not present at all.
- (void)retrieveImageForSessionID:(NSString*)sessionID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ bool CommandReceived(const base::DictionaryValue& command,
DetectLanguageTranslationNotAllowed) {
LoadHtmlAndInject(@"<html></html>");
[manager_ startLanguageDetection];
// Wait until the original injection has recived a command.
// Wait until the original injection has received a command.
base::test::ios::WaitUntilCondition(^bool() {
return !commands_received_.empty();
});
Expand Down Expand Up @@ -326,7 +326,7 @@ bool CommandReceived(const base::DictionaryValue& command,
@"</head></html>";
LoadHtmlAndInject(html);
[manager_ startLanguageDetection];
// Wait until the original injection has recived a command.
// Wait until the original injection has received a command.
base::test::ios::WaitUntilCondition(^bool() {
return !commands_received_.empty();
});
Expand Down
12 changes: 6 additions & 6 deletions ios/chrome/browser/ui/activity_services/activity_type_util.mm
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ ActivityType TypeFromString(NSString* activityString) {
[activityString rangeOfString:kFindLoginActionBundleSubstring];
if (found.length)
return APPEX_PASSWORD_MANAGEMENT;
for (auto const& assocation : prefixTypeAssociations) {
if (assocation.requiresExactMatch_) {
if ([activityString isEqualToString:assocation.prefix_])
return assocation.type_;
for (auto const& association : prefixTypeAssociations) {
if (association.requiresExactMatch_) {
if ([activityString isEqualToString:association.prefix_])
return association.type_;
} else {
if ([activityString hasPrefix:assocation.prefix_])
return assocation.type_;
if ([activityString hasPrefix:association.prefix_])
return association.type_;
}
}
if (IsPasswordManagerActivity(activityString))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ - (void)dismissModals {
}

- (void)dismissKeyboard {
// Uses self.view directly instead of going throught self.view to
// Uses self.view directly instead of going through self.view to
// avoid creating the view hierarchy unnecessarily.
[self.view endEditing:YES];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BookmarkNode;
@class BookmarkPanelView;
@class BookmarkPromoController;

// BookmarkHomeViewController class extention for protected read/write
// BookmarkHomeViewController class extension for protected read/write
// properties and methods for subclasses.
@interface BookmarkHomeViewController ()

Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/ui/bookmarks/bookmark_menu_view.mm
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ - (BookmarkMenuItem*)menuItemAtIndexPath:(NSIndexPath*)indexPath {

- (void)didMoveToSuperview {
[super didMoveToSuperview];
// The background color depends on where in the view hierachy the menu is.
// The background color depends on where in the view hierarchy the menu is.
// For example, the menu may be moved to a slide over panel if the
// horizontal size class changes from regular to compact.
self.tableView.backgroundColor = bookmark_utils_ios::menuBackgroundColor();
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ bool FolderHasAncestorInBookmarkNodes(const BookmarkNode* folder,
explicit FolderNodeComparator(icu::Collator* collator)
: collator_(collator) {}

// Returns true if |n1| preceeds |n2|.
// Returns true if |n1| precedes |n2|.
bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) {
if (!collator_)
return n1->GetTitle() < n2->GetTitle();
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/ui/browser_view_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ - (void)buildToolbarAndTabStrip;
// Updates view-related functionality with the given tab model and browser
// state. The view must have been loaded. Uses |_browserState| and |_model|.
- (void)addUIFunctionalityForModelAndBrowserState;
// Sets the correct frame and heirarchy for subviews and helper views.
// Sets the correct frame and hierarchy for subviews and helper views.
- (void)setUpViewLayout;
// Sets the correct frame for the tab strip based on the given maximum width.
- (void)layoutTabStripForWidth:(CGFloat)maxWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void TearDown() override {
EXPECT_NSEQ(highlighted, @"Left cell right cell");
};

// Test that blocks add spaces if there are not arround it.
// Test that blocks add spaces if there are not around it.
TEST_F(ContextualSearchJsTest, TestHighlightBlockAddsSpace) {
LoadHtml(kHTMLWithDiv);
ContextualSearchStruct searchContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ChromeBrowserState;
- (void)updateToolbarBackgroundAlpha:(CGFloat)alpha;

// Tell the provider that a tab load inside contextual search has completed.
// |tab| is that tab that has loaded, and |sucess| is YES if the tab loaded
// |tab| is that tab that has loaded, and |success| is YES if the tab loaded
// without error, and NO otherwise.
- (void)tabLoadComplete:(Tab*)tab withSuccess:(BOOL)success;

Expand All @@ -57,7 +57,7 @@ class ChromeBrowserState;
@end

// An object that manages the interactions of the contextual search system with
// the rest of teh application. An instance of this object handles creating and
// the rest of the application. An instance of this object handles creating and
// positioning all of the views required for contextual search, as well as all
// of the other controller objects.
@interface ContextualSearchWrangler : NSObject
Expand All @@ -72,15 +72,15 @@ class ChromeBrowserState;
// receiver was initialized with.
- (void)insertPanelView;

// Starts contextual search using the reciever for |browserState|. This should
// Starts contextual search using the receiver for |browserState|. This should
// only be called once in the lifetime of the receiver. If it is possible
// (as determined by TouchToSearchPermissionsMediator) to start contextual
// search on this device, and |browserState| isn't incognito, then this method
// will create the contextual search controller objects and views and start
// observing the tab model it was initialized with.
- (void)maybeStartForBrowserState:(ios::ChromeBrowserState*)browserState;

// Enables or disables contextual search for the reciever; this may be called
// Enables or disables contextual search for the receiver; this may be called
// multiple times during the lifetime of the receiver.
- (void)enable:(BOOL)enabled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ Context.debugMode = false;
Context.GET_RANGE_TIMEOUT_MS = 50;

/**
* Number of surrouding sentences when calculating the surrounding text.
* Number of surrounding sentences when calculating the surrounding text.
* @const {number}
*/
Context.NUMBER_OF_CHARS_IN_SURROUNDING_SENTENCES = 1500;
Expand Down
Loading

0 comments on commit b7e590a

Please sign in to comment.