summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chrome_dll_main.cc4
-rw-r--r--chrome/app/chrome_exe_main.mm4
-rw-r--r--chrome/browser/app_controller_mac.mm8
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc12
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc2
-rw-r--r--chrome/browser/autocomplete/search_provider.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_codec.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_context_menu.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_context_menu.h2
-rw-r--r--chrome/browser/bookmarks/bookmark_drop_info.h2
-rw-r--r--chrome/browser/bookmarks/bookmark_html_writer.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_table_model.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.cc2
-rw-r--r--chrome/browser/cocoa/base_view.mm2
-rw-r--r--chrome/browser/cocoa/browser_window_cocoa.mm10
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm12
-rw-r--r--chrome/browser/cocoa/grow_box_view.m2
-rw-r--r--chrome/browser/cocoa/sad_tab_view.mm18
-rw-r--r--chrome/browser/cocoa/tab_contents_controller.h2
-rw-r--r--chrome/browser/cocoa/tab_contents_controller.mm16
-rw-r--r--chrome/browser/cocoa/tab_strip_controller.h2
-rw-r--r--chrome/browser/cocoa/tab_strip_controller.mm58
-rw-r--r--chrome/browser/command_updater.h2
-rw-r--r--chrome/browser/command_updater_unittest.cc4
-rw-r--r--chrome/browser/debugger/debugger_contents.cc2
-rw-r--r--chrome/browser/debugger/debugger_host.h2
-rw-r--r--chrome/browser/debugger/debugger_host_impl.cpp6
-rw-r--r--chrome/browser/debugger/debugger_io.h2
-rw-r--r--chrome/browser/debugger/debugger_window.cc2
-rw-r--r--chrome/browser/debugger/debugger_window.h2
-rw-r--r--chrome/browser/dock_info.cc2
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.cc2
-rw-r--r--chrome/browser/dom_ui/dom_ui.cc8
-rw-r--r--chrome/browser/dom_ui/dom_ui.h2
-rw-r--r--chrome/browser/dom_ui/dom_ui_contents.h2
-rw-r--r--chrome/browser/dom_ui/fileicon_source.cc4
-rw-r--r--chrome/browser/dom_ui/history_ui.cc4
-rw-r--r--chrome/browser/dom_ui/history_ui.h6
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h4
-rw-r--r--chrome/browser/download/download_manager.h6
-rw-r--r--chrome/browser/download/save_package.cc2
-rw-r--r--chrome/browser/extensions/extensions_service.cc14
-rw-r--r--chrome/browser/extensions/extensions_service.h2
-rw-r--r--chrome/browser/extensions/user_script_master.cc2
-rw-r--r--chrome/browser/external_tab_container.cc2
-rw-r--r--chrome/browser/first_run.cc6
-rw-r--r--chrome/browser/gears_integration.cc2
-rw-r--r--chrome/browser/google_update.cc2
-rw-r--r--chrome/browser/history/query_parser.cc2
-rw-r--r--chrome/browser/history/text_database_manager.cc2
-rw-r--r--chrome/browser/history/url_database_unittest.cc2
-rw-r--r--chrome/browser/importer/firefox2_importer.cc2
-rw-r--r--chrome/browser/importer/importer.h4
-rw-r--r--chrome/browser/navigation_controller_unittest.cc10
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc2
-rw-r--r--chrome/browser/net/resolve_proxy_msg_helper_unittest.cc4
-rw-r--r--chrome/browser/password_manager/password_manager.cc6
-rw-r--r--chrome/browser/password_manager/password_manager.h6
-rw-r--r--chrome/browser/printing/page_number_unittest.cc2
-rw-r--r--chrome/browser/profile.cc4
-rw-r--r--chrome/browser/profile.h12
-rw-r--r--chrome/browser/profile_manager_unittest.cc2
-rw-r--r--chrome/browser/renderer_host/audio_renderer_host_unittest.cc2
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc2
-rw-r--r--chrome/browser/renderer_host/render_view_host_unittest.cc34
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.h6
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm16
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h6
-rw-r--r--chrome/browser/renderer_host/test_render_view_host.h2
-rw-r--r--chrome/browser/rlz/rlz.cc10
-rw-r--r--chrome/browser/safe_browsing/protocol_parser_unittest.cc8
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_bloom.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc12
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util_unittest.cc2
-rw-r--r--chrome/browser/search_engines/template_url_prepopulate_data.cc14
-rw-r--r--chrome/browser/sessions/base_session_service.cc2
-rw-r--r--chrome/browser/sessions/session_service.cc2
-rw-r--r--chrome/browser/sessions/tab_restore_service.cc2
-rw-r--r--chrome/browser/sessions/tab_restore_service_unittest.cc2
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.h4
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc4
-rw-r--r--chrome/browser/tab_contents/interstitial_page.h2
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_controller.cc8
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.cc4
-rw-r--r--chrome/browser/tab_contents/repost_form_warning.h34
-rw-r--r--chrome/browser/tab_contents/site_instance.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc4
-rw-r--r--chrome/browser/tab_contents/test_web_contents.cc36
-rw-r--r--chrome/browser/tab_contents/test_web_contents.h110
-rw-r--r--chrome/browser/tab_contents/web_contents.cc2
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc6
-rw-r--r--chrome/browser/tab_contents/web_contents_view_mac.mm8
-rw-r--r--chrome/browser/task_manager.cc8
-rw-r--r--chrome/browser/toolbar_model.cc2
-rw-r--r--chrome/browser/unload_uitest.cc8
-rw-r--r--chrome/browser/views/about_ipc_dialog.cc2
-rw-r--r--chrome/browser/views/bookmark_bar_view_test.cc4
-rw-r--r--chrome/browser/views/bookmark_bubble_view.cc6
-rw-r--r--chrome/browser/views/bookmark_bubble_view.h2
-rw-r--r--chrome/browser/views/bookmark_table_view.cc2
-rw-r--r--chrome/browser/views/download_item_view.cc6
-rw-r--r--chrome/browser/views/edit_keyword_controller.cc2
-rw-r--r--chrome/browser/views/first_run_bubble.cc2
-rw-r--r--chrome/browser/views/frame/glass_browser_frame_view.cc4
-rw-r--r--chrome/browser/views/frame/glass_browser_frame_view.h2
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc4
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.h2
-rw-r--r--chrome/browser/views/hung_renderer_view.cc4
-rw-r--r--chrome/browser/views/hwnd_html_view.h2
-rw-r--r--chrome/browser/views/importer_view.cc30
-rw-r--r--chrome/browser/views/importer_view.h10
-rw-r--r--chrome/browser/views/importing_progress_view.cc2
-rw-r--r--chrome/browser/views/infobars/infobar_container.h2
-rw-r--r--chrome/browser/views/infobars/infobars.cc2
-rw-r--r--chrome/browser/views/infobars/infobars.h2
-rw-r--r--chrome/browser/views/keyword_editor_view.cc8
-rw-r--r--chrome/browser/views/location_bar_view.h2
-rw-r--r--chrome/browser/views/options/cookies_view.cc2
-rw-r--r--chrome/browser/views/options/languages_page_view.cc4
-rw-r--r--chrome/browser/views/options/languages_page_view.h4
-rw-r--r--chrome/browser/views/page_info_window.cc14
-rw-r--r--chrome/browser/views/password_manager_view.h2
-rw-r--r--chrome/browser/views/shell_dialogs_win.cc4
-rw-r--r--chrome/browser/views/tabs/tab_dragging_test.cc46
-rw-r--r--chrome/browser/views/toolbar_view.cc2
-rw-r--r--chrome/browser/visitedlink_unittest.cc2
-rw-r--r--chrome/common/child_process.cc2
-rw-r--r--chrome/common/child_process_info.cc2
-rw-r--r--chrome/common/chrome_paths_mac.mm6
-rw-r--r--chrome/common/chrome_paths_win.cc2
-rw-r--r--chrome/common/extensions/url_pattern.cc2
-rw-r--r--chrome/common/gfx/chrome_font.h2
-rw-r--r--chrome/common/gfx/chrome_font_mac.mm10
-rw-r--r--chrome/common/gfx/text_elider.cc4
-rw-r--r--chrome/common/ipc_sync_channel.cc2
-rw-r--r--chrome/common/json_value_serializer.h2
-rw-r--r--chrome/common/l10n_util.h2
-rw-r--r--chrome/common/page_zoom.h2
-rw-r--r--chrome/common/plugin_messages.h2
-rw-r--r--chrome/common/resource_bundle_mac.mm6
-rw-r--r--chrome/common/sandbox_init_wrapper.cc2
-rw-r--r--chrome/common/sandbox_init_wrapper.h4
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc2
-rw-r--r--chrome/common/temp_scaffolding_stubs.h2
-rw-r--r--chrome/installer/gcapi/gcapi.cc888
-rw-r--r--chrome/installer/gcapi/gcapi.h6
-rw-r--r--chrome/installer/gcapi/gcapi_test.cc6
-rw-r--r--chrome/installer/gcapi/resource.h28
-rw-r--r--chrome/installer/mini_installer/mini_installer.cc2
-rw-r--r--chrome/installer/setup/main.cc2
-rw-r--r--chrome/installer/util/copy_tree_work_item.cc2
-rw-r--r--chrome/installer/util/html_dialog.h4
-rw-r--r--chrome/installer/util/html_dialog_impl.cc6
-rwxr-xr-xchrome/installer/util/prebuild/create_string_rc.py4
-rw-r--r--chrome/installer/util/util_constants.h4
-rw-r--r--chrome/plugin/plugin_main.cc2
-rw-r--r--chrome/plugin/plugin_thread.cc2
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc4
-rw-r--r--chrome/renderer/dom_ui_bindings.h2
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.cc4
-rw-r--r--chrome/renderer/user_script_slave.cc2
-rw-r--r--chrome/renderer/webmediaplayer_delegate_impl.cc6
-rw-r--r--chrome/renderer/webmediaplayer_delegate_impl.h2
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc4
-rw-r--r--chrome/renderer/webworker_proxy.h2
-rw-r--r--chrome/test/automation/automation_messages_internal.h6
-rw-r--r--chrome/test/data/extensions/bad/invalid_manifest/1/manifest.json2
-rw-r--r--chrome/test/data/extensions/bad/missing_content_script/1/manifest.json26
-rw-r--r--chrome/test/data/extensions/good/extension1/1/manifest.json34
-rw-r--r--chrome/test/data/extensions/good/extension2/2/manifest.json14
-rw-r--r--chrome/test/data/pref_service/overlay.json44
-rwxr-xr-xchrome/test/data/safe_browsing/download_update.py2
-rwxr-xr-xchrome/test/debugger/debugger_unittests.py2
-rw-r--r--chrome/test/in_process_browser_test.cc2
-rw-r--r--chrome/test/interactive_ui/npapi_interactive_test.cc8
-rw-r--r--chrome/test/interactive_ui/view_event_test_base.h4
-rw-r--r--chrome/test/plugin/plugin_test.cpp2
-rw-r--r--chrome/test/test_location_bar.h2
-rw-r--r--chrome/test/ui/npapi_test_helper.cc4
-rw-r--r--chrome/test/ui/npapi_uitest.cpp48
-rw-r--r--chrome/test/ui_test_utils.cc2
-rwxr-xr-xchrome/tools/automated_ui_test_tools/auto_ui_test_input_generator.py302
-rwxr-xr-xchrome/tools/build/win/create_installer_archive.py44
-rwxr-xr-xchrome/tools/build/win/dependencies.py6
-rwxr-xr-xchrome/tools/build/win/sln_deps.py2
-rw-r--r--chrome/tools/convert_dict/dic_reader.cc8
-rwxr-xr-xchrome/tools/extensions/chromium_extension.py12
-rwxr-xr-xchrome/tools/extract_actions.py2
-rwxr-xr-xchrome/tools/history-viz.py8
-rwxr-xr-xchrome/tools/test/smoketests.py2
-rw-r--r--chrome/views/accelerator.cc6
-rw-r--r--chrome/views/client_view.h2
-rw-r--r--chrome/views/dialog_client_view.h2
-rw-r--r--chrome/views/focus_manager.cc2
-rw-r--r--chrome/views/focus_manager_unittest.cc2
-rw-r--r--chrome/views/grid_layout.h2
-rw-r--r--chrome/views/hwnd_view.cc6
-rw-r--r--chrome/views/hwnd_view.h2
-rw-r--r--chrome/views/native_button.cc2
-rw-r--r--chrome/views/single_split_view.cc2
-rw-r--r--chrome/views/table_view_unittest.cc2
-rw-r--r--chrome/views/text_button.cc2
-rw-r--r--chrome/views/tree_view.cc2
-rw-r--r--chrome/views/view_unittest.cc6
-rw-r--r--chrome/views/window.cc2
-rw-r--r--chrome/views/window.h2
-rw-r--r--chrome/views/window_delegate.cc6
-rw-r--r--chrome/views/window_delegate.h2
-rw-r--r--chrome/worker/webworkerclient_proxy.cc2
210 files changed, 1276 insertions, 1276 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 6978e7b..768ace1 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -144,7 +144,7 @@ bool IncorrectChromeHtmlArguments(const std::wstring& command_line) {
// The browser is being launched with chromehtml: somewhere on the command
// line. We will not launch unless it's preceded by the -- switch terminator.
if (pos >= kOffset) {
- if (equal(kChromeHtml, kChromeHtml + arraysize(kChromeHtml) - 1,
+ if (equal(kChromeHtml, kChromeHtml + arraysize(kChromeHtml) - 1,
command_line_lower.begin() + pos - kOffset)) {
return false;
}
@@ -239,7 +239,7 @@ int ChromeMain(int argc, const char** argv) {
// The exit manager is in charge of calling the dtors of singleton objects.
base::AtExitManager exit_manager;
- // We need this pool for all the objects created before we get to the
+ // We need this pool for all the objects created before we get to the
// event loop, but we don't want to leave them hanging around until the
// app quits. Each "main" needs to flush this pool right before it goes into
// its main event loop to get rid of the cruft.
diff --git a/chrome/app/chrome_exe_main.mm b/chrome/app/chrome_exe_main.mm
index aea88ef..f6c78e0 100644
--- a/chrome/app/chrome_exe_main.mm
+++ b/chrome/app/chrome_exe_main.mm
@@ -23,9 +23,9 @@ int main(int argc, const char** argv) {
// The exit manager is in charge of calling the dtors of singletons.
// Win has one here, but we assert with multiples from BrowserMain() if we
- // keep it.
+ // keep it.
// base::AtExitManager exit_manager;
-
+
#if defined(GOOGLE_CHROME_BUILD)
// TODO(pinkerton): init crash reporter
#endif
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index d7b0a72..9bd9de2 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -40,12 +40,12 @@
// We can't use the standard terminate: method because it will abruptly exit
// the app and leave things on the stack in an unfinalized state. We need to
// post a quit message to our run loop so the stack can gracefully unwind.
-- (IBAction)quit:(id)sender {
+- (IBAction)quit:(id)sender {
// TODO(pinkerton):
// since we have to roll it ourselves, ask the delegate (ourselves, really)
// if we should terminate. For example, we might not want to if the user
// has ongoing downloads or multiple windows/tabs open. However, this would
- // require posting UI and may require spinning up another run loop to
+ // require posting UI and may require spinning up another run loop to
// handle it. If it says to continue, post the quit message, otherwise
// go back to normal.
@@ -57,7 +57,7 @@
// Close all the windows.
BrowserList::CloseAllBrowsers(true);
-
+
// Release the reference to the browser process. Once all the browsers get
// dealloc'd, it will stop the RunLoop and fall back into main().
g_browser_process->ReleaseModule();
@@ -89,7 +89,7 @@
- (void)commandDispatch:(id)sender {
// How to get the profile created on line 314 of browser_main? Ugh. TODO:FIXME
Profile* default_profile = *g_browser_process->profile_manager()->begin();
-
+
NSInteger tag = [sender tag];
switch (tag) {
case IDC_NEW_WINDOW:
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index b420d75..0065f36 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -148,7 +148,7 @@ bool AutocompleteEditModel::GetURLForText(const std::wstring& text,
UserTextFromDisplayText(text), std::wstring(), &parts, NULL);
if (type != AutocompleteInput::URL)
return false;
-
+
*url = GURL(URLFixerUpper::FixupURL(WideToUTF8(text), std::string()));
return true;
}
@@ -346,12 +346,12 @@ bool AutocompleteEditModel::OnEscapeKeyPressed() {
return true;
}
- // If the user wasn't editing, but merely had focus in the edit, allow <esc>
- // to be processed as an accelerator, so it can still be used to stop a load.
- // When the permanent text isn't all selected we still fall through to the
- // SelectAll() call below so users can arrow around in the text and then hit
+ // If the user wasn't editing, but merely had focus in the edit, allow <esc>
+ // to be processed as an accelerator, so it can still be used to stop a load.
+ // When the permanent text isn't all selected we still fall through to the
+ // SelectAll() call below so users can arrow around in the text and then hit
// <esc> to quickly replace all the text; this matches IE.
- if (!user_input_in_progress_ && view_->IsSelectAll())
+ if (!user_input_in_progress_ && view_->IsSelectAll())
return false;
view_->RevertAll();
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 307f502..6df7ff4 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -593,7 +593,7 @@ void AutocompleteEditViewWin::Update(
CHARRANGE sel;
GetSelection(sel);
const bool was_reversed = (sel.cpMin > sel.cpMax);
- const bool was_sel_all = (sel.cpMin != sel.cpMax) &&
+ const bool was_sel_all = (sel.cpMin != sel.cpMax) &&
IsSelectAllForRange(sel);
RevertAll();
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 23d4407c..d462480 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -125,7 +125,7 @@ void SearchProvider::OnURLFetchComplete(const URLFetcher* source,
// TODO(jungshik): Switch to CodePageToUTF8 after it's added.
if (CodepageToWide(data, charset.c_str(),
OnStringUtilConversionError::FAIL, &wide_data))
- json_data = WideToUTF8(wide_data);
+ json_data = WideToUTF8(wide_data);
}
}
diff --git a/chrome/browser/bookmarks/bookmark_codec.cc b/chrome/browser/bookmarks/bookmark_codec.cc
index dd39fc8..8d61d37 100644
--- a/chrome/browser/bookmarks/bookmark_codec.cc
+++ b/chrome/browser/bookmarks/bookmark_codec.cc
@@ -184,7 +184,7 @@ bool BookmarkCodec::DecodeNode(BookmarkModel* model,
if (!DecodeChildren(model, *static_cast<ListValue*>(child_values), node))
return false;
}
-
+
node->SetTitle(title);
node->date_added_ = Time::FromInternalValue(
StringToInt64(WideToUTF16Hack(date_added_string)));
diff --git a/chrome/browser/bookmarks/bookmark_context_menu.cc b/chrome/browser/bookmarks/bookmark_context_menu.cc
index 2c58710..8c06b4e 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu.cc
+++ b/chrome/browser/bookmarks/bookmark_context_menu.cc
@@ -271,7 +271,7 @@ BookmarkContextMenu::BookmarkContextMenu(
menu_->AppendMenuItemWithLabel(
IDS_BOOKMARK_BAR_REMOVE,
l10n_util::GetString(IDS_BOOKMARK_BAR_REMOVE));
-
+
if (configuration == BOOKMARK_MANAGER_TABLE ||
configuration == BOOKMARK_MANAGER_TABLE_OTHER ||
configuration == BOOKMARK_MANAGER_ORGANIZE_MENU ||
diff --git a/chrome/browser/bookmarks/bookmark_context_menu.h b/chrome/browser/bookmarks/bookmark_context_menu.h
index 1d08110..460f01d 100644
--- a/chrome/browser/bookmarks/bookmark_context_menu.h
+++ b/chrome/browser/bookmarks/bookmark_context_menu.h
@@ -22,7 +22,7 @@ class Browser;
class PageNavigator;
// BookmarkContextMenu manages the context menu shown for the
-// bookmark bar, items on the bookmark bar, submenus of the bookmark bar and
+// bookmark bar, items on the bookmark bar, submenus of the bookmark bar and
// the bookmark manager.
class BookmarkContextMenu : public views::MenuDelegate,
public BookmarkModelObserver {
diff --git a/chrome/browser/bookmarks/bookmark_drop_info.h b/chrome/browser/bookmarks/bookmark_drop_info.h
index b7dc643..d5ed4de3 100644
--- a/chrome/browser/bookmarks/bookmark_drop_info.h
+++ b/chrome/browser/bookmarks/bookmark_drop_info.h
@@ -78,7 +78,7 @@ class BookmarkDropInfo {
// Used when autoscrolling.
base::RepeatingTimer<BookmarkDropInfo> scroll_timer_;
-
+
DISALLOW_COPY_AND_ASSIGN(BookmarkDropInfo);
};
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
index 5ec7ca0..b3ed5af 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
@@ -322,7 +322,7 @@ void WriteBookmarks(MessageLoop* thread,
// for the duration of the write), as such we make a copy of the
// BookmarkModel using BookmarkCodec then write from that.
BookmarkCodec codec;
- scoped_ptr<Writer> writer(new Writer(codec.Encode(model),
+ scoped_ptr<Writer> writer(new Writer(codec.Encode(model),
FilePath::FromWStringHack(path)));
if (thread)
thread->PostTask(FROM_HERE, writer.release());
diff --git a/chrome/browser/bookmarks/bookmark_table_model.cc b/chrome/browser/bookmarks/bookmark_table_model.cc
index 7a50e29..a88bb81 100644
--- a/chrome/browser/bookmarks/bookmark_table_model.cc
+++ b/chrome/browser/bookmarks/bookmark_table_model.cc
@@ -274,7 +274,7 @@ BookmarkTableModel* BookmarkTableModel::CreateBookmarkTableModelForFolder(
BookmarkTableModel* BookmarkTableModel::CreateSearchTableModel(
BookmarkModel* model,
const std::wstring& text) {
- return new BookmarkSearchTableModel(model, text);
+ return new BookmarkSearchTableModel(model, text);
}
BookmarkTableModel::BookmarkTableModel(BookmarkModel* model)
diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc
index 45e7c6d..18a6bc0 100644
--- a/chrome/browser/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/bookmarks/bookmark_utils.cc
@@ -254,7 +254,7 @@ void OpenAll(gfx::NativeWindow parent,
NewBrowserPageNavigator navigator_impl(profile);
if (!navigator) {
- Browser* browser =
+ Browser* browser =
BrowserList::FindBrowserWithType(profile, Browser::TYPE_NORMAL);
if (!browser || !browser->GetSelectedTabContents()) {
navigator = &navigator_impl;
diff --git a/chrome/browser/cocoa/base_view.mm b/chrome/browser/cocoa/base_view.mm
index 9d8e247..9ea74fb 100644
--- a/chrome/browser/cocoa/base_view.mm
+++ b/chrome/browser/cocoa/base_view.mm
@@ -24,7 +24,7 @@
- (void)dealloc {
[self removeTrackingArea:trackingArea_];
[trackingArea_ release];
-
+
[super dealloc];
}
diff --git a/chrome/browser/cocoa/browser_window_cocoa.mm b/chrome/browser/cocoa/browser_window_cocoa.mm
index 9d1ae21..0f611b3 100644
--- a/chrome/browser/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/cocoa/browser_window_cocoa.mm
@@ -7,7 +7,7 @@
#include "chrome/browser/cocoa/browser_window_cocoa.h"
#include "chrome/browser/cocoa/browser_window_controller.h"
-BrowserWindowCocoa::BrowserWindowCocoa(BrowserWindowController* controller,
+BrowserWindowCocoa::BrowserWindowCocoa(BrowserWindowController* controller,
NSWindow* window)
: controller_(controller), window_(window) {
}
@@ -27,7 +27,7 @@ void BrowserWindowCocoa::SetBounds(const gfx::Rect& bounds) {
bounds.height());
// flip coordinates
NSScreen* screen = [window_ screen];
- cocoa_bounds.origin.y =
+ cocoa_bounds.origin.y =
[screen frame].size.height - bounds.height() - bounds.y();
}
@@ -44,7 +44,7 @@ void BrowserWindowCocoa::Activate() {
}
void BrowserWindowCocoa::FlashFrame() {
- [[NSApplication sharedApplication]
+ [[NSApplication sharedApplication]
requestUserAttention:NSInformationalRequest];
}
@@ -123,7 +123,7 @@ void BrowserWindowCocoa::UpdateStopGoState(bool is_loading) {
void BrowserWindowCocoa::UpdateToolbar(TabContents* contents,
bool should_restore_state) {
- [controller_ updateToolbarWithContents:contents
+ [controller_ updateToolbarWithContents:contents
shouldRestoreState:should_restore_state ? YES : NO];
}
@@ -189,7 +189,7 @@ void BrowserWindowCocoa::ShowHTMLDialog(HtmlDialogContentsDelegate* delegate,
void* parent_window) {
NOTIMPLEMENTED();
}
-
+
void BrowserWindowCocoa::DestroyBrowser() {
[controller_ destroyBrowser];
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 3365812..8779fed 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -38,11 +38,11 @@
- (void)windowDidLoad {
// Create a controller for the tab strip, giving it the model object for
// this window's Browser and the tab strip view. The controller will handle
- // registering for the appropriate tab notifications from the back-end and
+ // registering for the appropriate tab notifications from the back-end and
// managing the creation of new tabs.
- tabStripController_ =
+ tabStripController_ =
[[TabStripController alloc]
- initWithView:tabStripView_
+ initWithView:tabStripView_
tabModel:browser_->tabstrip_model()
toolbarModel:browser_->toolbar_model()
commands:browser_->command_updater()];
@@ -67,7 +67,7 @@
// from this method.
- (void)windowWillClose:(NSNotification *)notification {
DCHECK(!browser_->tabstrip_model()->count());
-
+
// We can't acutally use |-autorelease| here because there's an embedded
// run loop in the |-performClose:| which contains its own autorelease pool.
// Instead we use call it after a zero-length delay, which gets us back
@@ -150,7 +150,7 @@
// in the coordinate system of the content area of the currently selected tab.
// |windowGrowBox| needs to be in the window's coordinate system.
- (NSRect)selectedTabGrowBoxRect {
- return [tabStripController_
+ return [tabStripController_
selectedTabGrowBoxRect];
}
@@ -161,7 +161,7 @@
// Called to start/stop the loading animations.
- (void)updateLoadingAnimations:(BOOL)animate {
if (animate) {
- // TODO(pinkerton): determine what throbber animation is necessary and
+ // TODO(pinkerton): determine what throbber animation is necessary and
// start a timer to periodically update. Windows tells the tab strip to
// do this. It uses a single timer to coalesce the multiple things that
// could be updating. http://crbug.com/8281
diff --git a/chrome/browser/cocoa/grow_box_view.m b/chrome/browser/cocoa/grow_box_view.m
index 79f3ca0..d7ace41 100644
--- a/chrome/browser/cocoa/grow_box_view.m
+++ b/chrome/browser/cocoa/grow_box_view.m
@@ -17,7 +17,7 @@
// Draws the "grow_box" image in our bounds.
- (void)drawRect:(NSRect)dirtyRect {
- [image_ drawInRect:[self bounds] fromRect:NSZeroRect
+ [image_ drawInRect:[self bounds] fromRect:NSZeroRect
operation:NSCompositeSourceOver fraction:1.0];
}
diff --git a/chrome/browser/cocoa/sad_tab_view.mm b/chrome/browser/cocoa/sad_tab_view.mm
index eddb505..c74f297 100644
--- a/chrome/browser/cocoa/sad_tab_view.mm
+++ b/chrome/browser/cocoa/sad_tab_view.mm
@@ -20,17 +20,17 @@ static const int kTitleMessageSpacing = 15;
base::SysWideToNSString(l10n_util::GetString(IDS_SAD_TAB_TITLE));
NSString* message =
base::SysWideToNSString(l10n_util::GetString(IDS_SAD_TAB_MESSAGE));
-
+
NSColor* textColor = [NSColor whiteColor];
NSColor* backgroundColor = [NSColor colorWithCalibratedRed:(35.0f/255.0f)
green:(48.0f/255.0f)
blue:(64.0f/255.0f)
alpha:1.0];
-
+
// Layout
NSFont* titleFont = [NSFont boldSystemFontOfSize:[NSFont systemFontSize]];
NSFont* messageFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]];
-
+
NSDictionary* titleAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
titleFont, NSFontAttributeName,
textColor, NSForegroundColorAttributeName,
@@ -39,23 +39,23 @@ static const int kTitleMessageSpacing = 15;
messageFont, NSFontAttributeName,
textColor, NSForegroundColorAttributeName,
nil];
-
+
NSAttributedString* titleString =
[[[NSAttributedString alloc] initWithString:title
attributes:titleAttrs] autorelease];
NSAttributedString* messageString =
[[[NSAttributedString alloc] initWithString:message
attributes:messageAttrs] autorelease];
-
+
NSRect viewBounds = [self bounds];
-
+
NSSize sadTabImageSize = [sadTabImage size];
CGFloat iconWidth = sadTabImageSize.width;
CGFloat iconHeight = sadTabImageSize.height;
CGFloat iconX = (viewBounds.size.width - iconWidth) / 2;
CGFloat iconY =
((viewBounds.size.height - iconHeight) / 2) - kSadTabOffset;
-
+
NSSize titleSize = [titleString size];
CGFloat titleX = (viewBounds.size.width - titleSize.width) / 2;
CGFloat titleY = iconY - kIconTitleSpacing - titleSize.height;
@@ -63,11 +63,11 @@ static const int kTitleMessageSpacing = 15;
NSSize messageSize = [messageString size];
CGFloat messageX = (viewBounds.size.width - messageSize.width) / 2;
CGFloat messageY = titleY - kTitleMessageSpacing - messageSize.height;
-
+
// Paint
[backgroundColor set];
NSRectFill(viewBounds);
-
+
[sadTabImage drawAtPoint:NSMakePoint(iconX, iconY)
fromRect:NSZeroRect
operation:NSCompositeSourceOver
diff --git a/chrome/browser/cocoa/tab_contents_controller.h b/chrome/browser/cocoa/tab_contents_controller.h
index 2bf021a..bc97e4f 100644
--- a/chrome/browser/cocoa/tab_contents_controller.h
+++ b/chrome/browser/cocoa/tab_contents_controller.h
@@ -46,7 +46,7 @@ class ToolbarModel;
// Create the contents of a tab represented by |contents| and loaded from the
// nib given by |name|. |commands| allows tracking of what's enabled and
// disabled. It may be nil if no updating is desired.
-- (id)initWithNibName:(NSString*)name
+- (id)initWithNibName:(NSString*)name
bundle:(NSBundle*)bundle
contents:(TabContents*)contents
commands:(CommandUpdater*)commands
diff --git a/chrome/browser/cocoa/tab_contents_controller.mm b/chrome/browser/cocoa/tab_contents_controller.mm
index 0700341..f20038e 100644
--- a/chrome/browser/cocoa/tab_contents_controller.mm
+++ b/chrome/browser/cocoa/tab_contents_controller.mm
@@ -58,7 +58,7 @@ class LocationBarBridge : public LocationBar {
virtual std::wstring GetInputString() const;
virtual WindowOpenDisposition GetWindowOpenDisposition() const
{ NOTIMPLEMENTED(); return CURRENT_TAB; }
- virtual PageTransition::Type GetPageTransition() const
+ virtual PageTransition::Type GetPageTransition() const
{ NOTIMPLEMENTED(); return 0; }
virtual void AcceptInput() { NOTIMPLEMENTED(); }
virtual void FocusLocation();
@@ -71,7 +71,7 @@ class LocationBarBridge : public LocationBar {
@implementation TabContentsController
-- (id)initWithNibName:(NSString*)name
+- (id)initWithNibName:(NSString*)name
bundle:(NSBundle*)bundle
contents:(TabContents*)contents
commands:(CommandUpdater*)commands
@@ -97,7 +97,7 @@ class LocationBarBridge : public LocationBar {
- (void)awakeFromNib {
[contentsBox_ setContentView:contents_->GetNativeView()];
-
+
// Provide a starting point since we won't get notifications if the state
// doesn't change between tabs.
[self updateToolbarCommandStatus];
@@ -185,7 +185,7 @@ class LocationBarBridge : public LocationBar {
- (void)updateToolbarWithContents:(TabContents*)tab {
// TODO(pinkerton): there's a lot of ui code in autocomplete_edit.cc
// that we'll want to duplicate. For now, just handle setting the text.
-
+
// TODO(pinkerton): update the security lock icon and background color
NSString* urlString = base::SysWideToNSString(toolbarModel_->GetText());
@@ -217,8 +217,8 @@ class LocationBarBridge : public LocationBar {
localGrowBox = [contentView convertRect:localGrowBox
fromView:[self view]];
// Flip the rect in view coordinates
- localGrowBox.origin.y =
- [contentView frame].size.height - localGrowBox.origin.y -
+ localGrowBox.origin.y =
+ [contentView frame].size.height - localGrowBox.origin.y -
localGrowBox.size.height;
}
return localGrowBox;
@@ -252,9 +252,9 @@ TabContentsCommandObserver::~TabContentsCommandObserver() {
commands_->RemoveCommandObserver(this);
}
-void TabContentsCommandObserver::EnabledStateChangedForCommand(int command,
+void TabContentsCommandObserver::EnabledStateChangedForCommand(int command,
bool enabled) {
- [controller_ enabledStateChangedForCommand:command
+ [controller_ enabledStateChangedForCommand:command
enabled:enabled ? YES : NO];
}
diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h
index 8a41c08..bc1f8c0 100644
--- a/chrome/browser/cocoa/tab_strip_controller.h
+++ b/chrome/browser/cocoa/tab_strip_controller.h
@@ -44,7 +44,7 @@ class ToolbarModel;
// Initialize the controller with a view, model, and command updater for
// tracking what's enabled and disabled. |commands| may be nil if no updating
// is desired.
-- (id)initWithView:(TabStripView*)view
+- (id)initWithView:(TabStripView*)view
tabModel:(TabStripModel*)tabModel
toolbarModel:(ToolbarModel*)toolbarModel
commands:(CommandUpdater*)commands;
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm
index 9f5e544..26717d1 100644
--- a/chrome/browser/cocoa/tab_strip_controller.mm
+++ b/chrome/browser/cocoa/tab_strip_controller.mm
@@ -20,13 +20,13 @@ const short kTabOverlap = 16;
- (void)insertTabWithContents:(TabContents*)contents
atIndex:(NSInteger)index
inForeground:(bool)inForeground;
-- (void)selectTabWithContents:(TabContents*)newContents
+- (void)selectTabWithContents:(TabContents*)newContents
previousContents:(TabContents*)oldContents
atIndex:(NSInteger)index
userGesture:(bool)wasUserGesture;
- (void)tabDetachedWithContents:(TabContents*)contents
atIndex:(NSInteger)index;
-- (void)tabChangedWithContents:(TabContents*)contents
+- (void)tabChangedWithContents:(TabContents*)contents
atIndex:(NSInteger)index;
@end
@@ -60,7 +60,7 @@ class TabStripBridge : public TabStripModelObserver {
@implementation TabStripController
-- (id)initWithView:(TabStripView*)view
+- (id)initWithView:(TabStripView*)view
tabModel:(TabStripModel*)tabModel
toolbarModel:(ToolbarModel*)toolbarModel
commands:(CommandUpdater*)commands {
@@ -72,7 +72,7 @@ class TabStripBridge : public TabStripModelObserver {
commands_ = commands;
bridge_ = new TabStripBridge(tabModel, self);
tabControllerArray_ = [[NSMutableArray alloc] init];
-
+
// Create the new tab button separate from the nib so we can make sure
// it's always at the end of the subview list.
NSImage* image = [NSImage imageNamed:@"newtab"];
@@ -100,7 +100,7 @@ class TabStripBridge : public TabStripModelObserver {
// out the sole child of the contentArea to display its contents.
- (void)swapInTabAtIndex:(NSInteger)index {
TabContentsController* controller = [tabControllerArray_ objectAtIndex:index];
-
+
// Resize the new view to fit the window
NSView* contentView = [[tabView_ window] contentView];
NSView* newView = [controller view];
@@ -132,7 +132,7 @@ class TabStripBridge : public TabStripModelObserver {
[button setBezelStyle:NSRegularSquareBezelStyle];
[button setTarget:self];
[button setAction:@selector(selectTab:)];
-
+
return button;
}
@@ -162,13 +162,13 @@ class TabStripBridge : public TabStripModelObserver {
tabModel_->SelectTabContentsAt(index, true);
}
-// Return the frame for a new tab that will go to the immediate right of the
+// Return the frame for a new tab that will go to the immediate right of the
// tab at |index|. If |index| is 0, this will be the first tab, indented so
// as to not cover the window controls.
- (NSRect)frameForNewTabAtIndex:(NSInteger)index {
const short kIndentLeavingSpaceForControls = 66;
const short kNewTabWidth = 160;
-
+
short xOffset = kIndentLeavingSpaceForControls;
if (index > 0) {
NSRect previousTab = [[[tabView_ subviews] objectAtIndex:index - 1] frame];
@@ -196,43 +196,43 @@ class TabStripBridge : public TabStripModelObserver {
inForeground:(bool)inForeground {
DCHECK(contents);
DCHECK(index == TabStripModel::kNoTab || tabModel_->ContainsIndex(index));
-
+
// TODO(pinkerton): handle tab dragging in here
// Make a new tab. Load the contents of this tab from the nib and associate
// the new controller with |contents| so it can be looked up later.
TabContentsController* contentsController =
- [[[TabContentsController alloc] initWithNibName:@"TabContents"
+ [[[TabContentsController alloc] initWithNibName:@"TabContents"
bundle:nil
contents:contents
commands:commands_
toolbarModel:toolbarModel_]
autorelease];
[tabControllerArray_ insertObject:contentsController atIndex:index];
-
+
// Remove the new tab button so the only views present are the tabs,
// we'll add it back when we're done
[newTabButton_ removeFromSuperview];
-
+
// Make a new tab view and add it to the strip.
// TODO(pinkerton): move everyone else over and animate. Also will need to
// move the "add tab" button over.
NSRect newTabFrame = [self frameForNewTabAtIndex:index];
NSButton* newView = [self newTabWithFrame:newTabFrame];
[tabView_ addSubview:newView];
-
+
[self setTabTitle:newView withContents:contents];
-
+
// Add the new tab button back in to the right of the last tab.
const NSInteger kNewTabXOffset = 10;
- NSRect lastTab =
+ NSRect lastTab =
[[[tabView_ subviews] objectAtIndex:[[tabView_ subviews] count] - 1] frame];
NSInteger maxRightEdge = NSMaxX(lastTab);
NSRect newTabButtonFrame = [newTabButton_ frame];
newTabButtonFrame.origin.x = maxRightEdge + kNewTabXOffset;
[newTabButton_ setFrame:newTabButtonFrame];
[tabView_ addSubview:newTabButton_];
-
+
// Select the newly created tab if in the foreground
if (inForeground)
[self swapInTabAtIndex:index];
@@ -240,7 +240,7 @@ class TabStripBridge : public TabStripModelObserver {
// Called when a notification is received from the model to select a particular
// tab. Swaps in the toolbar and content area associated with |newContents|.
-- (void)selectTabWithContents:(TabContents*)newContents
+- (void)selectTabWithContents:(TabContents*)newContents
previousContents:(TabContents*)oldContents
atIndex:(NSInteger)index
userGesture:(bool)wasUserGesture {
@@ -250,7 +250,7 @@ class TabStripBridge : public TabStripModelObserver {
NSButton* current = [[tabView_ subviews] objectAtIndex:i];
[current setState:(i == index) ? NSOnState : NSOffState];
}
-
+
// Tell the new tab contents it is about to become the selected tab. Here it
// can do things like make sure the toolbar is up to date.
TabContentsController* newController =
@@ -262,7 +262,7 @@ class TabStripBridge : public TabStripModelObserver {
}
// Called when a notification is received from the model that the given tab
-// has gone away. Remove all knowledge about this tab and it's associated
+// has gone away. Remove all knowledge about this tab and it's associated
// controller and remove the view from the strip.
- (void)tabDetachedWithContents:(TabContents*)contents
atIndex:(NSInteger)index {
@@ -276,7 +276,7 @@ class TabStripBridge : public TabStripModelObserver {
NSView* tab = [[tabView_ subviews] objectAtIndex:index];
NSInteger tabWidth = [tab frame].size.width;
[tab removeFromSuperview];
-
+
// Move all the views to the right the width of the tab that was closed.
// TODO(pinkerton): Animate!
const int numSubviews = [[tabView_ subviews] count];
@@ -290,11 +290,11 @@ class TabStripBridge : public TabStripModelObserver {
// Called when a notification is received from the model that the given tab
// has been updated.
-- (void)tabChangedWithContents:(TabContents*)contents
+- (void)tabChangedWithContents:(TabContents*)contents
atIndex:(NSInteger)index {
NSButton* tab = [[tabView_ subviews] objectAtIndex:index];
[self setTabTitle:tab withContents:contents];
-
+
TabContentsController* updatedController =
[tabControllerArray_ objectAtIndex:index];
[updatedController tabDidChange:contents];
@@ -309,13 +309,13 @@ class TabStripBridge : public TabStripModelObserver {
- (void)updateToolbarWithContents:(TabContents*)tab
shouldRestoreState:(BOOL)shouldRestore {
// TODO(pinkerton): OS_WIN maintains this, but I'm not sure why. It's
- // available by querying the model, which we have available to us.
+ // available by querying the model, which we have available to us.
currentTab_ = tab;
-
+
// tell the appropriate controller to update its state. |shouldRestore| being
// YES means we're going back to this tab and should put back any state
// associated with it.
- TabContentsController* controller =
+ TabContentsController* controller =
[tabControllerArray_ objectAtIndex:tabModel_->GetIndexOfTabContents(tab)];
[controller updateToolbarWithContents:shouldRestore ? tab : nil];
}
@@ -364,7 +364,7 @@ class TabStripBridge : public TabStripModelObserver {
//--------------------------------------------------------------------------
-TabStripBridge::TabStripBridge(TabStripModel* model,
+TabStripBridge::TabStripBridge(TabStripModel* model,
TabStripController* controller)
: controller_(controller), model_(model) {
// Register to be a listener on the model so we can get updates and tell
@@ -380,8 +380,8 @@ TabStripBridge::~TabStripBridge() {
void TabStripBridge::TabInsertedAt(TabContents* contents,
int index,
bool foreground) {
- [controller_ insertTabWithContents:contents
- atIndex:index
+ [controller_ insertTabWithContents:contents
+ atIndex:index
inForeground:foreground];
}
@@ -393,7 +393,7 @@ void TabStripBridge::TabSelectedAt(TabContents* old_contents,
TabContents* new_contents,
int index,
bool user_gesture) {
- [controller_ selectTabWithContents:new_contents
+ [controller_ selectTabWithContents:new_contents
previousContents:old_contents
atIndex:index
userGesture:user_gesture];
diff --git a/chrome/browser/command_updater.h b/chrome/browser/command_updater.h
index cbc14fe..f0303fc 100644
--- a/chrome/browser/command_updater.h
+++ b/chrome/browser/command_updater.h
@@ -61,7 +61,7 @@ class CommandUpdater {
// Removes an observer to the state of a particular command.
void RemoveCommandObserver(int id, CommandObserver* observer);
-
+
// Removes |observer| for all commands on which it's registered.
void RemoveCommandObserver(CommandObserver* observer);
diff --git a/chrome/browser/command_updater_unittest.cc b/chrome/browser/command_updater_unittest.cc
index d090d3d..dc5e031 100644
--- a/chrome/browser/command_updater_unittest.cc
+++ b/chrome/browser/command_updater_unittest.cc
@@ -79,12 +79,12 @@ TEST_F(CommandUpdaterTest, TestObservers) {
TEST_F(CommandUpdaterTest, TestObserverRemovingAllCommands) {
TestingCommandHandlerMock handler;
CommandUpdater command_updater(&handler);
-
+
// Create two observers for the commands 1-3 as true, remove one using the
// single remove command, then set the command to false. Ensure that the
// removed observer still thinks all commands are true and the one left
// observing picked up the change.
-
+
TestingCommandObserverMock observer_remove, observer_keep;
command_updater.AddCommandObserver(1, &observer_remove);
command_updater.AddCommandObserver(2, &observer_remove);
diff --git a/chrome/browser/debugger/debugger_contents.cc b/chrome/browser/debugger/debugger_contents.cc
index 386b5d8..5927caa 100644
--- a/chrome/browser/debugger/debugger_contents.cc
+++ b/chrome/browser/debugger/debugger_contents.cc
@@ -137,7 +137,7 @@ void DebuggerContents::Init() {
// static
bool DebuggerContents::IsDebuggerUrl(const GURL& url) {
- return (url.SchemeIs(DOMUIContents::GetScheme().c_str()) &&
+ return (url.SchemeIs(DOMUIContents::GetScheme().c_str()) &&
url.host() == kDebuggerHost);
}
diff --git a/chrome/browser/debugger/debugger_host.h b/chrome/browser/debugger/debugger_host.h
index bfb2efa..c008c30 100644
--- a/chrome/browser/debugger/debugger_host.h
+++ b/chrome/browser/debugger/debugger_host.h
@@ -27,7 +27,7 @@ class DebuggerHost : public base::RefCountedThreadSafe<DebuggerHost> {
virtual void OnDebugAttach() = 0;
// The renderer we're attached to is gone.
virtual void OnDebugDisconnect() = 0;
-
+
virtual void DidDisconnect() = 0;
virtual void DidConnect() {}
virtual void ProcessCommand(const std::wstring& data) {}
diff --git a/chrome/browser/debugger/debugger_host_impl.cpp b/chrome/browser/debugger/debugger_host_impl.cpp
index beeb398..83795d8 100644
--- a/chrome/browser/debugger/debugger_host_impl.cpp
+++ b/chrome/browser/debugger/debugger_host_impl.cpp
@@ -66,7 +66,7 @@ class TabContentsReference : public NotificationObserver {
DebuggerHostImpl::DebuggerHostImpl(DebuggerInputOutput* io)
- : io_(io),
+ : io_(io),
debugger_ready_(true) {
}
@@ -75,8 +75,8 @@ DebuggerHostImpl::~DebuggerHostImpl() {
io_ = NULL;
}
-void DebuggerHostImpl::Start() {
- io_->Start(this);
+void DebuggerHostImpl::Start() {
+ io_->Start(this);
}
void DebuggerHostImpl::Debug(TabContents* tab) {
diff --git a/chrome/browser/debugger/debugger_io.h b/chrome/browser/debugger/debugger_io.h
index b2ea381..68b04e6 100644
--- a/chrome/browser/debugger/debugger_io.h
+++ b/chrome/browser/debugger/debugger_io.h
@@ -42,7 +42,7 @@ public:
virtual void SetDebuggerBreak(bool brk) {}
// sends message to debugger UI page in order to invoke JS function in it
- virtual void CallFunctionInPage(const std::wstring& name,
+ virtual void CallFunctionInPage(const std::wstring& name,
ListValue* argv) {}
protected:
diff --git a/chrome/browser/debugger/debugger_window.cc b/chrome/browser/debugger/debugger_window.cc
index 1f62d01..aae04e6 100644
--- a/chrome/browser/debugger/debugger_window.cc
+++ b/chrome/browser/debugger/debugger_window.cc
@@ -126,7 +126,7 @@ void DebuggerWindow::SetDebuggerBreak(bool brk) {
#endif
}
-void DebuggerWindow::CallFunctionInPage(const std::wstring& name,
+void DebuggerWindow::CallFunctionInPage(const std::wstring& name,
ListValue* argv) {
if (view_) {
DictionaryValue* body = new DictionaryValue;
diff --git a/chrome/browser/debugger/debugger_window.h b/chrome/browser/debugger/debugger_window.h
index 4b980f3..85f4ff8 100644
--- a/chrome/browser/debugger/debugger_window.h
+++ b/chrome/browser/debugger/debugger_window.h
@@ -37,7 +37,7 @@ class DebuggerWindow : public DebuggerInputOutput,
virtual void SetDebuggerBreak(bool brk);
// Note that this method will take ownership of argv.
- virtual void CallFunctionInPage(const std::wstring& name,
+ virtual void CallFunctionInPage(const std::wstring& name,
ListValue* argv);
// views::WindowDelegate methods:
diff --git a/chrome/browser/dock_info.cc b/chrome/browser/dock_info.cc
index e1c394c..ead6878 100644
--- a/chrome/browser/dock_info.cc
+++ b/chrome/browser/dock_info.cc
@@ -360,7 +360,7 @@ DockInfo DockInfo::GetDockInfoAtPoint(const gfx::Point& screen_point,
int mid_x = (m_bounds.left + m_bounds.right) / 2;
int mid_y = (m_bounds.top + m_bounds.bottom) / 2;
- bool result =
+ bool result =
info.CheckMonitorPoint(monitor, screen_point, mid_x, m_bounds.top,
DockInfo::MAXIMIZE) ||
info.CheckMonitorPoint(monitor, screen_point, mid_x, m_bounds.bottom,
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc
index 89cfe89..532c117 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.cc
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc
@@ -105,7 +105,7 @@ void RegisterURLRequestChromeJob() {
#ifdef CHROME_PERSONALIZATION
url_util::AddStandardScheme(kPersonalizationScheme);
URLRequest::RegisterProtocolFactory(kPersonalizationScheme,
- &ChromeURLDataManager::Factory);
+ &ChromeURLDataManager::Factory);
#endif
}
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc
index 9b8b069..1f01e7d 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/dom_ui.cc
@@ -27,7 +27,7 @@ DOMUI::~DOMUI() {
void DOMUI::ProcessDOMUIMessage(const std::string& message,
const std::string& content) {
// Look up the callback for this message.
- MessageCallbackMap::const_iterator callback =
+ MessageCallbackMap::const_iterator callback =
message_callbacks_.find(message);
if (callback == message_callbacks_.end())
return;
@@ -74,7 +74,7 @@ void DOMUI::CallJavascriptFunction(
ExecuteJavascript(javascript);
}
-void DOMUI::RegisterMessageCallback(const std::string &message,
+void DOMUI::RegisterMessageCallback(const std::string &message,
MessageCallback *callback) {
message_callbacks_.insert(std::make_pair(message, callback));
}
@@ -99,7 +99,7 @@ void DOMUI::AddMessageHandler(DOMMessageHandler* handler) {
void DOMUI::ExecuteJavascript(const std::wstring& javascript) {
DCHECK(contents_);
- contents_->render_view_host()->ExecuteJavascriptInWebFrame(std::wstring(),
+ contents_->render_view_host()->ExecuteJavascriptInWebFrame(std::wstring(),
javascript);
}
@@ -111,7 +111,7 @@ DOMMessageHandler::DOMMessageHandler(DOMUI *dom_ui) : dom_ui_(dom_ui) {
// DOMMessageHandler, protected: ----------------------------------------------
-void DOMMessageHandler::SetURLAndTitle(DictionaryValue* dictionary,
+void DOMMessageHandler::SetURLAndTitle(DictionaryValue* dictionary,
std::wstring title,
const GURL& gurl) {
std::wstring wstring_url = UTF8ToWide(gurl.spec());
diff --git a/chrome/browser/dom_ui/dom_ui.h b/chrome/browser/dom_ui/dom_ui.h
index 3164d64..35388bd 100644
--- a/chrome/browser/dom_ui/dom_ui.h
+++ b/chrome/browser/dom_ui/dom_ui.h
@@ -91,7 +91,7 @@ class DOMMessageHandler {
protected:
// Adds "url" and "title" keys on incoming dictionary, setting title
// as the url as a fallback on empty title.
- static void SetURLAndTitle(DictionaryValue* dictionary,
+ static void SetURLAndTitle(DictionaryValue* dictionary,
std::wstring title,
const GURL& gurl);
diff --git a/chrome/browser/dom_ui/dom_ui_contents.h b/chrome/browser/dom_ui/dom_ui_contents.h
index 241f97f..42bfe89 100644
--- a/chrome/browser/dom_ui/dom_ui_contents.h
+++ b/chrome/browser/dom_ui/dom_ui_contents.h
@@ -119,7 +119,7 @@ class DOMUIContents : public WebContents {
//
// TabContents overrides
- //
+ //
virtual void UpdateHistoryForNavigation(const GURL& url,
const ViewHostMsg_FrameNavigate_Params& params) { }
virtual bool NavigateToPendingEntry(bool reload);
diff --git a/chrome/browser/dom_ui/fileicon_source.cc b/chrome/browser/dom_ui/fileicon_source.cc
index c2f75c4..d1e507c 100644
--- a/chrome/browser/dom_ui/fileicon_source.cc
+++ b/chrome/browser/dom_ui/fileicon_source.cc
@@ -41,7 +41,7 @@ void FileIconSource::StartDataRequest(const std::string& path,
SendResponse(request_id, icon_data);
} else {
// Icon was not in cache, go fetch it slowly.
- IconManager::Handle h = im->LoadIcon(UTF8ToWide(escaped_path),
+ IconManager::Handle h = im->LoadIcon(UTF8ToWide(escaped_path),
IconLoader::NORMAL,
&cancelable_consumer_,
NewCallback(this, &FileIconSource::OnFileIconDataAvailable));
@@ -66,4 +66,4 @@ void FileIconSource::OnFileIconDataAvailable(IconManager::Handle handle,
// TODO(glen): send a dummy icon.
SendResponse(request_id, NULL);
}
-} \ No newline at end of file
+}
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index 9bc5d61..6e09592 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -186,7 +186,7 @@ void BrowsingHistoryHandler::HandleDeleteDay(const Value* value) {
dom_ui_->CallJavascriptFunction(L"deleteFailed");
return;
}
-
+
// Anything in-flight is invalid.
cancelable_consumer_.CancelAllRequests();
@@ -254,7 +254,7 @@ void BrowsingHistoryHandler::QueryComplete(
base::TimeFormatShortDate(page.visit_time()));
page_value->SetString(L"snippet", page.snippet().text());
}
- page_value->SetBoolean(L"starred",
+ page_value->SetBoolean(L"starred",
dom_ui_->get_profile()->GetBookmarkModel()->IsBookmarked(page.url()));
results_value.Append(page_value);
}
diff --git a/chrome/browser/dom_ui/history_ui.h b/chrome/browser/dom_ui/history_ui.h
index cc643b1..0902322 100644
--- a/chrome/browser/dom_ui/history_ui.h
+++ b/chrome/browser/dom_ui/history_ui.h
@@ -60,8 +60,8 @@ class BrowsingHistoryHandler : public DOMMessageHandler,
history::QueryResults* results);
// Extract the arguments from the call to HandleSearchHistory.
- void ExtractSearchHistoryArguments(const Value* value,
- int* month,
+ void ExtractSearchHistoryArguments(const Value* value,
+ int* month,
std::wstring* query);
// Figure out the query options for a month-wide query.
@@ -72,7 +72,7 @@ class BrowsingHistoryHandler : public DOMMessageHandler,
// Browsing history remover
scoped_ptr<BrowsingDataRemover> remover_;
-
+
// Our consumer for the history service.
CancelableRequestConsumerTSimple<PageUsageData*> cancelable_consumer_;
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index 98b0abe..c5a3c27 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -228,8 +228,8 @@ class HistoryHandler : public DOMMessageHandler {
// Let the page contents record UMA actions. Only use when you can't do it from
// C++. For example, we currently use it to let the NTP log the postion of the
-// Most Visited or Bookmark the user clicked on, as we don't get that
-// information through RequestOpenURL. You will need to update the metrics
+// Most Visited or Bookmark the user clicked on, as we don't get that
+// information through RequestOpenURL. You will need to update the metrics
// dashboard with the action names you use, as our processor won't catch that
// information (treat it as RecordComputedMetrics)
class MetricsHandler : public DOMMessageHandler {
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h
index 9a94e52..de1f3ab 100644
--- a/chrome/browser/download/download_manager.h
+++ b/chrome/browser/download/download_manager.h
@@ -378,7 +378,7 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
return FilePath::FromWStringHack(*download_path_);
}
- // Clears the last download path, used to initialize "save as" dialogs.
+ // Clears the last download path, used to initialize "save as" dialogs.
void ClearLastDownloadPath();
// Registers this file extension for automatic opening upon download
@@ -480,7 +480,7 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
// Renames a finished dangerous download from its temporary file name to its
// real file name.
// Invoked on the file thread.
- void ProceedWithFinishedDangerousDownload(int64 download_handle,
+ void ProceedWithFinishedDangerousDownload(int64 download_handle,
const FilePath& path,
const FilePath& original_name);
@@ -512,7 +512,7 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
// is the ID assigned by the ResourceDispatcherHost and the map does not own
// the DownloadItems. It is used on shutdown to delete completed downloads
// that have not been approved.
- //
+ //
// When a download is created through a user action, the corresponding
// DownloadItem* is placed in 'in_progress_' and remains there until it has
// received a valid handle from the history system. Once it has a valid
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index d8ceb41..7a1dd02 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -1051,7 +1051,7 @@ bool SavePackage::GetSaveInfo(const FilePath& suggest_name,
if (param->save_type == SavePackage::SAVE_AS_COMPLETE_HTML) {
// Make new directory for saving complete file.
param->dir = param->dir.Append(
- param->saved_main_file_path.RemoveExtension().BaseName().value() +
+ param->saved_main_file_path.RemoveExtension().BaseName().value() +
FILE_PATH_LITERAL("_files"));
}
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 5611594..32492cc 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -371,7 +371,7 @@ DictionaryValue* ExtensionsServiceBackend::ReadManifest(
}
if (header.header_size > sizeof(ExtensionHeader))
fseek(file.get(), header.header_size - sizeof(ExtensionHeader), SEEK_CUR);
-
+
char buf[1 << 16];
std::string manifest_str;
size_t read_size = std::min(sizeof(buf), header.manifest_size);
@@ -495,7 +495,7 @@ bool ExtensionsServiceBackend::CheckCurrentVersion(
// has actually loaded successfully.
FilePath version_dir = dest_dir.AppendASCII(current_version_str);
if (file_util::PathExists(version_dir)) {
- ReportExtensionInstallError(dest_dir,
+ ReportExtensionInstallError(dest_dir,
"Existing version is already up to date.");
return false;
}
@@ -503,7 +503,7 @@ bool ExtensionsServiceBackend::CheckCurrentVersion(
return true;
}
-bool ExtensionsServiceBackend::InstallDirSafely(const FilePath& source_dir,
+bool ExtensionsServiceBackend::InstallDirSafely(const FilePath& source_dir,
const FilePath& dest_dir) {
if (file_util::PathExists(dest_dir)) {
@@ -564,13 +564,13 @@ bool ExtensionsServiceBackend::SetCurrentVersion(const FilePath& dest_dir,
// Restore the old CurrentVersion.
if (file_util::PathExists(current_version_old)) {
if (!file_util::Move(current_version_old, current_version)) {
- LOG(WARNING) << "couldn't restore " << current_version_old.value() <<
+ LOG(WARNING) << "couldn't restore " << current_version_old.value() <<
" to " << current_version.value();
// TODO(erikkay): This is an ugly state to be in. Try harder?
}
}
- ReportExtensionInstallError(dest_dir,
+ ReportExtensionInstallError(dest_dir,
"Couldn't create CurrentVersion file.");
return false;
}
@@ -616,7 +616,7 @@ bool ExtensionsServiceBackend::InstallOrUpdateExtension(
// If an expected id was provided, make sure it matches.
if (expected_id.length() && expected_id != extension.id()) {
- ReportExtensionInstallError(source_file,
+ ReportExtensionInstallError(source_file,
"ID in new extension manifest does not match expected ID.");
return false;
}
@@ -646,7 +646,7 @@ bool ExtensionsServiceBackend::InstallOrUpdateExtension(
ScopedTempDir scoped_temp;
scoped_temp.Set(temp_dir);
if (!scoped_temp.IsValid()) {
- ReportExtensionInstallError(source_file,
+ ReportExtensionInstallError(source_file,
"Couldn't create temporary directory.");
return false;
}
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index be3158c..56e0afa 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -137,7 +137,7 @@ class ExtensionsServiceBackend
scoped_refptr<ExtensionsServiceFrontendInterface> frontend);
// Check externally updated extensions for updates and install if necessary.
- // Errors are reported through ExtensionErrorReporter.
+ // Errors are reported through ExtensionErrorReporter.
// ReportExtensionInstalled is called on success.
void CheckForExternalUpdates(
scoped_refptr<ExtensionsServiceFrontendInterface> frontend);
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index c37e1bb..c6ac773 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -155,7 +155,7 @@ base::SharedMemory* UserScriptMaster::ScriptReloader::GetNewScripts(
file = enumerator.Next()) {
all_scripts.push_back(UserScript());
UserScript& info = all_scripts.back();
- info.set_url(GURL(std::string(chrome::kUserScriptScheme) + ":/" +
+ info.set_url(GURL(std::string(chrome::kUserScriptScheme) + ":/" +
net::FilePathToFileURL(file.ToWStringHack()).ExtractFileName()));
info.set_path(file);
}
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc
index e637a16..416afe2 100644
--- a/chrome/browser/external_tab_container.cc
+++ b/chrome/browser/external_tab_container.cc
@@ -283,7 +283,7 @@ void ExternalTabContainer::Observe(NotificationType type,
const NavigationController::LoadCommittedDetails* commit =
Details<NavigationController::LoadCommittedDetails>(details).ptr();
- if (commit->http_status_code >= kHttpClientErrorStart &&
+ if (commit->http_status_code >= kHttpClientErrorStart &&
commit->http_status_code <= kHttpServerErrorEnd) {
automation_->Send(new AutomationMsg_NavigationFailed(
0, commit->http_status_code, commit->entry->url()));
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc
index 34d94e1..66d6d74 100644
--- a/chrome/browser/first_run.cc
+++ b/chrome/browser/first_run.cc
@@ -83,7 +83,7 @@ bool GetBackupChromeFile(std::wstring* path) {
return true;
}
-std::wstring GetDefaultPrefFilePath(bool create_profile_dir,
+std::wstring GetDefaultPrefFilePath(bool create_profile_dir,
const std::wstring& user_data_dir) {
FilePath default_pref_dir = ProfileManager::GetDefaultProfileDir(
FilePath::FromWStringHack(user_data_dir));
@@ -218,7 +218,7 @@ bool FirstRun::ProcessMasterPreferences(
// result determines if we continue or not. We wait here until the user
// dismisses the dialog.
int retcode = 0;
- if (!LaunchSetupWithParam(installer_util::switches::kShowEula, &retcode) ||
+ if (!LaunchSetupWithParam(installer_util::switches::kShowEula, &retcode) ||
(retcode == installer_util::EULA_REJECTED)) {
LOG(WARNING) << "EULA rejected. Fast exit.";
::ExitProcess(1);
@@ -457,7 +457,7 @@ class FirstRunImportObserver : public ImportObserver {
import_result_ = ResultCodes::NORMAL_EXIT;
Finish();
}
-
+
void RunLoop() {
loop_running_ = true;
MessageLoop::current()->Run();
diff --git a/chrome/browser/gears_integration.cc b/chrome/browser/gears_integration.cc
index 4017899..f60148c 100644
--- a/chrome/browser/gears_integration.cc
+++ b/chrome/browser/gears_integration.cc
@@ -134,7 +134,7 @@ static GURL ConvertSkBitmapToDataURL(const SkBitmap& icon) {
class CreateShortcutCommand : public CPCommandInterface {
public:
CreateShortcutCommand(
- const std::string& name, const std::string& orig_name,
+ const std::string& name, const std::string& orig_name,
const std::string& url, const std::string& description,
const std::vector<webkit_glue::WebApplicationInfo::IconInfo> &icons,
const SkBitmap& fallback_icon,
diff --git a/chrome/browser/google_update.cc b/chrome/browser/google_update.cc
index 17f30b3..70ee2ab 100644
--- a/chrome/browser/google_update.cc
+++ b/chrome/browser/google_update.cc
@@ -35,7 +35,7 @@ bool CanUpdateCurrentChrome(const std::wstring& chrome_exe_path) {
user_exe_path.begin(), tolower);
std::transform(machine_exe_path.begin(), machine_exe_path.end(),
machine_exe_path.begin(), tolower);
- if (chrome_exe_path != user_exe_path &&
+ if (chrome_exe_path != user_exe_path &&
chrome_exe_path != machine_exe_path ) {
LOG(ERROR) << L"Google Update cannot update Chrome installed in a "
<< L"non-standard location: " << chrome_exe_path.c_str()
diff --git a/chrome/browser/history/query_parser.cc b/chrome/browser/history/query_parser.cc
index 3ebaad9..cb9cf40 100644
--- a/chrome/browser/history/query_parser.cc
+++ b/chrome/browser/history/query_parser.cc
@@ -291,7 +291,7 @@ void QueryParser::ExtractQueryWords(const std::wstring& query,
QueryNodeList root;
if (!ParseQueryImpl(query, &root))
return;
- root.AppendWords(words);
+ root.AppendWords(words);
}
bool QueryParser::DoesQueryMatch(const std::wstring& text,
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index d133d22..2feea81 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -230,7 +230,7 @@ void TextDatabaseManager::AddPageContents(const GURL& url,
// took more than kExpirationSec to load. Often, this will be the result of
// a very slow iframe or other resource on the page that makes us think its
// still loading.
- //
+ //
// As a fallback, set the most recent visit's contents using the input, and
// use the last set title in the URL table as the title to index.
URLRow url_row;
diff --git a/chrome/browser/history/url_database_unittest.cc b/chrome/browser/history/url_database_unittest.cc
index a33829a..1ee1351 100644
--- a/chrome/browser/history/url_database_unittest.cc
+++ b/chrome/browser/history/url_database_unittest.cc
@@ -28,7 +28,7 @@ bool IsURLRowEqual(const URLRow& a,
a.last_visit() - b.last_visit() <= TimeDelta::FromSeconds(1) &&
a.hidden() == b.hidden();
}
-
+
} // namespace
class URLDatabaseTest : public testing::Test,
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index 8dfddd2..d1dbe05 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -140,7 +140,7 @@ void Firefox2Importer::ImportBookmarksFile(
file_util::ReadFileToString(file_path, &content);
std::vector<std::string> lines;
SplitString(content, '\n', &lines);
-
+
std::vector<ProfileWriter::BookmarkEntry> toolbar_bookmarks;
std::wstring last_folder = first_folder_name;
bool last_folder_on_toolbar = false;
diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h
index e9b83c5..f4f4f07 100644
--- a/chrome/browser/importer/importer.h
+++ b/chrome/browser/importer/importer.h
@@ -106,7 +106,7 @@ class ProfileWriter : public base::RefCounted<ProfileWriter> {
#endif
virtual void AddHistoryPage(const std::vector<history::URLRow>& page);
virtual void AddHomepage(const GURL& homepage);
- // Adds the bookmarks to the BookmarkModel.
+ // Adds the bookmarks to the BookmarkModel.
// |options| is a bitmask of BookmarkOptions and dictates how and
// which bookmarks are added. If the bitmask contains FIRST_RUN,
// then any entries with a value of true for in_toolbar are added to
@@ -385,7 +385,7 @@ class Importer : public base::RefCounted<Importer> {
// The importer should know the main thread so that ProfileWriter
// will be invoked in thread instead.
MessageLoop* main_loop_;
-
+
// The message loop in which the importer operates.
MessageLoop* delagate_loop_;
diff --git a/chrome/browser/navigation_controller_unittest.cc b/chrome/browser/navigation_controller_unittest.cc
index 0bdd613..3dd303d 100644
--- a/chrome/browser/navigation_controller_unittest.cc
+++ b/chrome/browser/navigation_controller_unittest.cc
@@ -396,7 +396,7 @@ TEST_F(NavigationControllerTest, LoadURL_NoPending) {
contents->CompleteNavigationAsRenderer(0, kExistingURL1);
EXPECT_TRUE(notifications.Check1AndReset(
NotificationType::NAV_ENTRY_COMMITTED));
-
+
// Do a new navigation without making a pending one.
const GURL kNewURL(scheme1() + ":see");
contents->CompleteNavigationAsRenderer(99, kNewURL);
@@ -708,7 +708,7 @@ TEST_F(NavigationControllerTest, Back_OtherBackPending) {
// Not synthesize a totally new back event to the first page. This will not
// match the pending one.
contents->CompleteNavigationAsRenderer(0, kUrl1);
-
+
// The navigation should not have affected the pending entry.
EXPECT_EQ(1, contents->controller()->GetPendingEntryIndex());
@@ -1172,7 +1172,7 @@ TEST_F(NavigationControllerTest, SwitchTypesCleanup) {
// Now that the tasks have been flushed, the first tab type should be gone.
ASSERT_TRUE(
contents->controller()->GetTabContents(type1()) == NULL);
- ASSERT_EQ(contents,
+ ASSERT_EQ(contents,
contents->controller()->GetTabContents(type2()));
}
@@ -1444,7 +1444,7 @@ TEST_F(NavigationControllerTest, TransientEntry) {
// We should have navigated, transient entry should be gone.
EXPECT_EQ(url2, contents->controller()->GetActiveEntry()->url());
EXPECT_EQ(contents->controller()->GetEntryCount(), 3);
-
+
// Add a transient again, then navigate with no pending entry this time.
transient_entry = new NavigationEntry(TAB_CONTENTS_WEB);
transient_entry->set_url(transient_url);
@@ -1477,7 +1477,7 @@ TEST_F(NavigationControllerTest, TransientEntry) {
EXPECT_EQ(url4, contents->controller()->GetActiveEntry()->url());
EXPECT_EQ(contents->controller()->GetEntryCount(), 5);
contents->CompleteNavigationAsRenderer(3, url3);
-
+
// Add a transient and go to an entry before the current one.
transient_entry = new NavigationEntry(TAB_CONTENTS_WEB);
transient_entry->set_url(transient_url);
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 351107a..a33716e 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -187,7 +187,7 @@ ChromeURLRequestContext::ChromeURLRequestContext(Profile* profile)
user_script_dir_path_ = profile->GetUserScriptMaster()->user_script_dir();
prefs_->AddPrefObserver(prefs::kAcceptLanguages, this);
- prefs_->AddPrefObserver(prefs::kCookieBehavior, this);
+ prefs_->AddPrefObserver(prefs::kCookieBehavior, this);
NotificationService::current()->AddObserver(
this, NotificationType::EXTENSIONS_LOADED,
diff --git a/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc b/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc
index a1b8d70..7dba1db 100644
--- a/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc
+++ b/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc
@@ -36,7 +36,7 @@ class MockProxyResolver : public net::ProxyResolver {
results->UseNamedProxy(query_url.host());
return net::OK;
}
-
+
void Block() {
is_blocked_ = true;
event_.Reset();
@@ -78,7 +78,7 @@ struct ResultFuture {
bool TimedWaitUntilDone(const base::TimeDelta& max_time) {
return completed_.TimedWait(max_time);
}
-
+
// These fields are only valid after returning from WaitUntilDone().
IPC::Message* reply_msg;
int error_code;
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index e961904..ae6e672 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -32,7 +32,7 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
form_to_save_(form_to_save) {
}
- virtual ~SavePasswordInfoBarDelegate() { }
+ virtual ~SavePasswordInfoBarDelegate() { }
// Overridden from ConfirmInfoBarDelegate:
virtual void InfoBarClosed() {
@@ -72,7 +72,7 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
form_to_save_->PermanentlyBlacklist();
return true;
}
-
+
private:
// The PasswordFormManager managing the form we're asking the user about,
// and should update as per her decision.
@@ -172,7 +172,7 @@ void PasswordManager::DidStopLoading() {
if (provisional_save_manager_->IsNewLogin()) {
web_contents_->AddInfoBar(
new SavePasswordInfoBarDelegate(web_contents_,
- provisional_save_manager_.release()));
+ provisional_save_manager_.release()));
} else {
// If the save is not a new username entry, then we just want to save this
// data (since the user already has related data saved), so don't prompt.
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index 96171fe..2ded7d2 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -34,7 +34,7 @@ class PasswordManager : public views::LoginModel {
const PasswordFormMap& best_matches,
const PasswordForm* const preferred_match) const;
- // Notification that the user navigated away from the current page.
+ // Notification that the user navigated away from the current page.
// Unless this is a password form submission, for our purposes this
// means we're done with the current page, so we can clean-up.
void DidNavigate();
@@ -59,10 +59,10 @@ class PasswordManager : public views::LoginModel {
observer_ = observer;
}
- private:
+ private:
// Note about how a PasswordFormManager can transition from
// pending_login_managers_ to provisional_save_manager_ and the infobar.
- //
+ //
// 1. form "seen"
// | new
// | ___ Infobar
diff --git a/chrome/browser/printing/page_number_unittest.cc b/chrome/browser/printing/page_number_unittest.cc
index 2656b86..c25e1bc 100644
--- a/chrome/browser/printing/page_number_unittest.cc
+++ b/chrome/browser/printing/page_number_unittest.cc
@@ -16,7 +16,7 @@ TEST(PageNumberTest, Count) {
++page;
EXPECT_EQ(1, page.ToInt());
EXPECT_NE(printing::PageNumber::npos(), page);
-
+
printing::PageNumber page_copy(page);
EXPECT_EQ(1, page_copy.ToInt());
EXPECT_EQ(1, page.ToInt());
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 979c263..3edd32d 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -373,10 +373,10 @@ void ProfileImpl::InitExtensions() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
PrefService* prefs = GetPrefs();
bool user_scripts_enabled =
- command_line->HasSwitch(switches::kEnableUserScripts) ||
+ command_line->HasSwitch(switches::kEnableUserScripts) ||
prefs->GetBoolean(prefs::kEnableUserScripts);
bool extensions_enabled =
- command_line->HasSwitch(switches::kEnableExtensions) ||
+ command_line->HasSwitch(switches::kEnableExtensions) ||
prefs->GetBoolean(prefs::kEnableExtensions);
FilePath script_dir;
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h
index 8c93886..7e48419 100644
--- a/chrome/browser/profile.h
+++ b/chrome/browser/profile.h
@@ -217,7 +217,7 @@ class Profile {
virtual void ResetTabRestoreService() = 0;
- // This reinitializes the spellchecker according to the current dictionary
+ // This reinitializes the spellchecker according to the current dictionary
// language, and enable spell check option, in the prefs.
virtual void ReinitializeSpellChecker() = 0;
@@ -230,7 +230,7 @@ class Profile {
//
// NOTE: this is invoked internally on a normal shutdown, but is public so
// that it can be invoked when the user logs out/powers down (WM_ENDSESSION).
- virtual void MarkAsCleanShutdown() = 0;
+ virtual void MarkAsCleanShutdown() = 0;
virtual void InitExtensions() = 0;
@@ -305,7 +305,7 @@ class ProfileImpl : public Profile,
// NotificationObserver implementation.
virtual void Observe(NotificationType type,
const NotificationSource& source,
- const NotificationDetails& details);
+ const NotificationDetails& details);
private:
friend class Profile;
@@ -316,20 +316,20 @@ class ProfileImpl : public Profile,
FilePath GetPrefFilePath();
void StopCreateSessionServiceTimer();
-
+
void EnsureSessionServiceCreated() {
GetSessionService();
}
// Initializes the spellchecker. If the spellchecker already exsts, then
- // it is released, and initialized again. This model makes sure that
+ // it is released, and initialized again. This model makes sure that
// spellchecker language can be changed without restarting the browser.
// NOTE: This is being currently called in the UI thread, which is OK as long
// as the spellchecker object is USED in the IO thread.
// The |need_to_broadcast| parameter tells it whether to broadcast the new
// spellchecker to the resource message filters.
void InitializeSpellChecker(bool need_to_broadcast);
-
+
FilePath path_;
bool off_the_record_;
scoped_ptr<VisitedLinkMaster> visited_link_master_;
diff --git a/chrome/browser/profile_manager_unittest.cc b/chrome/browser/profile_manager_unittest.cc
index be505d0..ed47ef0 100644
--- a/chrome/browser/profile_manager_unittest.cc
+++ b/chrome/browser/profile_manager_unittest.cc
@@ -28,7 +28,7 @@ protected:
ASSERT_TRUE(file_util::Delete(test_dir_, true));
ASSERT_FALSE(file_util::PathExists(test_dir_));
}
-
+
MessageLoopForUI message_loop_;
// the path to temporary directory used to contain the test operations
diff --git a/chrome/browser/renderer_host/audio_renderer_host_unittest.cc b/chrome/browser/renderer_host/audio_renderer_host_unittest.cc
index 2942dac..8efa3e34 100644
--- a/chrome/browser/renderer_host/audio_renderer_host_unittest.cc
+++ b/chrome/browser/renderer_host/audio_renderer_host_unittest.cc
@@ -20,7 +20,7 @@ class AudioRendererHostTest : public testing::Test {
// This task post a task to message_loop_ to do internal destruction on
// message_loop_.
host_->Destroy();
- // We need to continue running message_loop_ to complete all destructions.
+ // We need to continue running message_loop_ to complete all destructions.
message_loop_->RunAllPending();
}
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index 6439a14..e1144c2 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -94,7 +94,7 @@ bool BufferedResourceHandler::OnWillRead(int request_id, net::IOBuffer** buf,
bool ret = real_handler_->OnWillRead(request_id, buf, buf_size, min_size);
read_buffer_ = *buf;
read_buffer_size_ = *buf_size;
- DCHECK(read_buffer_size_ >= kMaxBytesToSniff * 2);
+ DCHECK(read_buffer_size_ >= kMaxBytesToSniff * 2);
bytes_read_ = 0;
return ret;
}
diff --git a/chrome/browser/renderer_host/render_view_host_unittest.cc b/chrome/browser/renderer_host/render_view_host_unittest.cc
index 564810c..237b228 100644
--- a/chrome/browser/renderer_host/render_view_host_unittest.cc
+++ b/chrome/browser/renderer_host/render_view_host_unittest.cc
@@ -1,17 +1,17 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/renderer_host/test_render_view_host.h"
-#include "chrome/browser/tab_contents/navigation_entry.h"
-
-class RenderViewHostTest : public RenderViewHostTestHarness {
-};
-
-// All about URLs reported by the renderer should get rewritten to about:blank.
-// See RenderViewHost::OnMsgNavigate for a discussion.
-TEST_F(RenderViewHostTest, FilterAbout) {
- rvh()->SendNavigate(1, GURL("about:cache"));
- ASSERT_TRUE(controller_->GetActiveEntry());
- EXPECT_EQ(GURL("about:blank"), controller_->GetActiveEntry()->url());
-}
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/renderer_host/test_render_view_host.h"
+#include "chrome/browser/tab_contents/navigation_entry.h"
+
+class RenderViewHostTest : public RenderViewHostTestHarness {
+};
+
+// All about URLs reported by the renderer should get rewritten to about:blank.
+// See RenderViewHost::OnMsgNavigate for a discussion.
+TEST_F(RenderViewHostTest, FilterAbout) {
+ rvh()->SendNavigate(1, GURL("about:cache"));
+ ASSERT_TRUE(controller_->GetActiveEntry());
+ EXPECT_EQ(GURL("about:blank"), controller_->GetActiveEntry()->url());
+}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index 54819e1..54ff098 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -48,11 +48,11 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
// deleted it will delete this out from under the caller.
explicit RenderWidgetHostViewMac(RenderWidgetHost* widget);
virtual ~RenderWidgetHostViewMac();
-
+
RenderWidgetHost* render_widget_host() const { return render_widget_host_; }
-
+
base::TimeTicks& whiteout_start_time() { return whiteout_start_time_; }
-
+
gfx::NativeView native_view() const { return cocoa_view_; }
// Implementation of RenderWidgetHostView:
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index e8d9c25..85e29cc 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -142,13 +142,13 @@ void RenderWidgetHostViewMac::UpdateCursorIfOverSelf() {
NSEvent* event = [[cocoa_view_ window] currentEvent];
if ([event window] != [cocoa_view_ window])
return;
-
+
NSPoint event_location = [event locationInWindow];
NSPoint local_point = [cocoa_view_ convertPoint:event_location fromView:nil];
-
+
if (!NSPointInRect(local_point, [cocoa_view_ bounds]))
return;
-
+
NSCursor* ns_cursor = current_cursor_.GetCursor();
[ns_cursor set];
}
@@ -181,7 +181,7 @@ void RenderWidgetHostViewMac::DidScrollRect(
[cocoa_view_ scrollRect:[cocoa_view_ RectToNSRect:rect]
by:NSMakeSize(dx, -dy)];
-
+
gfx::Rect new_rect = rect;
new_rect.Offset(dx, dy);
gfx::Rect dirty_rect = rect.Subtract(new_rect);
@@ -240,7 +240,7 @@ void RenderWidgetHostViewMac::ShutdownHost() {
- (void)dealloc {
delete renderWidgetHostView_;
-
+
[super dealloc];
}
@@ -289,7 +289,7 @@ void RenderWidgetHostViewMac::ShutdownHost() {
canvas->getTopPlatformDevice().DrawToContext(
context, damaged_rect_ns.origin.x, damaged_rect_ns.origin.y,
&damaged_rect_cg);
-
+
[self unlockFocus];
}
}
@@ -341,13 +341,13 @@ void RenderWidgetHostViewMac::ShutdownHost() {
- (BOOL)becomeFirstResponder {
renderWidgetHostView_->render_widget_host()->Focus();
-
+
return YES;
}
- (BOOL)resignFirstResponder {
renderWidgetHostView_->render_widget_host()->Blur();
-
+
return YES;
}
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index 452798e..a64463f 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.h
@@ -247,7 +247,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
int pending_requests() const {
return static_cast<int>(pending_requests_.size());
}
-
+
// Intended for unit-tests only. Returns the memory cost of all the
// outstanding requests (pending and blocked) for |render_process_host_id|.
int GetOutstandingRequestsMemoryCost(int render_process_host_id) const;
@@ -412,7 +412,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
// data structures supporting this request (URLRequest object,
// HttpNetworkTransaction, etc...).
// The value of |cost| is added to the running total, and the resulting
- // sum is returned.
+ // sum is returned.
int IncrementOutstandingRequestsMemoryCost(int cost,
int render_process_host_id);
@@ -508,7 +508,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
typedef std::map<ProcessRendererIDs, BlockedRequestsList*> BlockedRequestMap;
BlockedRequestMap blocked_requests_map_;
- // Maps the render_process_host_ids to the approximate number of bytes
+ // Maps the render_process_host_ids to the approximate number of bytes
// being used to service its resource requests. No entry implies 0 cost.
typedef std::map<int, int> OutstandingRequestsMemoryCostMap;
OutstandingRequestsMemoryCostMap outstanding_requests_memory_cost_map_;
diff --git a/chrome/browser/renderer_host/test_render_view_host.h b/chrome/browser/renderer_host/test_render_view_host.h
index a925c67..5f558b1 100644
--- a/chrome/browser/renderer_host/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test_render_view_host.h
@@ -69,7 +69,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
virtual void PrepareToDestroy() {}
virtual void SetTooltipText(const std::wstring& tooltip_text) {}
virtual BackingStore* AllocBackingStore(const gfx::Size& size);
-
+
bool is_showing() const { return is_showing_; }
private:
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index 84ba46f..b310d57 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -109,11 +109,11 @@ bool LoadRLZLibrary(int directory_key) {
bool SendFinancialPing(const wchar_t* brand, const wchar_t* lang,
const wchar_t* referral, bool exclude_id) {
- RLZTracker::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX,
+ RLZTracker::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX,
RLZTracker::CHROME_HOME_PAGE,
RLZTracker::NO_ACCESS_POINT};
if (!send_ping)
- return false;
+ return false;
return send_ping(RLZTracker::CHROME, points, L"chrome", brand, referral, lang,
exclude_id, NULL);
}
@@ -138,7 +138,7 @@ class OmniBoxUsageObserver : public NotificationObserver {
// attempt the ping.
if (!RLZTracker::RecordProductEvent(RLZTracker::CHROME,
RLZTracker::CHROME_OMNIBOX,
- RLZTracker::FIRST_SEARCH))
+ RLZTracker::FIRST_SEARCH))
omnibox_used_ = true;
delete this;
}
@@ -156,7 +156,7 @@ class OmniBoxUsageObserver : public NotificationObserver {
// Dtor is private so the object cannot be created on the stack.
~OmniBoxUsageObserver() {
NotificationService::current()->RemoveObserver(this,
- NotificationType::OMNIBOX_OPENED_URL,
+ NotificationType::OMNIBOX_OPENED_URL,
NotificationService::AllSources());
instance_ = NULL;
}
@@ -249,7 +249,7 @@ class DelayedInitTask : public Task {
if (OmniBoxUsageObserver::used()) {
RLZTracker::RecordProductEvent(RLZTracker::CHROME,
RLZTracker::CHROME_OMNIBOX,
- RLZTracker::FIRST_SEARCH);
+ RLZTracker::FIRST_SEARCH);
}
}
// Schedule the daily RLZ ping.
diff --git a/chrome/browser/safe_browsing/protocol_parser_unittest.cc b/chrome/browser/safe_browsing/protocol_parser_unittest.cc
index 289df72..bc37118 100644
--- a/chrome/browser/safe_browsing/protocol_parser_unittest.cc
+++ b/chrome/browser/safe_browsing/protocol_parser_unittest.cc
@@ -507,7 +507,7 @@ TEST(SafeBrowsingProtocolParsingTest, TestGetHashWithUnknownList) {
&full_hashes));
EXPECT_EQ(full_hashes.size(), static_cast<size_t>(1));
- EXPECT_EQ(memcmp("12345678901234567890123456789012",
+ EXPECT_EQ(memcmp("12345678901234567890123456789012",
&full_hashes[0].hash, sizeof(SBFullHash)), 0);
EXPECT_EQ(full_hashes[0].list_name, "goog-phish-shavar");
EXPECT_EQ(full_hashes[0].add_chunk_id, 1);
@@ -522,11 +522,11 @@ TEST(SafeBrowsingProtocolParsingTest, TestGetHashWithUnknownList) {
&full_hashes));
EXPECT_EQ(full_hashes.size(), static_cast<size_t>(2));
- EXPECT_EQ(memcmp("12345678901234567890123456789012",
+ EXPECT_EQ(memcmp("12345678901234567890123456789012",
&full_hashes[0].hash, sizeof(SBFullHash)), 0);
EXPECT_EQ(full_hashes[0].list_name, "goog-phish-shavar");
EXPECT_EQ(full_hashes[0].add_chunk_id, 1);
- EXPECT_EQ(memcmp("abcdefghijklmnopqrstuvwxyz123457",
+ EXPECT_EQ(memcmp("abcdefghijklmnopqrstuvwxyz123457",
&full_hashes[1].hash, sizeof(SBFullHash)), 0);
EXPECT_EQ(full_hashes[1].list_name, "goog-malware-shavar");
EXPECT_EQ(full_hashes[1].add_chunk_id, 7);
@@ -632,7 +632,7 @@ TEST(SafeBrowsingProtocolParsingTest, TestZeroSizeAddChunk) {
EXPECT_EQ(chunks[1].chunk_number, 2);
EXPECT_EQ(chunks[1].hosts.size(), static_cast<size_t>(0));
-
+
EXPECT_EQ(chunks[2].chunk_number, 3);
EXPECT_EQ(chunks[2].hosts.size(), static_cast<size_t>(1));
EXPECT_EQ(chunks[2].hosts[0].host, 0x65666163);
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
index e69ae04..a05933d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
@@ -870,7 +870,7 @@ bool SafeBrowsingDatabaseBloom::BuildAddPrefixList(SBPair* adds) {
}
bool SafeBrowsingDatabaseBloom::RemoveSubs(
- SBPair* adds, std::vector<bool>* adds_removed,
+ SBPair* adds, std::vector<bool>* adds_removed,
HashCache* add_cache, HashCache* sub_cache, int* subs) {
DCHECK(add_cache && sub_cache && subs);
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 4acdf3a..03a372d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -943,7 +943,7 @@ TEST(SafeBrowsingDatabase, HashCaching) {
database->UpdateFinished(true);
EXPECT_TRUE(database->ContainsUrl(GURL("http://www.fullevil.com/bad1.html"),
- &listname, &prefixes, &full_hashes,
+ &listname, &prefixes, &full_hashes,
Time::Now()));
EXPECT_EQ(full_hashes.size(), 1U);
EXPECT_EQ(0, memcmp(full_hashes[0].hash.full_hash,
@@ -954,7 +954,7 @@ TEST(SafeBrowsingDatabase, HashCaching) {
full_hashes.clear();
EXPECT_TRUE(database->ContainsUrl(GURL("http://www.fullevil.com/bad2.html"),
- &listname, &prefixes, &full_hashes,
+ &listname, &prefixes, &full_hashes,
Time::Now()));
EXPECT_EQ(full_hashes.size(), 1U);
EXPECT_EQ(0, memcmp(full_hashes[0].hash.full_hash,
@@ -986,13 +986,13 @@ TEST(SafeBrowsingDatabase, HashCaching) {
database->UpdateFinished(true);
EXPECT_FALSE(database->ContainsUrl(GURL("http://www.fullevil.com/bad1.html"),
- &listname, &prefixes, &full_hashes,
+ &listname, &prefixes, &full_hashes,
Time::Now()));
EXPECT_EQ(full_hashes.size(), 0U);
// There should be one remaining full add.
EXPECT_TRUE(database->ContainsUrl(GURL("http://www.fullevil.com/bad2.html"),
- &listname, &prefixes, &full_hashes,
+ &listname, &prefixes, &full_hashes,
Time::Now()));
EXPECT_EQ(full_hashes.size(), 1U);
EXPECT_EQ(0, memcmp(full_hashes[0].hash.full_hash,
@@ -1010,10 +1010,10 @@ TEST(SafeBrowsingDatabase, HashCaching) {
lists.clear();
EXPECT_FALSE(database->ContainsUrl(GURL("http://www.fullevil.com/bad1.html"),
- &listname, &prefixes, &full_hashes,
+ &listname, &prefixes, &full_hashes,
Time::Now()));
EXPECT_FALSE(database->ContainsUrl(GURL("http://www.fullevil.com/bad2.html"),
- &listname, &prefixes, &full_hashes,
+ &listname, &prefixes, &full_hashes,
Time::Now()));
TearDownTestDatabase(database);
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 04fb702..967ebc6 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -224,7 +224,7 @@ bool SafeBrowsingService::CheckUrlNew(const GURL& url, Client* client) {
bool prefix_match = database_->ContainsUrl(url, &list, &prefix_hits,
&full_hits,
protocol_manager_->last_update());
-
+
UMA_HISTOGRAM_TIMES("SB2.FilterCheck", base::Time::Now() - check_start);
if (!prefix_match)
diff --git a/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc
index 2486117..2c59a66 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_util_unittest.cc
@@ -266,7 +266,7 @@ TEST(SafeBrowsing, HostInfo2) {
// Checks that if we get a sub chunk with one prefix, then get the add chunk
// for that same prefix afterwards, the entry becomes empty.
-TEST(SafeBrowsing, HostInfo3) {
+TEST(SafeBrowsing, HostInfo3) {
SBHostInfo info;
// Add a sub prefix.
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc
index d4fa96c..cee6160 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc
@@ -32,7 +32,7 @@ struct PrepopulatedEngine {
// someone asks. Only entries which need keywords to auto-track a dynamically
// generated search URL should use this.
// If the empty string, the engine has no keyword.
- const wchar_t* const keyword;
+ const wchar_t* const keyword;
const char* const favicon_url; // If NULL, there is no favicon.
const wchar_t* const search_url;
const char* const encoding;
@@ -1978,7 +1978,7 @@ const PrepopulatedEngine yahoo_hk = {
"UTF-8",
// http://history.hk.search.yahoo.com/ac/ac_msearch.php?query={searchTerms}
// returns a JSON with key-value pairs. Setting parameters (ot, of, output)
- // to fxjson, json, or js doesn't help.
+ // to fxjson, json, or js doesn't help.
NULL,
2,
};
@@ -2694,12 +2694,12 @@ int CountryCharsToCountryIDWithUpdate(char c1, char c2) {
c1 = 'R';
c2 = 'S';
}
-
+
// SPECIAL CASE: Timor-Leste changed from 'TP' to 'TL' in 2002. Windows XP
// predates this; we therefore map this value.
if (c1 == 'T' && c2 == 'P')
c2 = 'L';
-
+
return CountryCharsToCountryID(c1, c2);
}
@@ -2711,7 +2711,7 @@ int GeoIDToCountryID(GEOID geo_id) {
const int kISOBufferSize = 3; // Two plus one for the terminator.
wchar_t isobuf[kISOBufferSize] = { 0 };
int retval = GetGeoInfo(geo_id, GEO_ISO2, isobuf, kISOBufferSize, 0);
-
+
if (retval == kISOBufferSize &&
!(isobuf[0] == L'X' && isobuf[1] == L'X'))
return CountryCharsToCountryIDWithUpdate(static_cast<char>(isobuf[0]),
@@ -2725,7 +2725,7 @@ int GeoIDToCountryID(GEOID geo_id) {
return CountryCharsToCountryID('J', 'E');
case 0x3B16: // Isle of Man
return CountryCharsToCountryID('I', 'M');
-
+
// 'UM' (U.S. Minor Outlying Islands)
case 0x7F: // Johnston Atoll
case 0x102: // Wake Island
@@ -2762,7 +2762,7 @@ int GeoIDToCountryID(GEOID geo_id) {
int GetCurrentCountryID() {
GEOID geo_id = GetUserGeoID(GEOCLASS_NATION);
-
+
return GeoIDToCountryID(geo_id);
}
diff --git a/chrome/browser/sessions/base_session_service.cc b/chrome/browser/sessions/base_session_service.cc
index 29bbf7b..8423478 100644
--- a/chrome/browser/sessions/base_session_service.cc
+++ b/chrome/browser/sessions/base_session_service.cc
@@ -153,7 +153,7 @@ SessionCommand* BaseSessionService::CreateUpdateTabNavigationCommand(
std::numeric_limits<SessionCommand::size_type>::max() - 1024;
int bytes_written = 0;
-
+
WriteStringToPickle(pickle, &bytes_written, max_state_size,
entry.display_url().spec());
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 780f4f1..5edabd9 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -812,7 +812,7 @@ bool SessionService::CreateTabsAndWindows(
// Update the selected navigation index.
tab->current_navigation_index =
std::max(-1, tab->current_navigation_index - payload.index);
-
+
// And update the index of existing navigations.
for (std::vector<TabNavigation>::iterator i = tab->navigations.begin();
i != tab->navigations.end();) {
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc
index 134a898..b49e3f6 100644
--- a/chrome/browser/sessions/tab_restore_service.cc
+++ b/chrome/browser/sessions/tab_restore_service.cc
@@ -34,7 +34,7 @@ const size_t TabRestoreService::kMaxEntries = 10;
// Identifier for commands written to file.
// The ordering in the file is as follows:
-// . When the user closes a tab a command of type
+// . When the user closes a tab a command of type
// kCommandSelectedNavigationInTab is written identifying the tab and
// the selected index. This is followed by any number of
// kCommandUpdateTabNavigation commands (1 per navigation entry).
diff --git a/chrome/browser/sessions/tab_restore_service_unittest.cc b/chrome/browser/sessions/tab_restore_service_unittest.cc
index bc5aefc..4537c8b 100644
--- a/chrome/browser/sessions/tab_restore_service_unittest.cc
+++ b/chrome/browser/sessions/tab_restore_service_unittest.cc
@@ -118,7 +118,7 @@ TEST_F(TabRestoreServiceTest, Basic) {
// There should be two entries now.
ASSERT_EQ(2, service_->entries().size());
- // Make sure the entry matches
+ // Make sure the entry matches
entry = service_->entries().front();
ASSERT_EQ(TabRestoreService::TAB, entry->type);
tab = static_cast<TabRestoreService::Tab*>(entry);
diff --git a/chrome/browser/tab_contents/infobar_delegate.h b/chrome/browser/tab_contents/infobar_delegate.h
index 271ec00..f4dc667 100644
--- a/chrome/browser/tab_contents/infobar_delegate.h
+++ b/chrome/browser/tab_contents/infobar_delegate.h
@@ -36,7 +36,7 @@ class LinkInfoBarDelegate;
// and the delegate is free to clean itself up or reset state, which may have
// fatal consequences for the InfoBar that was in the process of opening (or is
// now fully opened) -- it is referencing a delegate that may not even exist
-// anymore.
+// anymore.
// As such, it is generally much safer to dedicate a delegate instance to
// AddInfoBar!
class InfoBarDelegate {
@@ -149,7 +149,7 @@ class LinkInfoBarDelegate : public InfoBarDelegate {
// closed now or false if it should remain until the user explicitly closes
// it.
virtual bool LinkClicked(WindowOpenDisposition disposition) {
- return true;
+ return true;
}
// Overridden from InfoBarDelegate:
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index e0ebd23..857068f 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -359,7 +359,7 @@ void InterstitialPage::DidNavigate(
// The RenderViewHost has loaded its contents, we can show it now.
render_view_host_->view()->Show();
- tab_->set_interstitial_page(this);
+ tab_->set_interstitial_page(this);
// Notify the tab we are not loading so the throbber is stopped. It also
// causes a NOTIFY_LOAD_STOP notification, that the AutomationProvider (used
@@ -409,7 +409,7 @@ void InterstitialPage::Disable() {
void InterstitialPage::TakeActionOnResourceDispatcher(
ResourceRequestAction action) {
- DCHECK(MessageLoop::current() == ui_loop_) <<
+ DCHECK(MessageLoop::current() == ui_loop_) <<
"TakeActionOnResourceDispatcher should be called on the main thread.";
if (action == CANCEL || action == RESUME) {
diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h
index d05d0aa..b77d525 100644
--- a/chrome/browser/tab_contents/interstitial_page.h
+++ b/chrome/browser/tab_contents/interstitial_page.h
@@ -185,4 +185,4 @@ class InterstitialPage : public NotificationObserver,
};
#endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_
-
+
diff --git a/chrome/browser/tab_contents/render_view_context_menu_controller.cc b/chrome/browser/tab_contents/render_view_context_menu_controller.cc
index 4afcc86..88ca046 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_controller.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu_controller.cc
@@ -220,7 +220,7 @@ bool RenderViewContextMenuController::IsItemChecked(int id) const {
// Check box for 'Check the Spelling of this field'.
if (id == IDC_CHECK_SPELLING_OF_THIS_FIELD)
return params_.spellcheck_enabled;
-
+
// Don't bother getting the display language vector if this isn't a spellcheck
// language.
if ((id < IDC_SPELLCHECK_LANGUAGES_FIRST) ||
@@ -272,7 +272,7 @@ void RenderViewContextMenuController::ExecuteCommand(int id) {
if (id >= IDC_SPELLCHECK_LANGUAGES_FIRST &&
id < IDC_SPELLCHECK_LANGUAGES_LAST) {
const size_t language_number = id - IDC_SPELLCHECK_LANGUAGES_FIRST;
- SpellChecker::Languages display_languages;
+ SpellChecker::Languages display_languages;
SpellChecker::GetSpellCheckLanguagesToDisplayInContextMenu(
source_web_contents_->profile(), &display_languages);
if (language_number < display_languages.size()) {
@@ -281,7 +281,7 @@ void RenderViewContextMenuController::ExecuteCommand(int id) {
source_web_contents_->profile()->GetPrefs(), NULL);
dictionary_language.SetValue(display_languages[language_number]);
}
-
+
return;
}
@@ -363,7 +363,7 @@ void RenderViewContextMenuController::ExecuteCommand(int id) {
source_web_contents_->profile(),
nav_entry,
source_web_contents_->GetContentNativeView(),
- PageInfoWindow::SECURITY);
+ PageInfoWindow::SECURITY);
break;
}
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc
index b1062bc..1b7b6a5 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager.cc
@@ -148,7 +148,7 @@ bool RenderViewHostManager::ShouldCloseTabOnUnresponsiveRenderer() {
// handler later finishes, this call will be ignored because the state in
// CrossSiteResourceHandler will already be cleaned up.)
current_host()->process()->CrossSiteClosePageACK(
- pending_render_view_host_->site_instance()->process_host_id(),
+ pending_render_view_host_->site_instance()->process_host_id(),
pending_request_id);
}
return false;
@@ -194,7 +194,7 @@ void RenderViewHostManager::OnCrossSiteResponse(int new_render_process_host_id,
// means it is not a download or unsafe page, and we are going to perform the
// navigation. Thus, we no longer need to remember that the RenderViewHost
// is part of a pending cross-site request.
- pending_render_view_host_->SetHasPendingCrossSiteRequest(false,
+ pending_render_view_host_->SetHasPendingCrossSiteRequest(false,
new_request_id);
}
diff --git a/chrome/browser/tab_contents/repost_form_warning.h b/chrome/browser/tab_contents/repost_form_warning.h
index 33588dc..9bbbbaa 100644
--- a/chrome/browser/tab_contents/repost_form_warning.h
+++ b/chrome/browser/tab_contents/repost_form_warning.h
@@ -1,17 +1,17 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
-#define CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
-
-class NavigationController;
-
-// Runs the form repost warning dialog. If the user accepts the action, then
-// it will call Reload on the navigation controller back with check_for_repost
-// set to false.
-//
-// This function is implemented by the platform-specific frontend.
-void RunRepostFormWarningDialog(NavigationController* nav_controller);
-
-#endif // CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
+#define CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
+
+class NavigationController;
+
+// Runs the form repost warning dialog. If the user accepts the action, then
+// it will call Reload on the navigation controller back with check_for_repost
+// set to false.
+//
+// This function is implemented by the platform-specific frontend.
+void RunRepostFormWarningDialog(NavigationController* nav_controller);
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_REPOST_FORM_WARNING_H_
diff --git a/chrome/browser/tab_contents/site_instance.h b/chrome/browser/tab_contents/site_instance.h
index 141f61c..6e25a2b 100644
--- a/chrome/browser/tab_contents/site_instance.h
+++ b/chrome/browser/tab_contents/site_instance.h
@@ -109,7 +109,7 @@ class SiteInstance : public base::RefCounted<SiteInstance> {
// this SiteInstance becomes ref counted, by storing it in a scoped_refptr.
//
// The render process host factory may be NULL. See SiteInstance constructor.
- //
+ //
// TODO(creis): This may be an argument to build a pass_refptr<T> class, as
// Darin suggests.
static SiteInstance* CreateSiteInstance(Profile* profile);
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 1df337c..56db088 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -159,7 +159,7 @@ const string16& TabContents::GetTitle() const {
NavigationEntry* entry = controller_->GetTransientEntry();
if (entry)
return entry->GetTitleForDisplay(controller_);
-
+
entry = controller_->GetLastCommittedEntry();
if (entry)
return entry->GetTitleForDisplay(controller_);
@@ -597,7 +597,7 @@ void TabContents::SetIsLoading(bool is_loading,
NotificationDetails det = details ?
Details<LoadNotificationDetails>(details) :
NotificationService::NoDetails();
- NotificationService::current()->Notify(type,
+ NotificationService::current()->Notify(type,
Source<NavigationController>(this->controller()),
det);
}
diff --git a/chrome/browser/tab_contents/test_web_contents.cc b/chrome/browser/tab_contents/test_web_contents.cc
index 866e28a..2977423 100644
--- a/chrome/browser/tab_contents/test_web_contents.cc
+++ b/chrome/browser/tab_contents/test_web_contents.cc
@@ -1,18 +1,18 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/tab_contents/test_web_contents.h"
-
-#include "chrome/browser/renderer_host/test_render_view_host.h"
-
-TestWebContents::TestWebContents(Profile* profile, SiteInstance* instance,
- RenderViewHostFactory* rvh_factory)
- : WebContents(profile, instance, rvh_factory, MSG_ROUTING_NONE, NULL),
- transition_cross_site(false) {
-}
-
-TestRenderViewHost* TestWebContents::pending_rvh() {
- return static_cast<TestRenderViewHost*>(
- render_manager_.pending_render_view_host_);
-}
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/tab_contents/test_web_contents.h"
+
+#include "chrome/browser/renderer_host/test_render_view_host.h"
+
+TestWebContents::TestWebContents(Profile* profile, SiteInstance* instance,
+ RenderViewHostFactory* rvh_factory)
+ : WebContents(profile, instance, rvh_factory, MSG_ROUTING_NONE, NULL),
+ transition_cross_site(false) {
+}
+
+TestRenderViewHost* TestWebContents::pending_rvh() {
+ return static_cast<TestRenderViewHost*>(
+ render_manager_.pending_render_view_host_);
+}
diff --git a/chrome/browser/tab_contents/test_web_contents.h b/chrome/browser/tab_contents/test_web_contents.h
index ba7fa33..42ba35e 100644
--- a/chrome/browser/tab_contents/test_web_contents.h
+++ b/chrome/browser/tab_contents/test_web_contents.h
@@ -1,55 +1,55 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_TAB_CONTENTS_TEST_WEB_CONTENTS_H_
-#define CHROME_BROWSER_TAB_CONTENTS_TEST_WEB_CONTENTS_H_
-
-#include "chrome/browser/tab_contents/web_contents.h"
-
-class RenderViewHostFactory;
-class TestRenderViewHost;
-
-// Subclass WebContents to ensure it creates TestRenderViewHosts and does
-// not do anything involving views.
-class TestWebContents : public WebContents {
- public:
- // The render view host factory will be passed on to the
- TestWebContents(Profile* profile, SiteInstance* instance,
- RenderViewHostFactory* rvh_factory);
-
- TestRenderViewHost* pending_rvh();
-
- // State accessor.
- bool cross_navigation_pending() {
- return render_manager_.cross_navigation_pending_;
- }
-
- // Overrides WebContents::ShouldTransitionCrossSite so that we can test both
- // alternatives without using command-line switches.
- bool ShouldTransitionCrossSite() { return transition_cross_site; }
-
- // Promote DidNavigate to public.
- void TestDidNavigate(RenderViewHost* render_view_host,
- const ViewHostMsg_FrameNavigate_Params& params) {
- DidNavigate(render_view_host, params);
- }
-
- // Promote GetWebkitPrefs to public.
- WebPreferences TestGetWebkitPrefs() {
- return GetWebkitPrefs();
- }
-
- // Prevent interaction with views.
- bool CreateRenderViewForRenderManager(RenderViewHost* render_view_host) {
- // This will go to a TestRenderViewHost.
- render_view_host->CreateRenderView();
- return true;
- }
- void UpdateRenderViewSizeForRenderManager() {}
-
- // Set by individual tests.
- bool transition_cross_site;
-};
-
-#endif // CHROME_BROWSER_TAB_CONTENTS_TEST_WEB_CONTENTS_H_
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_TAB_CONTENTS_TEST_WEB_CONTENTS_H_
+#define CHROME_BROWSER_TAB_CONTENTS_TEST_WEB_CONTENTS_H_
+
+#include "chrome/browser/tab_contents/web_contents.h"
+
+class RenderViewHostFactory;
+class TestRenderViewHost;
+
+// Subclass WebContents to ensure it creates TestRenderViewHosts and does
+// not do anything involving views.
+class TestWebContents : public WebContents {
+ public:
+ // The render view host factory will be passed on to the
+ TestWebContents(Profile* profile, SiteInstance* instance,
+ RenderViewHostFactory* rvh_factory);
+
+ TestRenderViewHost* pending_rvh();
+
+ // State accessor.
+ bool cross_navigation_pending() {
+ return render_manager_.cross_navigation_pending_;
+ }
+
+ // Overrides WebContents::ShouldTransitionCrossSite so that we can test both
+ // alternatives without using command-line switches.
+ bool ShouldTransitionCrossSite() { return transition_cross_site; }
+
+ // Promote DidNavigate to public.
+ void TestDidNavigate(RenderViewHost* render_view_host,
+ const ViewHostMsg_FrameNavigate_Params& params) {
+ DidNavigate(render_view_host, params);
+ }
+
+ // Promote GetWebkitPrefs to public.
+ WebPreferences TestGetWebkitPrefs() {
+ return GetWebkitPrefs();
+ }
+
+ // Prevent interaction with views.
+ bool CreateRenderViewForRenderManager(RenderViewHost* render_view_host) {
+ // This will go to a TestRenderViewHost.
+ render_view_host->CreateRenderView();
+ return true;
+ }
+ void UpdateRenderViewSizeForRenderManager() {}
+
+ // Set by individual tests.
+ bool transition_cross_site;
+};
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_TEST_WEB_CONTENTS_H_
diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc
index dd2820b..6ca0726 100644
--- a/chrome/browser/tab_contents/web_contents.cc
+++ b/chrome/browser/tab_contents/web_contents.cc
@@ -1468,7 +1468,7 @@ WebContents::GetLastCommittedNavigationEntryForRenderManager() {
return NULL;
return controller()->GetLastCommittedEntry();
}
-
+
bool WebContents::CreateRenderViewForRenderManager(
RenderViewHost* render_view_host) {
RenderWidgetHostView* rwh_view = view_->CreateViewForWidget(render_view_host);
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index a25c589..134b43a 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -149,7 +149,7 @@ class TestInterstitialPage : public InterstitialPage {
SiteInstance::CreateSiteInstance(tab()->profile()),
this, MSG_ROUTING_NONE, NULL);
}
-
+
virtual void CommandReceived(const std::string& command) {
command_received_count_++;
}
@@ -973,10 +973,10 @@ TEST_F(WebContentsTest, ShowInterstitialOnInterstitial) {
// Showing interstitial2 should have caused interstitial1 to go away.
EXPECT_TRUE(deleted1);
EXPECT_EQ(TestInterstitialPage::CANCELED, state1);
-
+
// Let's make sure interstitial2 is working as intended.
ASSERT_FALSE(deleted2);
- EXPECT_EQ(TestInterstitialPage::UNDECIDED, state2);
+ EXPECT_EQ(TestInterstitialPage::UNDECIDED, state2);
interstitial2->Proceed();
GURL landing_url("http://www.thepage.com");
rvh()->SendNavigate(2, landing_url);
diff --git a/chrome/browser/tab_contents/web_contents_view_mac.mm b/chrome/browser/tab_contents/web_contents_view_mac.mm
index a382bca..acdf717 100644
--- a/chrome/browser/tab_contents/web_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/web_contents_view_mac.mm
@@ -47,14 +47,14 @@ RenderWidgetHostView* WebContentsViewMac::CreateViewForWidget(
DCHECK(!render_widget_host->view());
RenderWidgetHostViewMac* view =
new RenderWidgetHostViewMac(render_widget_host);
-
+
// Fancy layout comes later; for now just make it our size and resize it
// with us.
NSView* view_view = view->native_view();
[cocoa_view_.get() addSubview:view_view];
[view_view setFrame:[cocoa_view_.get() bounds]];
[view_view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
-
+
return view;
}
@@ -107,7 +107,7 @@ void WebContentsViewMac::ForwardMessageToDevToolsClient(
const IPC::Message& message) {
NOTIMPLEMENTED();
}
-
+
void WebContentsViewMac::FindInPage(const Browser& browser,
bool find_next, bool forward_direction) {
if (!find_bar_.get()) {
@@ -228,7 +228,7 @@ void WebContentsViewMac::Observe(NotificationType type,
CFRetain(view);
[view release];
sad_tab_.reset(view);
-
+
// Set as the dominant child.
[cocoa_view_.get() addSubview:view];
[view setFrame:[cocoa_view_.get() bounds]];
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index ae17dbe..870b461 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -154,7 +154,7 @@ std::wstring TaskManagerTableModel::GetText(int row, int col_id) {
if (!first_in_group)
return std::wstring();
return IntToWString(base::GetProcId(resource->GetProcess()));
-
+
case kGoatsTeleportedColumn: // Goats Teleported.
goats_teleported_ += rand();
return FormatNumber(goats_teleported_);
@@ -264,7 +264,7 @@ HANDLE TaskManagerTableModel::GetProcessAt(int index) {
void TaskManagerTableModel::StartUpdating() {
DCHECK_NE(TASK_PENDING, update_state_);
-
+
// If update_state_ is STOPPING, it means a task is still pending. Setting
// it to TASK_PENDING ensures the tasks keep being posted (by Refresh()).
if (update_state_ == IDLE) {
@@ -546,7 +546,7 @@ int TaskManagerTableModel::CompareValues(int row1, int row2, int column_id) {
int proc2_id = base::GetProcId(resources_[row2]->GetProcess());
return ValueCompare<int>(proc1_id, proc2_id);
}
-
+
case kGoatsTeleportedColumn:
return 0; // Don't bother, numbers are random.
@@ -846,7 +846,7 @@ void TaskManagerContents::Layout() {
y() + kPanelVertMargin,
width() - 2 * kPanelHorizMargin,
height() - 2 * kPanelVertMargin - prefered_height);
-
+
// y-coordinate of button top left.
gfx::Rect parent_bounds = GetParent()->GetLocalBounds(false);
int y_buttons = parent_bounds.bottom() - prefered_height - kButtonVEdgeMargin;
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc
index 08dc00b..803fa69 100644
--- a/chrome/browser/toolbar_model.cc
+++ b/chrome/browser/toolbar_model.cc
@@ -127,7 +127,7 @@ void ToolbarModel::GetIconHoverText(std::wstring* text, SkColor* text_color) {
NavigationEntry* entry = navigation_controller->GetActiveEntry();
DCHECK(entry);
-
+
const NavigationEntry::SSLStatus& ssl = entry->ssl();
switch (ssl.security_style()) {
case SECURITY_STYLE_AUTHENTICATED: {
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc
index 3089e82..74990d3 100644
--- a/chrome/browser/unload_uitest.cc
+++ b/chrome/browser/unload_uitest.cc
@@ -127,7 +127,7 @@ class UnloadTest : public UITest {
CheckTitle(L"Title Of Awesomeness");
}
-
+
void LoadUrlAndQuitBrowser(const std::string& html_content,
const std::wstring& expected_title = L"") {
scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
@@ -164,7 +164,7 @@ TEST_F(UnloadTest, CrossSiteInfiniteUnloadAsync) {
// Navigate to a page with an infinite unload handler.
// Then two two sync crosssite requests to ensure
-// we correctly nav to each one.
+// we correctly nav to each one.
TEST_F(UnloadTest, CrossSiteInfiniteUnloadSync) {
// Tests makes no sense in single-process mode since the renderer is hung.
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
@@ -192,7 +192,7 @@ TEST_F(UnloadTest, CrossSiteInfiniteBeforeUnloadAsync) {
// Navigate to a page with an infinite beforeunload handler.
// Then two two sync crosssite requests to ensure
-// we correctly nav to each one.
+// we correctly nav to each one.
TEST_F(UnloadTest, CrossSiteInfiniteBeforeUnloadSync) {
// Tests makes no sense in single-process mode since the renderer is hung.
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
@@ -288,4 +288,4 @@ TEST_F(UnloadTest, BrowserCloseTwoSecondBeforeUnloadAlert) {
}
// TODO(ojan): Add tests for unload/beforeunload that have multiple tabs
-// and multiple windows. \ No newline at end of file
+// and multiple windows.
diff --git a/chrome/browser/views/about_ipc_dialog.cc b/chrome/browser/views/about_ipc_dialog.cc
index 6c60840..4abc588 100644
--- a/chrome/browser/views/about_ipc_dialog.cc
+++ b/chrome/browser/views/about_ipc_dialog.cc
@@ -436,4 +436,4 @@ void AboutIPCDialog::ButtonPressed(views::BaseButton* button) {
}
}
-#endif // IPC_MESSAGE_LOG_ENABLED \ No newline at end of file
+#endif // IPC_MESSAGE_LOG_ENABLED
diff --git a/chrome/browser/views/bookmark_bar_view_test.cc b/chrome/browser/views/bookmark_bar_view_test.cc
index c62b175..2a4740f 100644
--- a/chrome/browser/views/bookmark_bar_view_test.cc
+++ b/chrome/browser/views/bookmark_bar_view_test.cc
@@ -36,7 +36,7 @@ class TestingPageNavigator : public PageNavigator {
// Base class for event generating bookmark view tests. These test are intended
// to exercise ChromeMenus, but that's easier done with BookmarkBarView rather
// than ChromeMenu itself.
-//
+//
// SetUp creates a bookmark model with the following structure.
// All folders are in upper case, all URLs in lower case.
// F1
@@ -939,7 +939,7 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
ASSERT_TRUE(child_menu != NULL);
ui_controls::MoveMouseToCenterAndPress(child_menu, ui_controls::LEFT,
ui_controls::DOWN | ui_controls::UP, NULL);
-
+
// Delay until we send tab, otherwise the message box doesn't appear
// correctly.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc
index c0fe27a..dc4bf29 100644
--- a/chrome/browser/views/bookmark_bubble_view.cc
+++ b/chrome/browser/views/bookmark_bubble_view.cc
@@ -233,7 +233,7 @@ void BookmarkBubbleView::Init() {
cs->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF,
0, 0);
cs->AddPaddingColumn(1, kUnrelatedControlHorizontalSpacing);
- cs->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF,
+ cs->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF,
0, 0);
// Middle (input field) rows.
@@ -291,7 +291,7 @@ std::wstring BookmarkBubbleView::GetTitle() {
return std::wstring();
}
-void BookmarkBubbleView::ButtonPressed(views::NativeButton* sender) {
+void BookmarkBubbleView::ButtonPressed(views::NativeButton* sender) {
if (sender == edit_button_) {
UserMetrics::RecordAction(L"BookmarkBubble_Edit", profile_);
ShowEditor();
@@ -299,7 +299,7 @@ void BookmarkBubbleView::ButtonPressed(views::NativeButton* sender) {
DCHECK(sender == close_button_);
Close();
}
- // WARNING: we've most likely been deleted when CloseWindow returns.
+ // WARNING: we've most likely been deleted when CloseWindow returns.
}
void BookmarkBubbleView::LinkActivated(Link* source, int event_flags) {
diff --git a/chrome/browser/views/bookmark_bubble_view.h b/chrome/browser/views/bookmark_bubble_view.h
index 2f0f7c1..31c8c8c 100644
--- a/chrome/browser/views/bookmark_bubble_view.h
+++ b/chrome/browser/views/bookmark_bubble_view.h
@@ -101,7 +101,7 @@ class BookmarkBubbleView : public views::View,
// editor (depending upon which link was clicked).
virtual void LinkActivated(views::Link* source, int event_flags);
- // ButtonListener method, closes the bubble or opens the edit dialog.
+ // ButtonListener method, closes the bubble or opens the edit dialog.
virtual void ButtonPressed(views::NativeButton* sender);
// ComboBox::Listener method. Changes the parent of the bookmark.
diff --git a/chrome/browser/views/bookmark_table_view.cc b/chrome/browser/views/bookmark_table_view.cc
index 6e5bada..bbd0731 100644
--- a/chrome/browser/views/bookmark_table_view.cc
+++ b/chrome/browser/views/bookmark_table_view.cc
@@ -433,7 +433,7 @@ void BookmarkTableView::PaintAltText() {
1, bounds.width() - 2, bounds.height() - 2,
ChromeCanvas::TEXT_ALIGN_LEFT);
canvas.getTopPlatformDevice().drawToHDC(dc, bounds.x(), bounds.y(), NULL);
- ReleaseDC(GetNativeControlHWND(), dc);
+ ReleaseDC(GetNativeControlHWND(), dc);
}
gfx::Rect BookmarkTableView::GetAltTextBounds() {
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 350e5f6..8b08a3f 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -207,7 +207,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download,
// Extract the file extension (if any).
std::wstring extension = file_util::GetFileExtensionFromPath(file_name);
- std::wstring rootname =
+ std::wstring rootname =
file_util::GetFilenameWithoutExtensionFromPath(file_name);
// Elide giant extensions (this shouldn't currently be hit, but might
@@ -217,7 +217,7 @@ DownloadItemView::DownloadItemView(DownloadItem* download,
ElideString(rootname, kFileNameMaxLength - extension.length(), &rootname);
dangerous_download_label_ = new views::Label(
- l10n_util::GetStringF(IDS_PROMPT_DANGEROUS_DOWNLOAD,
+ l10n_util::GetStringF(IDS_PROMPT_DANGEROUS_DOWNLOAD,
rootname + L"." + extension));
dangerous_download_label_->SetMultiLine(true);
dangerous_download_label_->SetHorizontalAlignment(
@@ -456,7 +456,7 @@ void DownloadItemView::Paint(ChromeCanvas* canvas) {
// Last value of x was the end of the right image, just before the button.
// Note that in dangerous mode we use a label (as the text is multi-line).
if (!IsDangerousMode()) {
- std::wstring filename =
+ std::wstring filename =
gfx::ElideFilename(download_->GetFileName().ToWStringHack(),
font_,
kTextWidth);
diff --git a/chrome/browser/views/edit_keyword_controller.cc b/chrome/browser/views/edit_keyword_controller.cc
index 11d7571..7e01074 100644
--- a/chrome/browser/views/edit_keyword_controller.cc
+++ b/chrome/browser/views/edit_keyword_controller.cc
@@ -53,7 +53,7 @@ void EditKeywordController::Show() {
// Window interprets an empty rectangle as needing to query the content for
// the size as well as centering relative to the parent.
views::Window::CreateChromeWindow(::IsWindow(parent_) ? parent_ : NULL,
- gfx::Rect(), this);
+ gfx::Rect(), this);
window()->Show();
GetDialogClientView()->UpdateDialogButtons();
title_tf_->SelectAll();
diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc
index 79fa9c0..1ed7916 100644
--- a/chrome/browser/views/first_run_bubble.cc
+++ b/chrome/browser/views/first_run_bubble.cc
@@ -120,7 +120,7 @@ class FirstRunBubbleView : public views::View,
gfx::Size pref_size = label1_->GetPreferredSize();
label1_->SetMultiLine(true);
label1_->SizeToFit(canvas.width() - kBubblePadding * 2);
- label1_->SetBounds(kBubblePadding, kBubblePadding,
+ label1_->SetBounds(kBubblePadding, kBubblePadding,
canvas.width() - kBubblePadding * 2,
pref_size.height());
diff --git a/chrome/browser/views/frame/glass_browser_frame_view.cc b/chrome/browser/views/frame/glass_browser_frame_view.cc
index 274f561..55e8d5b 100644
--- a/chrome/browser/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/views/frame/glass_browser_frame_view.cc
@@ -164,7 +164,7 @@ gfx::Rect GlassBrowserFrameView::GetWindowBoundsForClientBounds(
RECT rect = client_bounds.ToRECT();
AdjustWindowRectEx(&rect, frame_->window_style(), FALSE,
frame_->window_ex_style());
- return gfx::Rect(rect);
+ return gfx::Rect(rect);
}
int top_height = NonClientTopBorderHeight();
@@ -296,7 +296,7 @@ void GlassBrowserFrameView::PaintOTRAvatar(ChromeCanvas* canvas) {
SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon();
canvas->DrawBitmapInt(otr_avatar_icon, 0,
(otr_avatar_icon.height() - otr_avatar_bounds_.height()) / 2,
- otr_avatar_bounds_.width(), otr_avatar_bounds_.height(),
+ otr_avatar_bounds_.width(), otr_avatar_bounds_.height(),
MirroredLeftPointForRect(otr_avatar_bounds_), otr_avatar_bounds_.y(),
otr_avatar_bounds_.width(), otr_avatar_bounds_.height(), false);
}
diff --git a/chrome/browser/views/frame/glass_browser_frame_view.h b/chrome/browser/views/frame/glass_browser_frame_view.h
index edaed89..f6e3aff 100644
--- a/chrome/browser/views/frame/glass_browser_frame_view.h
+++ b/chrome/browser/views/frame/glass_browser_frame_view.h
@@ -63,7 +63,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView {
// Returns the bounds of the client area for the specified view size.
gfx::Rect CalculateClientAreaBounds(int width, int height) const;
-
+
// Starts/Stops the window throbber running.
void StartThrobber();
void StopThrobber();
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index 39ba2d0..8452a37 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -167,7 +167,7 @@ class OTRActiveWindowResources : public views::WindowResources {
virtual SkBitmap* GetPartBitmap(views::FramePartBitmap part) const {
return standard_frame_bitmaps_[part];
}
-
+
private:
static void InitClass() {
static bool initialized = false;
@@ -842,7 +842,7 @@ void OpaqueBrowserFrameView::PaintOTRAvatar(ChromeCanvas* canvas) {
SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon();
canvas->DrawBitmapInt(otr_avatar_icon, 0,
(otr_avatar_icon.height() - otr_avatar_bounds_.height()) / 2,
- otr_avatar_bounds_.width(), otr_avatar_bounds_.height(),
+ otr_avatar_bounds_.width(), otr_avatar_bounds_.height(),
MirroredLeftPointForRect(otr_avatar_bounds_), otr_avatar_bounds_.y(),
otr_avatar_bounds_.width(), otr_avatar_bounds_.height(), false);
}
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.h b/chrome/browser/views/frame/opaque_browser_frame_view.h
index f25e4f4..e21ff3d 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.h
@@ -115,7 +115,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
return frame_->is_active() || paint_as_active() ?
current_active_resources_ : current_inactive_resources_;
}
-
+
// The layout rect of the title, if visible.
gfx::Rect title_bounds_;
diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc
index 590e8a8..72179ea 100644
--- a/chrome/browser/views/hung_renderer_view.cc
+++ b/chrome/browser/views/hung_renderer_view.cc
@@ -130,7 +130,7 @@ class HungRendererWarningView : public views::View,
virtual views::View* GetExtraView();
virtual bool Accept(bool window_closing);
virtual views::View* GetContentsView();
-
+
// views::NativeButton::Listener overrides:
virtual void ButtonPressed(views::NativeButton* sender);
@@ -379,7 +379,7 @@ void HungRendererWarningView::CreateKillButtonView() {
kill_button_->SetListener(this);
kill_button_container_ = new ButtonContainer;
-
+
using views::GridLayout;
using views::ColumnSet;
diff --git a/chrome/browser/views/hwnd_html_view.h b/chrome/browser/views/hwnd_html_view.h
index 67952a2..6f57ea3 100644
--- a/chrome/browser/views/hwnd_html_view.h
+++ b/chrome/browser/views/hwnd_html_view.h
@@ -49,7 +49,7 @@ class HWNDHtmlView : public views::HWNDView {
// Our HTML rendering component.
RenderViewHost* render_view_host_;
-
+
// Whether or not the rendered content is permitted to send messages back to
// the view, through |delegate_| via ProcessDOMUIMessage.
bool allow_dom_ui_bindings_;
diff --git a/chrome/browser/views/importer_view.cc b/chrome/browser/views/importer_view.cc
index e7bd61c..def2826 100644
--- a/chrome/browser/views/importer_view.cc
+++ b/chrome/browser/views/importer_view.cc
@@ -154,27 +154,27 @@ std::wstring ImporterView::GetItemAt(views::ComboBox* source, int index) {
return importer_host_->GetSourceProfileNameAt(index);
}
-void ImporterView::ItemChanged(views::ComboBox* combo_box,
+void ImporterView::ItemChanged(views::ComboBox* combo_box,
int prev_index, int new_index) {
DCHECK(combo_box);
- DCHECK(checkbox_items_.size() >=
- static_cast<size_t>(importer_host_->GetAvailableProfileCount()));
-
- if (prev_index == new_index)
+ DCHECK(checkbox_items_.size() >=
+ static_cast<size_t>(importer_host_->GetAvailableProfileCount()));
+
+ if (prev_index == new_index)
return;
-
+
// Save the current state
uint16 prev_items = GetCheckedItems();
checkbox_items_[prev_index] = prev_items;
-
+
// Enable/Disable the checkboxes for this Item
uint16 new_enabled_items = importer_host_->GetSourceProfileInfoAt(
new_index).services_supported;
- SetCheckedItemsState(new_enabled_items);
-
- // Set the checked items for this Item
+ SetCheckedItemsState(new_enabled_items);
+
+ // Set the checked items for this Item
uint16 new_items = checkbox_items_[new_index];
- SetCheckedItems(new_items);
+ SetCheckedItems(new_items);
}
void ImporterView::ImportCanceled() {
@@ -204,7 +204,7 @@ uint16 ImporterView::GetCheckedItems() {
if (search_engines_checkbox_->IsEnabled() &&
search_engines_checkbox_->IsSelected())
items |= SEARCH_ENGINES;
- return items;
+ return items;
}
void ImporterView::SetCheckedItemsState(uint16 items) {
@@ -242,7 +242,7 @@ void ImporterView::SetCheckedItems(uint16 items) {
history_checkbox_->SetIsSelected(false);
}
}
-
+
if (favorites_checkbox_->IsEnabled()) {
if (items & FAVORITES) {
favorites_checkbox_->SetIsSelected(true);
@@ -250,7 +250,7 @@ void ImporterView::SetCheckedItems(uint16 items) {
favorites_checkbox_->SetIsSelected(false);
}
}
-
+
if (passwords_checkbox_->IsEnabled()) {
if (items & PASSWORDS) {
passwords_checkbox_->SetIsSelected(true);
@@ -258,7 +258,7 @@ void ImporterView::SetCheckedItems(uint16 items) {
passwords_checkbox_->SetIsSelected(false);
}
}
-
+
if (search_engines_checkbox_->IsEnabled()) {
if (items & SEARCH_ENGINES) {
search_engines_checkbox_->SetIsSelected(true);
diff --git a/chrome/browser/views/importer_view.h b/chrome/browser/views/importer_view.h
index fa97e99..4f6efec 100644
--- a/chrome/browser/views/importer_view.h
+++ b/chrome/browser/views/importer_view.h
@@ -48,8 +48,8 @@ class ImporterView : public views::View,
virtual std::wstring GetItemAt(views::ComboBox* source, int index);
// Overridden from ChromeViews::ComboBox::Listener
- virtual void ItemChanged(views::ComboBox* combo_box,
- int prev_index,
+ virtual void ItemChanged(views::ComboBox* combo_box,
+ int prev_index,
int new_index);
// Overridden from ImportObserver:
@@ -65,10 +65,10 @@ class ImporterView : public views::View,
// Create a bitmap from the checkboxes of the view.
uint16 GetCheckedItems();
-
+
// Enables/Disables all the checked items for the given state
void SetCheckedItemsState(uint16 items);
-
+
// Sets all checked items in the given state
void SetCheckedItems(uint16 items);
@@ -82,7 +82,7 @@ class ImporterView : public views::View,
scoped_refptr<ImporterHost> importer_host_;
- // Stores the state of the checked items associated with the position of the
+ // Stores the state of the checked items associated with the position of the
// selected item in the combo-box.
std::vector<uint16> checkbox_items_;
diff --git a/chrome/browser/views/importing_progress_view.cc b/chrome/browser/views/importing_progress_view.cc
index b87819a..82c8047 100644
--- a/chrome/browser/views/importing_progress_view.cc
+++ b/chrome/browser/views/importing_progress_view.cc
@@ -307,7 +307,7 @@ void StartImportingWithUI(HWND parent_window,
// still need it to exist. No user interaction will be required.
if (!coordinator->is_headless())
window->Show();
-
+
coordinator->StartImportSettings(source_profile, items,
new ProfileWriter(target_profile),
first_run);
diff --git a/chrome/browser/views/infobars/infobar_container.h b/chrome/browser/views/infobars/infobar_container.h
index 181d95e..dba3149 100644
--- a/chrome/browser/views/infobars/infobar_container.h
+++ b/chrome/browser/views/infobars/infobar_container.h
@@ -40,7 +40,7 @@ class InfoBarContainer : public views::View,
virtual void ViewHierarchyChanged(bool is_add,
views::View* parent,
views::View* child);
-
+
private:
// Overridden from NotificationObserver:
virtual void Observe(NotificationType type,
diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc
index aa60a6b..da3af20 100644
--- a/chrome/browser/views/infobars/infobars.cc
+++ b/chrome/browser/views/infobars/infobars.cc
@@ -214,7 +214,7 @@ void InfoBar::DestroyFocusTracker(bool restore_focus) {
focus_tracker_->FocusLastFocusedExternalView();
focus_tracker_->SetFocusManager(NULL);
focus_tracker_.reset(NULL);
- }
+ }
}
void InfoBar::DeleteSelf() {
diff --git a/chrome/browser/views/infobars/infobars.h b/chrome/browser/views/infobars/infobars.h
index 56f140b..15885ce 100644
--- a/chrome/browser/views/infobars/infobars.h
+++ b/chrome/browser/views/infobars/infobars.h
@@ -45,7 +45,7 @@ class InfoBar : public views::View,
// Starts animating the InfoBar closed. It will not be closed until the
// animation has completed, when |Close| will be called.
void AnimateClose();
-
+
// Closes the InfoBar immediately and removes it from its container. Notifies
// the delegate that it has closed. The InfoBar is deleted after this function
// is called.
diff --git a/chrome/browser/views/keyword_editor_view.cc b/chrome/browser/views/keyword_editor_view.cc
index c1442f0..f103e0a 100644
--- a/chrome/browser/views/keyword_editor_view.cc
+++ b/chrome/browser/views/keyword_editor_view.cc
@@ -437,18 +437,18 @@ gfx::Size KeywordEditorView::GetPreferredSize() {
bool KeywordEditorView::CanResize() const {
return true;
}
-
+
std::wstring KeywordEditorView::GetWindowTitle() const {
return l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_WINDOW_TITLE);
-}
+}
int KeywordEditorView::GetDialogButtons() const {
return DIALOGBUTTON_CANCEL;
}
-
+
bool KeywordEditorView::Accept() {
open_window = NULL;
- return true;
+ return true;
}
bool KeywordEditorView::Cancel() {
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index 4323454..e6b1764 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -205,7 +205,7 @@ class LocationBarView : public LocationBar,
// The minimum size is just big enough to show the tab.
virtual gfx::Size GetMinimumSize();
virtual void Layout();
-
+
void set_profile(Profile* profile) { profile_ = profile; }
private:
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index e4380a1f5..594e5e2 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -302,7 +302,7 @@ void CookiesTableView::RemoveSelectedCookies() {
// Select the next row after the last row deleted (unless removing last row).
DCHECK(RowCount() > 0 && last_selected_view_row != -1);
- Select(view_to_model(std::min(RowCount() - 1,
+ Select(view_to_model(std::min(RowCount() - 1,
last_selected_view_row - remove_count + 1)));
}
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index be7e81f..f0ac54c 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -464,7 +464,7 @@ LanguagesPageView::LanguagesPageView(Profile* profile)
starting_ui_language_index_(-1) {
accept_languages_.Init(prefs::kAcceptLanguages,
profile->GetPrefs(), NULL);
- enable_spellcheck_.Init(prefs::kEnableSpellCheck,
+ enable_spellcheck_.Init(prefs::kEnableSpellCheck,
profile->GetPrefs(), NULL);
}
@@ -607,7 +607,7 @@ void LanguagesPageView::InitControlLayout() {
dictionary_language_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_CHROME_DICTIONARY_LANGUAGE));
dictionary_language_label_->SetHorizontalAlignment(
- views::Label::ALIGN_LEFT);
+ views::Label::ALIGN_LEFT);
enable_spellchecking_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_ENABLE_SPELLCHECK));
enable_spellchecking_checkbox_->SetListener(this);
diff --git a/chrome/browser/views/options/languages_page_view.h b/chrome/browser/views/options/languages_page_view.h
index d22a945..e79a4ab 100644
--- a/chrome/browser/views/options/languages_page_view.h
+++ b/chrome/browser/views/options/languages_page_view.h
@@ -93,10 +93,10 @@ class LanguagesPageView : public OptionsPageView,
// The contents of the "dictionary language" combobox.
scoped_ptr<LanguageComboboxModel> dictionary_language_model_;
StringPrefMember dictionary_language_;
-
+
// SpellChecker enable pref.
BooleanPrefMember enable_spellcheck_;
-
+
// This is assigned the new index of spellcheck language if the language
// is changed. Otherwise, it remains -1, and pref members are not updated.
int spellcheck_language_index_selected_;
diff --git a/chrome/browser/views/page_info_window.cc b/chrome/browser/views/page_info_window.cc
index 418d31e..510784f 100644
--- a/chrome/browser/views/page_info_window.cc
+++ b/chrome/browser/views/page_info_window.cc
@@ -565,7 +565,7 @@ void PageInfoWindow::Init(Profile* profile,
views::Window::CreateChromeWindow(parent, gfx::Rect(), this);
// TODO(beng): (Cleanup) - cert viewer button should use GetExtraView.
-
+
if (cert_id_) {
scoped_refptr<net::X509Certificate> cert;
CertStore::GetSharedInstance()->RetrieveCert(cert_id_, &cert);
@@ -663,13 +663,13 @@ void PageInfoWindow::ShowCertDialog(int cert_id) {
if (!cert.get()) {
// The certificate was not found. Could be that the renderer crashed before
// we displayed the page info.
- return;
- }
+ return;
+ }
- CRYPTUI_VIEWCERTIFICATE_STRUCT view_info = { 0 };
- view_info.dwSize = sizeof(view_info);
- // We set our parent to the tab window. This makes the cert dialog created
- // in CryptUIDlgViewCertificate modal to the browser.
+ CRYPTUI_VIEWCERTIFICATE_STRUCT view_info = { 0 };
+ view_info.dwSize = sizeof(view_info);
+ // We set our parent to the tab window. This makes the cert dialog created
+ // in CryptUIDlgViewCertificate modal to the browser.
view_info.hwndParent = window()->owning_window();
view_info.dwFlags = CRYPTUI_DISABLE_EDITPROPERTIES |
CRYPTUI_DISABLE_ADDTOSTORE;
diff --git a/chrome/browser/views/password_manager_view.h b/chrome/browser/views/password_manager_view.h
index a43b9f3..a5e5950 100644
--- a/chrome/browser/views/password_manager_view.h
+++ b/chrome/browser/views/password_manager_view.h
@@ -57,7 +57,7 @@ class PasswordManagerTableModel : public views::TableModel,
: display_url(url), form(password_form) {
}
- // Contains the URL that is displayed along with the
+ // Contains the URL that is displayed along with the
gfx::SortedDisplayURL display_url;
// The underlying PasswordForm. We own this.
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index ed50ca7..a883ad5 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -375,13 +375,13 @@ bool SelectFileDialogImpl::RunSelectFolderDialog(const std::wstring& title,
browse_info.lpszTitle = title.c_str();
browse_info.pszDisplayName = dir_buffer;
browse_info.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS;
-
+
if (path->length()) {
// Highlight the current value.
browse_info.lParam = (LPARAM)path->c_str();
browse_info.lpfn = &BrowseCallbackProc;
}
-
+
LPITEMIDLIST list = SHBrowseForFolder(&browse_info);
DisableOwner(owner);
if (list) {
diff --git a/chrome/browser/views/tabs/tab_dragging_test.cc b/chrome/browser/views/tabs/tab_dragging_test.cc
index a136046..76a6574b 100644
--- a/chrome/browser/views/tabs/tab_dragging_test.cc
+++ b/chrome/browser/views/tabs/tab_dragging_test.cc
@@ -50,7 +50,7 @@ TEST_F(TabDraggingTest, Tab1Tab2) {
ASSERT_TRUE(browser->AppendTab(tab2_url));
scoped_ptr<TabProxy> tab2(browser->GetTab(1));
ASSERT_TRUE(tab2.get());
-
+
// Add Tab_3.
GURL tab3_url("about:plugins");
ASSERT_TRUE(browser->AppendTab(tab3_url));
@@ -100,8 +100,8 @@ TEST_F(TabDraggingTest, Tab1Tab2) {
// | Tab_1 | Tab_2 | Tab_3 |
// ---- ---- ---- ---- ---- ---- ---- ---- ----
// x---- ---->
- // ____________
- // / X \
+ // ____________
+ // / X \
// | Tab_1 |
// ---- ---- ----
@@ -130,7 +130,7 @@ TEST_F(TabDraggingTest, Tab1Tab2) {
EXPECT_EQ(tab2_url.spec(), tab1_new_url.spec());
}
-// Drag Tab_1 into the position of Tab_3.
+// Drag Tab_1 into the position of Tab_3.
TEST_F(TabDraggingTest, Tab1Tab3) {
scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());
@@ -153,7 +153,7 @@ TEST_F(TabDraggingTest, Tab1Tab3) {
ASSERT_TRUE(browser->AppendTab(tab2_url));
scoped_ptr<TabProxy> tab2(browser->GetTab(1));
ASSERT_TRUE(tab2.get());
-
+
// Add Tab_3.
GURL tab3_url("about:plugins");
ASSERT_TRUE(browser->AppendTab(tab3_url));
@@ -203,13 +203,13 @@ TEST_F(TabDraggingTest, Tab1Tab3) {
// | Tab_1 | Tab_2 | Tab_3 |
// ---- ---- ---- ---- ---- ---- ---- ---- ----
// x---- ---- ---- ---- ---- ---->
- // ____________
- // / X \
+ // ____________
+ // / X \
// | Tab_1 |
// ---- ---- ----
POINT start;
- POINT end;
+ POINT end;
start.x = bounds1.x() + bounds1.width()/2;
start.y = bounds1.y() + bounds1.height()/2;
end.x = start.x + bounds1.width()/2 + bounds2.width() + bounds3.width()/2;
@@ -263,7 +263,7 @@ TEST_F(TabDraggingTest, Tab1Tab3Escape) {
ASSERT_TRUE(browser->AppendTab(tab2_url));
scoped_ptr<TabProxy> tab2(browser->GetTab(1));
ASSERT_TRUE(tab2.get());
-
+
// Add Tab_3.
GURL tab3_url("about:plugins");
ASSERT_TRUE(browser->AppendTab(tab3_url));
@@ -313,19 +313,19 @@ TEST_F(TabDraggingTest, Tab1Tab3Escape) {
// | Tab_1 | Tab_2 | Tab_3 |
// ---- ---- ---- ---- ---- ---- ---- ---- ----
// x---- ---- ---- ---- ---- ----> + ESCAPE
- // ____________
- // / X \
+ // ____________
+ // / X \
// | Tab_1 |
// ---- ---- ----
POINT start;
- POINT end;
+ POINT end;
start.x = bounds1.x() + bounds1.width()/2;
start.y = bounds1.y() + bounds1.height()/2;
end.x = start.x + bounds1.width()/2 + bounds2.width() + bounds3.width()/2;
end.y = start.y;
- // Simulate drag with 'true' as the last parameter. This will interrupt
+ // Simulate drag with 'true' as the last parameter. This will interrupt
// in-flight with Escape.
ASSERT_TRUE(browser->SimulateDrag(start, end,
views::Event::EF_LEFT_BUTTON_DOWN,
@@ -346,7 +346,7 @@ TEST_F(TabDraggingTest, Tab1Tab3Escape) {
ASSERT_TRUE(tab3.get());
GURL tab3_new_url;
ASSERT_TRUE(tab3->GetCurrentURL(&tab3_new_url));
-
+
// The tabs should be in their original positions.
EXPECT_EQ(tab1_new_url.spec(), tab1_url.spec());
EXPECT_EQ(tab2_new_url.spec(), tab2_url.spec());
@@ -376,7 +376,7 @@ TEST_F(TabDraggingTest, Tab2OutOfTabStrip) {
ASSERT_TRUE(browser->AppendTab(tab2_url));
scoped_ptr<TabProxy> tab2(browser->GetTab(1));
ASSERT_TRUE(tab2.get());
-
+
// Add Tab_3.
GURL tab3_url("about:plugins");
ASSERT_TRUE(browser->AppendTab(tab3_url));
@@ -435,17 +435,17 @@ TEST_F(TabDraggingTest, Tab2OutOfTabStrip) {
// / \ / \ / \
// | Tab_1 | Tab_2 | Tab_3 |
// ---- ---- ---- ---- ---- ---- ---- ---- ----
- // x
- // |
+ // x
+ // |
// | (Drag this below, out of tab strip)
- // V
- // ____________
- // / X \
+ // V
+ // ____________
+ // / X \
// | Tab_2 | (New Window)
// ---- ---- ---- ---- ---- ---- ----
POINT start;
- POINT end;
+ POINT end;
start.x = bounds2.x() + bounds2.width()/2;
start.y = bounds2.y() + bounds2.height()/2;
end.x = start.x;
@@ -471,8 +471,8 @@ TEST_F(TabDraggingTest, Tab2OutOfTabStrip) {
ASSERT_TRUE(tab2.get());
GURL tab2_new_url;
ASSERT_TRUE(tab2->GetCurrentURL(&tab2_new_url));
-
- // Now check for proper shifting of tabs; i.e., Tab_3 in window 1 should
+
+ // Now check for proper shifting of tabs; i.e., Tab_3 in window 1 should
// shift left to the position of Tab_2; Tab_1 should stay where it was.
EXPECT_EQ(tab1_new_url.spec(), tab1_url.spec());
EXPECT_EQ(tab2_new_url.spec(), tab3_url.spec());
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index f060135..c5e16b4 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -808,7 +808,7 @@ void BrowserToolbarView::ButtonPressed(views::BaseButton* sender) {
// static
int BrowserToolbarView::PopupTopSpacing() {
- return GetWidget()->AsWindow()->UseNativeFrame() ? 0
+ return GetWidget()->AsWindow()->UseNativeFrame() ? 0
: kPopupTopSpacingNonGlass;
}
diff --git a/chrome/browser/visitedlink_unittest.cc b/chrome/browser/visitedlink_unittest.cc
index 5b3928a..c3cbd0a 100644
--- a/chrome/browser/visitedlink_unittest.cc
+++ b/chrome/browser/visitedlink_unittest.cc
@@ -144,7 +144,7 @@ class VisitedLinkTest : public testing::Test {
ClearDB();
file_util::Delete(history_dir_, true);
}
-
+
MessageLoop message_loop_;
// Filenames for the services;
diff --git a/chrome/common/child_process.cc b/chrome/common/child_process.cc
index 934583a..27b55b7 100644
--- a/chrome/common/child_process.cc
+++ b/chrome/common/child_process.cc
@@ -13,7 +13,7 @@ ChildProcess* ChildProcess::child_process_;
ChildProcess::ChildProcess(ChildThread* child_thread)
: child_thread_(child_thread),
ref_count_(0),
- shutdown_event_(true, false) {
+ shutdown_event_(true, false) {
DCHECK(!child_process_);
child_process_ = this;
if (child_thread_.get()) // null in unittests.
diff --git a/chrome/common/child_process_info.cc b/chrome/common/child_process_info.cc
index f1c91c7..1521dab 100644
--- a/chrome/common/child_process_info.cc
+++ b/chrome/common/child_process_info.cc
@@ -71,7 +71,7 @@ std::wstring ChildProcessInfo::GenerateRandomChannelID(void* instance) {
// child processes determine the pid of the parent.
// Build the channel ID. This is composed of a unique identifier for the
// parent browser process, an identifier for the child instance, and a random
- // component. We use a random component so that a hacked child process can't
+ // component. We use a random component so that a hacked child process can't
// cause denial of service by causing future named pipe creation to fail.
return StringPrintf(L"%d.%x.%d",
base::GetCurrentProcId(), instance,
diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm
index 1e00bf9..e8e8f92 100644
--- a/chrome/common/chrome_paths_mac.mm
+++ b/chrome/common/chrome_paths_mac.mm
@@ -21,7 +21,7 @@ bool GetDefaultUserDataDirectory(FilePath* result) {
bool GetUserDocumentsDirectory(FilePath* result) {
bool success = false;
- NSArray* docArray =
+ NSArray* docArray =
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask,
YES);
@@ -34,7 +34,7 @@ bool GetUserDocumentsDirectory(FilePath* result) {
bool GetUserDownloadsDirectory(FilePath* result) {
bool success = false;
- NSArray* docArray =
+ NSArray* docArray =
NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory,
NSUserDomainMask,
YES);
@@ -47,7 +47,7 @@ bool GetUserDownloadsDirectory(FilePath* result) {
bool GetUserDesktop(FilePath* result) {
bool success = false;
- NSArray* docArray =
+ NSArray* docArray =
NSSearchPathForDirectoriesInDomains(NSDesktopDirectory,
NSUserDomainMask,
YES);
diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc
index 52e8712..257d5bb 100644
--- a/chrome/common/chrome_paths_win.cc
+++ b/chrome/common/chrome_paths_win.cc
@@ -39,7 +39,7 @@ bool GetUserDocumentsDirectory(FilePath* result) {
// but it can be set to Desktop, which is dangerous. Instead,
// we just use 'Downloads' under DIR_USER_DOCUMENTS. Localizing
// 'downloads' is not a good idea because Chrome's UI language
-// can be changed.
+// can be changed.
bool GetUserDownloadsDirectory(FilePath* result) {
if (!GetUserDocumentsDirectory(result))
return false;
diff --git a/chrome/common/extensions/url_pattern.cc b/chrome/common/extensions/url_pattern.cc
index 7f705f2..b6aff22 100644
--- a/chrome/common/extensions/url_pattern.cc
+++ b/chrome/common/extensions/url_pattern.cc
@@ -75,7 +75,7 @@ bool URLPattern::Parse(const std::string& pattern) {
path_start_pos = host_end_pos;
}
-
+
path_ = pattern.substr(path_start_pos);
return true;
}
diff --git a/chrome/common/gfx/chrome_font.h b/chrome/common/gfx/chrome_font.h
index 8ac225c..7c25a9b 100644
--- a/chrome/common/gfx/chrome_font.h
+++ b/chrome/common/gfx/chrome_font.h
@@ -215,7 +215,7 @@ class ChromeFont {
int avg_width_;
#elif defined(OS_MACOSX)
explicit ChromeFont(const std::wstring& font_name, int font_size, int style);
-
+
// Calculate and cache the font metrics.
void calculateMetrics();
diff --git a/chrome/common/gfx/chrome_font_mac.mm b/chrome/common/gfx/chrome_font_mac.mm
index a553be6..590c54e 100644
--- a/chrome/common/gfx/chrome_font_mac.mm
+++ b/chrome/common/gfx/chrome_font_mac.mm
@@ -9,8 +9,8 @@
#include "base/logging.h"
#include "base/sys_string_conversions.h"
-// static
-ChromeFont ChromeFont::CreateFont(const std::wstring& font_name,
+// static
+ChromeFont ChromeFont::CreateFont(const std::wstring& font_name,
int font_size) {
return ChromeFont(font_name, font_size, NORMAL);
}
@@ -22,7 +22,7 @@ ChromeFont::ChromeFont(const std::wstring& font_name, int font_size, int style)
calculateMetrics();
}
-ChromeFont::ChromeFont()
+ChromeFont::ChromeFont()
: font_size_([NSFont systemFontSize]),
style_(NORMAL) {
NSFont* system_font = [NSFont systemFontOfSize:font_size_];
@@ -56,7 +56,7 @@ int ChromeFont::ave_char_width() const {
int ChromeFont::GetStringWidth(const std::wstring& text) const {
NSFont* font = nativeFont();
NSString* ns_string = base::SysWideToNSString(text);
- NSDictionary* attributes =
+ NSDictionary* attributes =
[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
NSSize string_size = [ns_string sizeWithAttributes:attributes];
return string_size.width;
@@ -82,6 +82,6 @@ NativeFont ChromeFont::nativeFont() const {
// TODO(pinkerton): apply |style_| to font.
// We could cache this, but then we'd have to conditionally change the
// dtor just for MacOS. Not sure if we want to/need to do that.
- return [NSFont fontWithName:base::SysWideToNSString(font_name_)
+ return [NSFont fontWithName:base::SysWideToNSString(font_name_)
size:font_size_];
}
diff --git a/chrome/common/gfx/text_elider.cc b/chrome/common/gfx/text_elider.cc
index f7405a2..f4a6d4e 100644
--- a/chrome/common/gfx/text_elider.cc
+++ b/chrome/common/gfx/text_elider.cc
@@ -168,9 +168,9 @@ std::wstring ElideUrl(const GURL& url,
}
const int kMaxNumberOfUrlPathElementsAllowed = 1024;
- if (url_path_number_of_elements <= 1 ||
+ if (url_path_number_of_elements <= 1 ||
url_path_number_of_elements > kMaxNumberOfUrlPathElementsAllowed) {
- // No path to elide, or too long of a path (could overflow in loop below)
+ // No path to elide, or too long of a path (could overflow in loop below)
// Just elide this as a text string.
return ElideText(url_subdomain + url_domain + url_path_query_etc, font,
available_pixel_width);
diff --git a/chrome/common/ipc_sync_channel.cc b/chrome/common/ipc_sync_channel.cc
index 0de4a86..4abef3a4 100644
--- a/chrome/common/ipc_sync_channel.cc
+++ b/chrome/common/ipc_sync_channel.cc
@@ -400,7 +400,7 @@ bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
// We use the sync message id so that when a message times out, we don't
// confuse it with another send that is either above/below this Send in
// the call stack.
- context->ipc_message_loop()->PostDelayedTask(FROM_HERE,
+ context->ipc_message_loop()->PostDelayedTask(FROM_HERE,
NewRunnableMethod(context.get(),
&SyncContext::OnSendTimeout, message_id), timeout_ms);
}
diff --git a/chrome/common/json_value_serializer.h b/chrome/common/json_value_serializer.h
index 71038fe..47e4584 100644
--- a/chrome/common/json_value_serializer.h
+++ b/chrome/common/json_value_serializer.h
@@ -55,7 +55,7 @@ class JSONStringValueSerializer : public ValueSerializer {
bool initialized_with_const_string_;
bool pretty_print_; // If true, serialization will span multiple lines.
// If true, deserialization will allow trailing commas.
- bool allow_trailing_comma_;
+ bool allow_trailing_comma_;
DISALLOW_EVIL_CONSTRUCTORS(JSONStringValueSerializer);
};
diff --git a/chrome/common/l10n_util.h b/chrome/common/l10n_util.h
index 480c1bd..6d7166e 100644
--- a/chrome/common/l10n_util.h
+++ b/chrome/common/l10n_util.h
@@ -239,7 +239,7 @@ void SortStringsUsingMethod(const std::wstring& locale,
StringMethodComparator<T,Method>(method));
return;
}
-
+
std::sort(elements->begin(), elements->end(),
StringMethodComparatorWithCollator<T,Method>(collator.get(), method));
}
diff --git a/chrome/common/page_zoom.h b/chrome/common/page_zoom.h
index 17743b7..daf5b9b 100644
--- a/chrome/common/page_zoom.h
+++ b/chrome/common/page_zoom.h
@@ -14,7 +14,7 @@ class PageZoom {
STANDARD = 0,
LARGER = 1,
};
-
+
private:
PageZoom() {} // For scoping only.
};
diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h
index 8a6a63a..c0c5a46 100644
--- a/chrome/common/plugin_messages.h
+++ b/chrome/common/plugin_messages.h
@@ -204,7 +204,7 @@ struct ParamTraits<PluginMsg_URLRequestReply_Params> {
ReadParam(m, iter, &p->resource_id) &&
ReadParam(m, iter, &p->url) &&
ReadParam(m, iter, &p->notify_needed) &&
- ReadParam(m, iter, &p->notify_data) &&
+ ReadParam(m, iter, &p->notify_data) &&
ReadParam(m, iter, &p->stream);
}
static void Log(const param_type& p, std::wstring* l) {
diff --git a/chrome/common/resource_bundle_mac.mm b/chrome/common/resource_bundle_mac.mm
index 5949572..3059d62 100644
--- a/chrome/common/resource_bundle_mac.mm
+++ b/chrome/common/resource_bundle_mac.mm
@@ -35,7 +35,7 @@ namespace {
base::DataPack *LoadResourceDataPack(NSString *name) {
base::DataPack *resource_pack = NULL;
-
+
NSString *resource_path = [mac_util::MainAppBundle() pathForResource:name
ofType:@"pak"];
if (resource_path) {
@@ -47,7 +47,7 @@ base::DataPack *LoadResourceDataPack(NSString *name) {
resource_pack = NULL;
}
}
-
+
return resource_pack;
}
@@ -56,7 +56,7 @@ base::DataPack *LoadResourceDataPack(NSString *name) {
void ResourceBundle::LoadResources(const std::wstring& pref_locale) {
DLOG_IF(WARNING, pref_locale.size() != 0)
<< "ignoring requested locale in favor of NSBundle's selection";
-
+
DCHECK(resources_data_ == NULL) << "resource data already loaded!";
resources_data_ = LoadResourceDataPack(@"chrome");
DCHECK(resources_data_) << "failed to load chrome.pak";
diff --git a/chrome/common/sandbox_init_wrapper.cc b/chrome/common/sandbox_init_wrapper.cc
index 6fcf664..5eb45cb 100644
--- a/chrome/common/sandbox_init_wrapper.cc
+++ b/chrome/common/sandbox_init_wrapper.cc
@@ -18,7 +18,7 @@ void SandboxInitWrapper::SetServices(sandbox::SandboxInterfaceInfo* info) {
#endif
-void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
+void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
const std::wstring& process_type) {
#if defined(OS_WIN)
if (!target_services_)
diff --git a/chrome/common/sandbox_init_wrapper.h b/chrome/common/sandbox_init_wrapper.h
index e9a718a..c8893a3 100644
--- a/chrome/common/sandbox_init_wrapper.h
+++ b/chrome/common/sandbox_init_wrapper.h
@@ -33,7 +33,7 @@ class SandboxInitWrapper {
// Initialize the sandbox for renderer and plug-in processes, depending on
// the command line flags. The browser process is not sandboxed.
- void InitializeSandbox(const CommandLine& parsed_command_line,
+ void InitializeSandbox(const CommandLine& parsed_command_line,
const std::wstring& process_type);
private:
sandbox::BrokerServices* broker_services_;
@@ -50,7 +50,7 @@ class SandboxInitWrapper {
// Initialize the sandbox for renderer and plug-in processes, depending on
// the command line flags. The browser process is not sandboxed.
- void InitializeSandbox(const CommandLine& parsed_command_line,
+ void InitializeSandbox(const CommandLine& parsed_command_line,
const std::wstring& process_type);
#if defined(OS_MACOSX)
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 5cd4428..96a7bed 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -336,7 +336,7 @@ void TabContents::SetIsLoading(bool is_loading,
NotificationDetails det = NotificationService::NoDetails();;
if (details)
det = Details<LoadNotificationDetails>(details);
- NotificationService::current()->Notify(type,
+ NotificationService::current()->Notify(type,
Source<NavigationController>(this->controller()),
det);
}
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index ca7cf64..1b7d1e2 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -417,7 +417,7 @@ class TabContents : public PageNavigator, public NotificationObserver {
};
TabContents(TabContentsType type)
: type_(type), is_crashed_(false), is_active_(true), is_loading_(false),
- is_being_destroyed_(false), waiting_for_response_(false),
+ is_being_destroyed_(false), waiting_for_response_(false),
shelf_visible_(false), controller_(), delegate_(), max_page_id_(-1) { }
virtual ~TabContents() { }
NavigationController* controller() const { return controller_; }
diff --git a/chrome/installer/gcapi/gcapi.cc b/chrome/installer/gcapi/gcapi.cc
index b3c12a5..3f4a226 100644
--- a/chrome/installer/gcapi/gcapi.cc
+++ b/chrome/installer/gcapi/gcapi.cc
@@ -1,444 +1,444 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/installer/gcapi/gcapi.h"
-
-#include <atlbase.h>
-#include <atlcom.h>
-#include <windows.h>
-#include <sddl.h>
-#include <stdlib.h>
-#include <strsafe.h>
-#include <tlhelp32.h>
-
-#include "google_update_idl.h"
-
-namespace {
-
-const wchar_t kChromeRegClientsKey[] = L"Software\\Google\\Update\\Clients\\{8A69D345-D564-463c-AFF1-A69D9E530F96}";
-const wchar_t kChromeRegClientStateKey[] = L"Software\\Google\\Update\\ClientState\\{8A69D345-D564-463c-AFF1-A69D9E530F96}";
-const wchar_t kChromeRegLaunchCmd[] = L"InstallerSuccessLaunchCmdLine";
-const wchar_t kChromeRegLastLaunchCmd[] = L"LastInstallerSuccessLaunchCmdLine";
-const wchar_t kChromeRegVersion[] = L"pv";
-const wchar_t kNoChromeOfferUntil[] = L"SOFTWARE\\Google\\No Chrome Offer Until";
-
-// Remove any registry key with non-numeric value or with the numeric value
-// equal or less than today's date represented in YYYYMMDD form.
-void CleanUpRegistryValues() {
- HKEY key = NULL;
- if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, kNoChromeOfferUntil,
- 0, KEY_ALL_ACCESS, &key) != ERROR_SUCCESS)
- return;
-
- DWORD index = 0;
- wchar_t value_name[260];
- DWORD value_name_len = _countof(value_name);
- DWORD value_type = REG_DWORD;
- DWORD value_data = 0;
- DWORD value_len = sizeof(DWORD);
-
- // First, remove any value whose type is not DWORD.
- while (::RegEnumValue(key, index, value_name, &value_name_len, NULL,
- &value_type, NULL, &value_len) == ERROR_SUCCESS) {
- if (value_type == REG_DWORD)
- index++;
- else
- ::RegDeleteValue(key, value_name);
-
- value_name_len = _countof(value_name);
- value_type = REG_DWORD;
- value_len = sizeof(DWORD);
- }
-
- // Get today's date, and format it as YYYYMMDD numeric value.
- SYSTEMTIME now;
- ::GetLocalTime(&now);
- DWORD expiration_date = now.wYear * 10000 + now.wMonth * 100 + now.wDay;
-
- // Remove any DWORD value smaller than the number represent the
- // expiration date (YYYYMMDD).
- index = 0;
- while (::RegEnumValue(key, index, value_name, &value_name_len, NULL,
- &value_type, (LPBYTE) &value_data,
- &value_len) == ERROR_SUCCESS) {
- if (value_type == REG_DWORD && value_data > expiration_date)
- index++; // move on to next value.
- else
- ::RegDeleteValue(key, value_name); // delete this value.
-
- value_name_len = _countof(value_name);
- value_type = REG_DWORD;
- value_data = 0;
- value_len = sizeof(DWORD);
- }
-
- ::RegCloseKey(key);
-}
-
-// Return the company name specified in the file version info resource.
-bool GetCompanyName(const wchar_t* filename, wchar_t* buffer, DWORD out_len) {
- wchar_t file_version_info[8192];
- DWORD handle = 0;
- DWORD buffer_size = 0;
-
- buffer_size = ::GetFileVersionInfoSize(filename, &handle);
- // Cannot stats the file or our buffer size is too small (very unlikely).
- if (buffer_size == 0 || buffer_size > _countof(file_version_info))
- return false;
-
- buffer_size = _countof(file_version_info);
- memset(file_version_info, 0, buffer_size);
- if (!::GetFileVersionInfo(filename, handle, buffer_size, file_version_info))
- return false;
-
- DWORD data_len = 0;
- LPVOID data = NULL;
- // Retrieve the language and codepage code if exists.
- buffer_size = 0;
- if (!::VerQueryValue(file_version_info, TEXT("\\VarFileInfo\\Translation"),
- reinterpret_cast<LPVOID *>(&data), reinterpret_cast<UINT *>(&data_len)))
- return false;
- if (data_len != 4)
- return false;
-
- wchar_t info_name[256];
- DWORD lang = 0;
- // Formulate the string to retrieve the company name of the specific
- // language codepage.
- memcpy(&lang, data, 4);
- ::StringCchPrintf(info_name, _countof(info_name),
- L"\\StringFileInfo\\%02X%02X%02X%02X\\CompanyName",
- (lang & 0xff00)>>8, (lang & 0xff), (lang & 0xff000000)>>24,
- (lang & 0xff0000)>>16);
-
- data_len = 0;
- if (!::VerQueryValue(file_version_info, info_name,
- reinterpret_cast<LPVOID *>(&data), reinterpret_cast<UINT *>(&data_len)))
- return false;
- if (data_len <= 0 || data_len >= out_len)
- return false;
-
- memset(buffer, 0, out_len);
- ::StringCchCopyN(buffer, out_len, (const wchar_t*)data, data_len);
- return true;
-}
-
-// Return true if we can re-offer Chrome; false, otherwise.
-// Each partner can only offer Chrome once every six months.
-bool CanReOfferChrome(BOOL set_flag) {
- wchar_t filename[MAX_PATH+1];
- wchar_t company[MAX_PATH];
-
- // If we cannot retrieve the version info of the executable or company
- // name, we allow the Chrome to be offered because there is no past
- // history to be found.
- if (::GetModuleFileName(NULL, filename, MAX_PATH) == 0)
- return true;
- if (!GetCompanyName(filename, company, sizeof(company)))
- return true;
-
- bool can_re_offer = true;
- DWORD disposition = 0;
- HKEY key = NULL;
- if (::RegCreateKeyEx(HKEY_LOCAL_MACHINE, kNoChromeOfferUntil,
- 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE,
- NULL, &key, &disposition) == ERROR_SUCCESS) {
- // Cannot re-offer, if the timer already exists and is not expired yet.
- if (::RegQueryValueEx(key, company, 0, 0, 0, 0) == ERROR_SUCCESS) {
- // The expired timers were already removed in CleanUpRegistryValues.
- // So if the key is not found, we can offer the Chrome.
- can_re_offer = false;
- } else if (set_flag) {
- // Set expiration date for offer as six months from today,
- // represented as a YYYYMMDD numeric value.
- SYSTEMTIME timer;
- ::GetLocalTime(&timer);
- timer.wMonth = timer.wMonth + 6;
- if (timer.wMonth > 12) {
- timer.wMonth = timer.wMonth - 12;
- timer.wYear = timer.wYear + 1;
- }
- DWORD value = timer.wYear * 10000 + timer.wMonth * 100 + timer.wDay;
- ::RegSetValueEx(key, company, 0, REG_DWORD, (LPBYTE)&value, sizeof(DWORD));
- }
-
- ::RegCloseKey(key);
- }
-
- return can_re_offer;
-}
-
-// Helper function to read a value from registry. Returns true if value
-// is read successfully and stored in parameter value. Returns false otherwise.
-bool ReadValueFromRegistry(HKEY root_key, const wchar_t *sub_key,
- const wchar_t *value_name, wchar_t *value,
- size_t *size) {
- HKEY key;
- if ((::RegOpenKeyEx(root_key, sub_key, NULL,
- KEY_READ, &key) == ERROR_SUCCESS) &&
- (::RegQueryValueEx(key, value_name, NULL, NULL,
- reinterpret_cast<LPBYTE>(value),
- reinterpret_cast<LPDWORD>(size)) == ERROR_SUCCESS)) {
- ::RegCloseKey(key);
- return true;
- }
- return false;
-}
-
-bool IsChromeInstalled(HKEY root_key) {
- wchar_t version[64];
- size_t size = _countof(version);
- if (ReadValueFromRegistry(root_key, kChromeRegClientsKey, kChromeRegVersion,
- version, &size))
- return true;
- return false;
-}
-
-bool IsWinXPSp1OrLater(bool* is_vista_or_later) {
- OSVERSIONINFOEX osviex = { sizeof(OSVERSIONINFOEX) };
- int r = ::GetVersionEx((LPOSVERSIONINFO)&osviex);
- // If this failed we're on Win9X or a pre NT4SP6 OS.
- if (!r)
- return false;
-
- if (osviex.dwMajorVersion < 5)
- return false;
-
- if (osviex.dwMajorVersion > 5) {
- *is_vista_or_later = true;
- return true; // way beyond Windows XP;
- }
-
- if (osviex.dwMinorVersion >= 1 && osviex.wServicePackMajor >= 1)
- return true; // Windows XP SP1 or better.
-
- return false; // Windows 2000, WinXP no Service Pack.
-}
-
-// Note this function should not be called on old Windows versions where these
-// Windows API are not available. We always invoke this function after checking
-// that current OS is Vista or later.
-bool VerifyAdminGroup() {
- SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
- PSID Group;
- BOOL check = ::AllocateAndInitializeSid(&NtAuthority, 2,
- SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0,
- 0, 0, 0,
- &Group);
- if (check) {
- if (!::CheckTokenMembership(NULL, Group, &check))
- check = FALSE;
- }
- ::FreeSid(Group);
- return (check == TRUE);
-}
-
-bool VerifyHKLMAccess(const wchar_t* sub_key) {
- HKEY root = HKEY_LOCAL_MACHINE;
- wchar_t str[] = L"test";
- bool result = false;
- DWORD disposition = 0;
- HKEY key = NULL;
-
- if (::RegCreateKeyEx(root, sub_key, 0, NULL,
- REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL,
- &key, &disposition) == ERROR_SUCCESS) {
- if (::RegSetValueEx(key, str, 0, REG_SZ, (LPBYTE)str,
- (DWORD)lstrlen(str)) == ERROR_SUCCESS) {
- result = true;
- RegDeleteValue(key, str);
- }
-
- // If we create the main key, delete the entire key.
- if (disposition == REG_CREATED_NEW_KEY)
- RegDeleteKey(key, NULL);
-
- RegCloseKey(key);
- }
-
- return result;
-}
-
-bool IsRunningElevated() {
- // This method should be called only for Vista or later.
- bool is_vista_or_later = false;
- IsWinXPSp1OrLater(&is_vista_or_later);
- if (!is_vista_or_later || !VerifyAdminGroup())
- return false;
-
- HANDLE process_token;
- if (!::OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &process_token))
- return false;
-
- TOKEN_ELEVATION_TYPE elevation_type = TokenElevationTypeDefault;
- DWORD size_returned = 0;
- if (!::GetTokenInformation(process_token, TokenElevationType,
- &elevation_type, sizeof(elevation_type),
- &size_returned)) {
- ::CloseHandle(process_token);
- return false;
- }
-
- ::CloseHandle(process_token);
- return (elevation_type == TokenElevationTypeFull);
-}
-
-bool GetUserIdForProcess(size_t pid, wchar_t** user_sid) {
- HANDLE process_handle = ::OpenProcess(PROCESS_QUERY_INFORMATION, TRUE, pid);
- if (process_handle == NULL)
- return false;
-
- HANDLE process_token;
- bool result = false;
- if (::OpenProcessToken(process_handle, TOKEN_QUERY, &process_token)) {
- DWORD size = 0;
- ::GetTokenInformation(process_token, TokenUser, NULL, 0, &size);
- if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
- ::GetLastError() == ERROR_SUCCESS) {
- DWORD actual_size = 0;
- BYTE* token_user = new BYTE[size];
- if ((::GetTokenInformation(process_token, TokenUser, token_user, size,
- &actual_size)) &&
- (actual_size <= size)) {
- PSID sid = reinterpret_cast<TOKEN_USER*>(token_user)->User.Sid;
- if (::ConvertSidToStringSid(sid, user_sid))
- result = true;
- }
- delete[] token_user;
- }
- ::CloseHandle(process_token);
- }
- ::CloseHandle(process_handle);
- return result;
-}
-} // namespace
-
-#pragma comment(linker, "/EXPORT:GoogleChromeCompatibilityCheck=_GoogleChromeCompatibilityCheck@8,PRIVATE")
-DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag, DWORD *reasons) {
- DWORD local_reasons = 0;
-
- bool is_vista_or_later = false;
- // System requirements?
- if (!IsWinXPSp1OrLater(&is_vista_or_later))
- local_reasons |= GCCC_ERROR_OSNOTSUPPORTED;
-
- if (IsChromeInstalled(HKEY_LOCAL_MACHINE))
- local_reasons |= GCCC_ERROR_SYSTEMLEVELALREADYPRESENT;
-
- if (IsChromeInstalled(HKEY_CURRENT_USER))
- local_reasons |= GCCC_ERROR_USERLEVELALREADYPRESENT;
-
- if (!VerifyHKLMAccess(kChromeRegClientsKey)) {
- local_reasons |= GCCC_ERROR_ACCESSDENIED;
- } else if (is_vista_or_later && !VerifyAdminGroup()) {
- // For Vista or later check for elevation since even for admin user we could
- // be running in non-elevated mode. We require integrity level High.
- local_reasons |= GCCC_ERROR_INTEGRITYLEVEL;
- }
-
- // First clean up the registry keys left over previously.
- // Then only check whether we can re-offer, if everything else is OK.
- CleanUpRegistryValues();
- if (local_reasons == 0 && !CanReOfferChrome(set_flag))
- local_reasons |= GCCC_ERROR_ALREADYOFFERED;
-
- // Done. Copy/return results.
- if (reasons != NULL)
- *reasons = local_reasons;
-
- return (*reasons == 0);
-}
-
-#pragma comment(linker, "/EXPORT:LaunchGoogleChrome=_LaunchGoogleChrome@0,PRIVATE")
-DLLEXPORT BOOL __stdcall LaunchGoogleChrome() {
- wchar_t launch_cmd[MAX_PATH];
- size_t size = _countof(launch_cmd);
- if (!ReadValueFromRegistry(HKEY_LOCAL_MACHINE, kChromeRegClientStateKey,
- kChromeRegLastLaunchCmd, launch_cmd, &size)) {
- size = _countof(launch_cmd);
- if (!ReadValueFromRegistry(HKEY_LOCAL_MACHINE, kChromeRegClientStateKey,
- kChromeRegLaunchCmd, launch_cmd, &size)) {
- return false;
- }
- }
-
- HRESULT hr = ::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- if (hr != S_OK) {
- if (hr == S_FALSE)
- ::CoUninitialize();
- return false;
- }
-
- if (::CoInitializeSecurity(NULL, -1, NULL, NULL,
- RPC_C_AUTHN_LEVEL_PKT_PRIVACY,
- RPC_C_IMP_LEVEL_IDENTIFY, NULL,
- EOAC_DYNAMIC_CLOAKING, NULL) != S_OK) {
- ::CoUninitialize();
- return false;
- }
-
- bool impersonation_success = false;
- if (IsRunningElevated()) {
- wchar_t* curr_proc_sid;
- if (!GetUserIdForProcess(GetCurrentProcessId(), &curr_proc_sid)) {
- ::CoUninitialize();
- return false;
- }
-
- DWORD pid = 0;
- ::GetWindowThreadProcessId(::GetShellWindow(), &pid);
- if (pid <= 0) {
- ::LocalFree(curr_proc_sid);
- ::CoUninitialize();
- return false;
- }
-
- wchar_t* exp_proc_sid;
- if (GetUserIdForProcess(pid, &exp_proc_sid)) {
- if (_wcsicmp(curr_proc_sid, exp_proc_sid) == 0) {
- HANDLE process_handle = ::OpenProcess(
- PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION, TRUE, pid);
- if (process_handle != NULL) {
- HANDLE process_token;
- HANDLE user_token;
- if (::OpenProcessToken(process_handle, TOKEN_DUPLICATE | TOKEN_QUERY,
- &process_token) &&
- ::DuplicateTokenEx(process_token,
- TOKEN_IMPERSONATE | TOKEN_QUERY |
- TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE,
- NULL, SecurityImpersonation,
- TokenPrimary, &user_token) &&
- (::ImpersonateLoggedOnUser(user_token) != 0)) {
- impersonation_success = true;
- }
- ::CloseHandle(user_token);
- ::CloseHandle(process_token);
- ::CloseHandle(process_handle);
- }
- }
- ::LocalFree(exp_proc_sid);
- }
-
- ::LocalFree(curr_proc_sid);
- if (!impersonation_success) {
- ::CoUninitialize();
- return false;
- }
- }
-
- bool ret = false;
- CComPtr<IProcessLauncher> ipl;
- if (!FAILED(ipl.CoCreateInstance(__uuidof(ProcessLauncherClass), NULL,
- CLSCTX_LOCAL_SERVER))) {
- if (!FAILED(ipl->LaunchCmdLine(launch_cmd)))
- ret = true;
- ipl.Release();
- }
-
- if (impersonation_success)
- ::RevertToSelf();
- ::CoUninitialize();
- return ret;
-}
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/installer/gcapi/gcapi.h"
+
+#include <atlbase.h>
+#include <atlcom.h>
+#include <windows.h>
+#include <sddl.h>
+#include <stdlib.h>
+#include <strsafe.h>
+#include <tlhelp32.h>
+
+#include "google_update_idl.h"
+
+namespace {
+
+const wchar_t kChromeRegClientsKey[] = L"Software\\Google\\Update\\Clients\\{8A69D345-D564-463c-AFF1-A69D9E530F96}";
+const wchar_t kChromeRegClientStateKey[] = L"Software\\Google\\Update\\ClientState\\{8A69D345-D564-463c-AFF1-A69D9E530F96}";
+const wchar_t kChromeRegLaunchCmd[] = L"InstallerSuccessLaunchCmdLine";
+const wchar_t kChromeRegLastLaunchCmd[] = L"LastInstallerSuccessLaunchCmdLine";
+const wchar_t kChromeRegVersion[] = L"pv";
+const wchar_t kNoChromeOfferUntil[] = L"SOFTWARE\\Google\\No Chrome Offer Until";
+
+// Remove any registry key with non-numeric value or with the numeric value
+// equal or less than today's date represented in YYYYMMDD form.
+void CleanUpRegistryValues() {
+ HKEY key = NULL;
+ if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, kNoChromeOfferUntil,
+ 0, KEY_ALL_ACCESS, &key) != ERROR_SUCCESS)
+ return;
+
+ DWORD index = 0;
+ wchar_t value_name[260];
+ DWORD value_name_len = _countof(value_name);
+ DWORD value_type = REG_DWORD;
+ DWORD value_data = 0;
+ DWORD value_len = sizeof(DWORD);
+
+ // First, remove any value whose type is not DWORD.
+ while (::RegEnumValue(key, index, value_name, &value_name_len, NULL,
+ &value_type, NULL, &value_len) == ERROR_SUCCESS) {
+ if (value_type == REG_DWORD)
+ index++;
+ else
+ ::RegDeleteValue(key, value_name);
+
+ value_name_len = _countof(value_name);
+ value_type = REG_DWORD;
+ value_len = sizeof(DWORD);
+ }
+
+ // Get today's date, and format it as YYYYMMDD numeric value.
+ SYSTEMTIME now;
+ ::GetLocalTime(&now);
+ DWORD expiration_date = now.wYear * 10000 + now.wMonth * 100 + now.wDay;
+
+ // Remove any DWORD value smaller than the number represent the
+ // expiration date (YYYYMMDD).
+ index = 0;
+ while (::RegEnumValue(key, index, value_name, &value_name_len, NULL,
+ &value_type, (LPBYTE) &value_data,
+ &value_len) == ERROR_SUCCESS) {
+ if (value_type == REG_DWORD && value_data > expiration_date)
+ index++; // move on to next value.
+ else
+ ::RegDeleteValue(key, value_name); // delete this value.
+
+ value_name_len = _countof(value_name);
+ value_type = REG_DWORD;
+ value_data = 0;
+ value_len = sizeof(DWORD);
+ }
+
+ ::RegCloseKey(key);
+}
+
+// Return the company name specified in the file version info resource.
+bool GetCompanyName(const wchar_t* filename, wchar_t* buffer, DWORD out_len) {
+ wchar_t file_version_info[8192];
+ DWORD handle = 0;
+ DWORD buffer_size = 0;
+
+ buffer_size = ::GetFileVersionInfoSize(filename, &handle);
+ // Cannot stats the file or our buffer size is too small (very unlikely).
+ if (buffer_size == 0 || buffer_size > _countof(file_version_info))
+ return false;
+
+ buffer_size = _countof(file_version_info);
+ memset(file_version_info, 0, buffer_size);
+ if (!::GetFileVersionInfo(filename, handle, buffer_size, file_version_info))
+ return false;
+
+ DWORD data_len = 0;
+ LPVOID data = NULL;
+ // Retrieve the language and codepage code if exists.
+ buffer_size = 0;
+ if (!::VerQueryValue(file_version_info, TEXT("\\VarFileInfo\\Translation"),
+ reinterpret_cast<LPVOID *>(&data), reinterpret_cast<UINT *>(&data_len)))
+ return false;
+ if (data_len != 4)
+ return false;
+
+ wchar_t info_name[256];
+ DWORD lang = 0;
+ // Formulate the string to retrieve the company name of the specific
+ // language codepage.
+ memcpy(&lang, data, 4);
+ ::StringCchPrintf(info_name, _countof(info_name),
+ L"\\StringFileInfo\\%02X%02X%02X%02X\\CompanyName",
+ (lang & 0xff00)>>8, (lang & 0xff), (lang & 0xff000000)>>24,
+ (lang & 0xff0000)>>16);
+
+ data_len = 0;
+ if (!::VerQueryValue(file_version_info, info_name,
+ reinterpret_cast<LPVOID *>(&data), reinterpret_cast<UINT *>(&data_len)))
+ return false;
+ if (data_len <= 0 || data_len >= out_len)
+ return false;
+
+ memset(buffer, 0, out_len);
+ ::StringCchCopyN(buffer, out_len, (const wchar_t*)data, data_len);
+ return true;
+}
+
+// Return true if we can re-offer Chrome; false, otherwise.
+// Each partner can only offer Chrome once every six months.
+bool CanReOfferChrome(BOOL set_flag) {
+ wchar_t filename[MAX_PATH+1];
+ wchar_t company[MAX_PATH];
+
+ // If we cannot retrieve the version info of the executable or company
+ // name, we allow the Chrome to be offered because there is no past
+ // history to be found.
+ if (::GetModuleFileName(NULL, filename, MAX_PATH) == 0)
+ return true;
+ if (!GetCompanyName(filename, company, sizeof(company)))
+ return true;
+
+ bool can_re_offer = true;
+ DWORD disposition = 0;
+ HKEY key = NULL;
+ if (::RegCreateKeyEx(HKEY_LOCAL_MACHINE, kNoChromeOfferUntil,
+ 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE,
+ NULL, &key, &disposition) == ERROR_SUCCESS) {
+ // Cannot re-offer, if the timer already exists and is not expired yet.
+ if (::RegQueryValueEx(key, company, 0, 0, 0, 0) == ERROR_SUCCESS) {
+ // The expired timers were already removed in CleanUpRegistryValues.
+ // So if the key is not found, we can offer the Chrome.
+ can_re_offer = false;
+ } else if (set_flag) {
+ // Set expiration date for offer as six months from today,
+ // represented as a YYYYMMDD numeric value.
+ SYSTEMTIME timer;
+ ::GetLocalTime(&timer);
+ timer.wMonth = timer.wMonth + 6;
+ if (timer.wMonth > 12) {
+ timer.wMonth = timer.wMonth - 12;
+ timer.wYear = timer.wYear + 1;
+ }
+ DWORD value = timer.wYear * 10000 + timer.wMonth * 100 + timer.wDay;
+ ::RegSetValueEx(key, company, 0, REG_DWORD, (LPBYTE)&value, sizeof(DWORD));
+ }
+
+ ::RegCloseKey(key);
+ }
+
+ return can_re_offer;
+}
+
+// Helper function to read a value from registry. Returns true if value
+// is read successfully and stored in parameter value. Returns false otherwise.
+bool ReadValueFromRegistry(HKEY root_key, const wchar_t *sub_key,
+ const wchar_t *value_name, wchar_t *value,
+ size_t *size) {
+ HKEY key;
+ if ((::RegOpenKeyEx(root_key, sub_key, NULL,
+ KEY_READ, &key) == ERROR_SUCCESS) &&
+ (::RegQueryValueEx(key, value_name, NULL, NULL,
+ reinterpret_cast<LPBYTE>(value),
+ reinterpret_cast<LPDWORD>(size)) == ERROR_SUCCESS)) {
+ ::RegCloseKey(key);
+ return true;
+ }
+ return false;
+}
+
+bool IsChromeInstalled(HKEY root_key) {
+ wchar_t version[64];
+ size_t size = _countof(version);
+ if (ReadValueFromRegistry(root_key, kChromeRegClientsKey, kChromeRegVersion,
+ version, &size))
+ return true;
+ return false;
+}
+
+bool IsWinXPSp1OrLater(bool* is_vista_or_later) {
+ OSVERSIONINFOEX osviex = { sizeof(OSVERSIONINFOEX) };
+ int r = ::GetVersionEx((LPOSVERSIONINFO)&osviex);
+ // If this failed we're on Win9X or a pre NT4SP6 OS.
+ if (!r)
+ return false;
+
+ if (osviex.dwMajorVersion < 5)
+ return false;
+
+ if (osviex.dwMajorVersion > 5) {
+ *is_vista_or_later = true;
+ return true; // way beyond Windows XP;
+ }
+
+ if (osviex.dwMinorVersion >= 1 && osviex.wServicePackMajor >= 1)
+ return true; // Windows XP SP1 or better.
+
+ return false; // Windows 2000, WinXP no Service Pack.
+}
+
+// Note this function should not be called on old Windows versions where these
+// Windows API are not available. We always invoke this function after checking
+// that current OS is Vista or later.
+bool VerifyAdminGroup() {
+ SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
+ PSID Group;
+ BOOL check = ::AllocateAndInitializeSid(&NtAuthority, 2,
+ SECURITY_BUILTIN_DOMAIN_RID,
+ DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0,
+ 0, 0, 0,
+ &Group);
+ if (check) {
+ if (!::CheckTokenMembership(NULL, Group, &check))
+ check = FALSE;
+ }
+ ::FreeSid(Group);
+ return (check == TRUE);
+}
+
+bool VerifyHKLMAccess(const wchar_t* sub_key) {
+ HKEY root = HKEY_LOCAL_MACHINE;
+ wchar_t str[] = L"test";
+ bool result = false;
+ DWORD disposition = 0;
+ HKEY key = NULL;
+
+ if (::RegCreateKeyEx(root, sub_key, 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL,
+ &key, &disposition) == ERROR_SUCCESS) {
+ if (::RegSetValueEx(key, str, 0, REG_SZ, (LPBYTE)str,
+ (DWORD)lstrlen(str)) == ERROR_SUCCESS) {
+ result = true;
+ RegDeleteValue(key, str);
+ }
+
+ // If we create the main key, delete the entire key.
+ if (disposition == REG_CREATED_NEW_KEY)
+ RegDeleteKey(key, NULL);
+
+ RegCloseKey(key);
+ }
+
+ return result;
+}
+
+bool IsRunningElevated() {
+ // This method should be called only for Vista or later.
+ bool is_vista_or_later = false;
+ IsWinXPSp1OrLater(&is_vista_or_later);
+ if (!is_vista_or_later || !VerifyAdminGroup())
+ return false;
+
+ HANDLE process_token;
+ if (!::OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &process_token))
+ return false;
+
+ TOKEN_ELEVATION_TYPE elevation_type = TokenElevationTypeDefault;
+ DWORD size_returned = 0;
+ if (!::GetTokenInformation(process_token, TokenElevationType,
+ &elevation_type, sizeof(elevation_type),
+ &size_returned)) {
+ ::CloseHandle(process_token);
+ return false;
+ }
+
+ ::CloseHandle(process_token);
+ return (elevation_type == TokenElevationTypeFull);
+}
+
+bool GetUserIdForProcess(size_t pid, wchar_t** user_sid) {
+ HANDLE process_handle = ::OpenProcess(PROCESS_QUERY_INFORMATION, TRUE, pid);
+ if (process_handle == NULL)
+ return false;
+
+ HANDLE process_token;
+ bool result = false;
+ if (::OpenProcessToken(process_handle, TOKEN_QUERY, &process_token)) {
+ DWORD size = 0;
+ ::GetTokenInformation(process_token, TokenUser, NULL, 0, &size);
+ if (::GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
+ ::GetLastError() == ERROR_SUCCESS) {
+ DWORD actual_size = 0;
+ BYTE* token_user = new BYTE[size];
+ if ((::GetTokenInformation(process_token, TokenUser, token_user, size,
+ &actual_size)) &&
+ (actual_size <= size)) {
+ PSID sid = reinterpret_cast<TOKEN_USER*>(token_user)->User.Sid;
+ if (::ConvertSidToStringSid(sid, user_sid))
+ result = true;
+ }
+ delete[] token_user;
+ }
+ ::CloseHandle(process_token);
+ }
+ ::CloseHandle(process_handle);
+ return result;
+}
+} // namespace
+
+#pragma comment(linker, "/EXPORT:GoogleChromeCompatibilityCheck=_GoogleChromeCompatibilityCheck@8,PRIVATE")
+DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag, DWORD *reasons) {
+ DWORD local_reasons = 0;
+
+ bool is_vista_or_later = false;
+ // System requirements?
+ if (!IsWinXPSp1OrLater(&is_vista_or_later))
+ local_reasons |= GCCC_ERROR_OSNOTSUPPORTED;
+
+ if (IsChromeInstalled(HKEY_LOCAL_MACHINE))
+ local_reasons |= GCCC_ERROR_SYSTEMLEVELALREADYPRESENT;
+
+ if (IsChromeInstalled(HKEY_CURRENT_USER))
+ local_reasons |= GCCC_ERROR_USERLEVELALREADYPRESENT;
+
+ if (!VerifyHKLMAccess(kChromeRegClientsKey)) {
+ local_reasons |= GCCC_ERROR_ACCESSDENIED;
+ } else if (is_vista_or_later && !VerifyAdminGroup()) {
+ // For Vista or later check for elevation since even for admin user we could
+ // be running in non-elevated mode. We require integrity level High.
+ local_reasons |= GCCC_ERROR_INTEGRITYLEVEL;
+ }
+
+ // First clean up the registry keys left over previously.
+ // Then only check whether we can re-offer, if everything else is OK.
+ CleanUpRegistryValues();
+ if (local_reasons == 0 && !CanReOfferChrome(set_flag))
+ local_reasons |= GCCC_ERROR_ALREADYOFFERED;
+
+ // Done. Copy/return results.
+ if (reasons != NULL)
+ *reasons = local_reasons;
+
+ return (*reasons == 0);
+}
+
+#pragma comment(linker, "/EXPORT:LaunchGoogleChrome=_LaunchGoogleChrome@0,PRIVATE")
+DLLEXPORT BOOL __stdcall LaunchGoogleChrome() {
+ wchar_t launch_cmd[MAX_PATH];
+ size_t size = _countof(launch_cmd);
+ if (!ReadValueFromRegistry(HKEY_LOCAL_MACHINE, kChromeRegClientStateKey,
+ kChromeRegLastLaunchCmd, launch_cmd, &size)) {
+ size = _countof(launch_cmd);
+ if (!ReadValueFromRegistry(HKEY_LOCAL_MACHINE, kChromeRegClientStateKey,
+ kChromeRegLaunchCmd, launch_cmd, &size)) {
+ return false;
+ }
+ }
+
+ HRESULT hr = ::CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ if (hr != S_OK) {
+ if (hr == S_FALSE)
+ ::CoUninitialize();
+ return false;
+ }
+
+ if (::CoInitializeSecurity(NULL, -1, NULL, NULL,
+ RPC_C_AUTHN_LEVEL_PKT_PRIVACY,
+ RPC_C_IMP_LEVEL_IDENTIFY, NULL,
+ EOAC_DYNAMIC_CLOAKING, NULL) != S_OK) {
+ ::CoUninitialize();
+ return false;
+ }
+
+ bool impersonation_success = false;
+ if (IsRunningElevated()) {
+ wchar_t* curr_proc_sid;
+ if (!GetUserIdForProcess(GetCurrentProcessId(), &curr_proc_sid)) {
+ ::CoUninitialize();
+ return false;
+ }
+
+ DWORD pid = 0;
+ ::GetWindowThreadProcessId(::GetShellWindow(), &pid);
+ if (pid <= 0) {
+ ::LocalFree(curr_proc_sid);
+ ::CoUninitialize();
+ return false;
+ }
+
+ wchar_t* exp_proc_sid;
+ if (GetUserIdForProcess(pid, &exp_proc_sid)) {
+ if (_wcsicmp(curr_proc_sid, exp_proc_sid) == 0) {
+ HANDLE process_handle = ::OpenProcess(
+ PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION, TRUE, pid);
+ if (process_handle != NULL) {
+ HANDLE process_token;
+ HANDLE user_token;
+ if (::OpenProcessToken(process_handle, TOKEN_DUPLICATE | TOKEN_QUERY,
+ &process_token) &&
+ ::DuplicateTokenEx(process_token,
+ TOKEN_IMPERSONATE | TOKEN_QUERY |
+ TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE,
+ NULL, SecurityImpersonation,
+ TokenPrimary, &user_token) &&
+ (::ImpersonateLoggedOnUser(user_token) != 0)) {
+ impersonation_success = true;
+ }
+ ::CloseHandle(user_token);
+ ::CloseHandle(process_token);
+ ::CloseHandle(process_handle);
+ }
+ }
+ ::LocalFree(exp_proc_sid);
+ }
+
+ ::LocalFree(curr_proc_sid);
+ if (!impersonation_success) {
+ ::CoUninitialize();
+ return false;
+ }
+ }
+
+ bool ret = false;
+ CComPtr<IProcessLauncher> ipl;
+ if (!FAILED(ipl.CoCreateInstance(__uuidof(ProcessLauncherClass), NULL,
+ CLSCTX_LOCAL_SERVER))) {
+ if (!FAILED(ipl->LaunchCmdLine(launch_cmd)))
+ ret = true;
+ ipl.Release();
+ }
+
+ if (impersonation_success)
+ ::RevertToSelf();
+ ::CoUninitialize();
+ return ret;
+}
diff --git a/chrome/installer/gcapi/gcapi.h b/chrome/installer/gcapi/gcapi.h
index 6ee4557..4d45d30 100644
--- a/chrome/installer/gcapi/gcapi.h
+++ b/chrome/installer/gcapi/gcapi.h
@@ -23,9 +23,9 @@ extern "C" {
// for the reason, you can pass NULL for reasons.
// set_flag indicates whether a flag should be set indicating that Chrome was
// offered within the last six months; if passed FALSE, this method will not
-// set the flag even if Chrome can be offered. If passed TRUE, this method
+// set the flag even if Chrome can be offered. If passed TRUE, this method
// will set the flag only if Chrome can be offered.
-DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag,
+DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag,
DWORD *reasons);
// This function launches Google Chrome after a successful install. Make
@@ -36,6 +36,6 @@ DLLEXPORT BOOL __stdcall LaunchGoogleChrome();
// Funtion pointer type declarations to use with GetProcAddress.
typedef BOOL (__stdcall * GCCC_CompatibilityCheck)(BOOL, DWORD *);
typedef BOOL (__stdcall * GCCC_LaunchGC)(HANDLE *);
-} // extern "C"
+} // extern "C"
#endif // # CHROME_INSTALLER_GCAPI_GCAPI_H_
diff --git a/chrome/installer/gcapi/gcapi_test.cc b/chrome/installer/gcapi/gcapi_test.cc
index 268033d..838397cd 100644
--- a/chrome/installer/gcapi/gcapi_test.cc
+++ b/chrome/installer/gcapi/gcapi_test.cc
@@ -14,9 +14,9 @@ void call_statically() {
// running this twice verifies that the first call does not set
// a flag that would make the second fail. Thus, the results
// of the two calls should be the same (no state should have changed)
- result_flag_off = GoogleChromeCompatibilityCheck(FALSE, &reason);
+ result_flag_off = GoogleChromeCompatibilityCheck(FALSE, &reason);
result_flag_on = GoogleChromeCompatibilityCheck(TRUE, &reason);
-
+
if (result_flag_off != result_flag_on)
printf("Registry key flag is not being set properly.");
@@ -30,7 +30,7 @@ void call_dynamically() {
printf("Couldn't load gcapi_dll.dll.\n");
return;
}
-
+
GCCC_CompatibilityCheck gccfn = (GCCC_CompatibilityCheck) GetProcAddress(
module, "GoogleChromeCompatibilityCheck");
if (gccfn != NULL) {
diff --git a/chrome/installer/gcapi/resource.h b/chrome/installer/gcapi/resource.h
index 8295c6c..3b9f419 100644
--- a/chrome/installer/gcapi/resource.h
+++ b/chrome/installer/gcapi/resource.h
@@ -1,14 +1,14 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by gcapi_test.rc
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 101
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1001
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by gcapi_test.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/chrome/installer/mini_installer/mini_installer.cc b/chrome/installer/mini_installer/mini_installer.cc
index d81c992..6c659be 100644
--- a/chrome/installer/mini_installer/mini_installer.cc
+++ b/chrome/installer/mini_installer/mini_installer.cc
@@ -405,7 +405,7 @@ int WMain(HMODULE module) {
if (!RunSetup(have_upacked_setup, base_path,
archive_name, &setup_exit_code)) {
return setup_exit_code;
- }
+ }
wchar_t value[4];
if ((!ReadValueFromRegistry(HKEY_CURRENT_USER, kCleanupRegistryKey,
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc
index fd2404a..6a2a170 100644
--- a/chrome/installer/setup/main.cc
+++ b/chrome/installer/setup/main.cc
@@ -252,7 +252,7 @@ int GetInstallOptions(const CommandLine& cmd_line) {
if (preferences & installer_util::MASTER_PROFILE_VERBOSE_LOGGING ||
cmd_line.HasSwitch(installer_util::switches::kVerboseLogging))
options |= installer_util::VERBOSE_LOGGING;
-
+
return options;
}
diff --git a/chrome/installer/util/copy_tree_work_item.cc b/chrome/installer/util/copy_tree_work_item.cc
index fc1d5e3..0b51f95 100644
--- a/chrome/installer/util/copy_tree_work_item.cc
+++ b/chrome/installer/util/copy_tree_work_item.cc
@@ -68,7 +68,7 @@ bool CopyTreeWorkItem::Do() {
(overwrite_option_ == WorkItem::IF_NOT_PRESENT)) {
// handle overwrite_option_ = IF_NOT_PRESENT case.
return true;
- }
+ }
// In all cases that reach here, move dest to a backup path.
if (dest_exist) {
diff --git a/chrome/installer/util/html_dialog.h b/chrome/installer/util/html_dialog.h
index 39b741d..46ed1c8 100644
--- a/chrome/installer/util/html_dialog.h
+++ b/chrome/installer/util/html_dialog.h
@@ -16,7 +16,7 @@
namespace installer {
-// Interface for implementing a native HTML dialog.
+// Interface for implementing a native HTML dialog.
class HTMLDialog {
public:
enum DialogResult {
@@ -44,7 +44,7 @@ class HTMLDialog {
// in HTML so each native implementation needs to map the user action into
// one of the 6 possible results of DialogResult. Important, call this
// method only from the main (or UI) thread.
- virtual DialogResult ShowModal(void* parent_window,
+ virtual DialogResult ShowModal(void* parent_window,
CustomizationCallback* callback) = 0;
// If the result of ShowModal() was EXTRA, the information is available
diff --git a/chrome/installer/util/html_dialog_impl.cc b/chrome/installer/util/html_dialog_impl.cc
index a758d42..8925016 100644
--- a/chrome/installer/util/html_dialog_impl.cc
+++ b/chrome/installer/util/html_dialog_impl.cc
@@ -32,7 +32,7 @@ namespace installer {
// <input name="accept" type="checkbox" /> My cool option
// <input name="submit" type="submit" value="[accept]" />
// </form>
-//
+//
// function submit_it(f) {
// if (f.accept.checked) {
// window.returnValue = 1; <-- this matches HTML_DLG_ACCEPT
@@ -85,7 +85,7 @@ HTMLDialogWin::CustomizationCallback* HTMLDialogWin::callback_ = NULL;
// This hook function gets called for messages bound to the windows that
// ShowHTMLDialog creates. We tell apart the top window because it has the
-// system menu style.
+// system menu style.
LRESULT HTMLDialogWin::MsgFilter(int code, WPARAM wParam, LPARAM lParam) {
static bool tweak_window = true;
if (lParam && tweak_window) {
@@ -113,7 +113,7 @@ bool HTMLDialogWin::InternalDoDialog(CustomizationCallback* callback,
IMoniker *url_moniker = NULL;
::CreateURLMoniker(NULL, url_.c_str(), &url_moniker);
- if (!url_moniker)
+ if (!url_moniker)
return false;
wchar_t* extra_args = NULL;
diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py
index bb4e5a0..2c53380 100755
--- a/chrome/installer/util/prebuild/create_string_rc.py
+++ b/chrome/installer/util/prebuild/create_string_rc.py
@@ -150,7 +150,7 @@ def WriteHeaderFile(translated_strings, out_filename):
"""Writes a .h file with resource ids. This file can be included by the
executable to refer to identifiers."""
lines = []
-
+
# Write the values for how the languages ids are offset.
seen_languages = set()
offset_id = 0
@@ -180,7 +180,7 @@ def WriteHeaderFile(translated_strings, out_filename):
outfile.write('\n'.join(lines))
outfile.write('\n') # .rc files must end in a new line
outfile.close()
-
+
def main(argv):
translated_strings = CollectTranslatedStrings()
kFilebase = os.path.join(argv[1], 'installer_util_strings')
diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h
index 246a50f..b9d7275 100644
--- a/chrome/installer/util/util_constants.h
+++ b/chrome/installer/util/util_constants.h
@@ -16,8 +16,8 @@ enum InstallStatus {
INSTALL_REPAIRED, // Same version reinstalled for repair
NEW_VERSION_UPDATED, // Chrome successfully updated to new version
HIGHER_VERSION_EXISTS, // Higher version of Chrome already exists
- USER_LEVEL_INSTALL_EXISTS, // User level install already exists
- SYSTEM_LEVEL_INSTALL_EXISTS, // Machine level install already exists
+ USER_LEVEL_INSTALL_EXISTS, // User level install already exists
+ SYSTEM_LEVEL_INSTALL_EXISTS, // Machine level install already exists
INSTALL_FAILED, // Install/update failed
OS_NOT_SUPPORTED, // Current OS not supported
OS_ERROR, // OS API call failed
diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc
index bc40fb9..7c56f24 100644
--- a/chrome/plugin/plugin_main.cc
+++ b/chrome/plugin/plugin_main.cc
@@ -18,7 +18,7 @@
// mainline routine for running as the plugin process
int PluginMain(const MainFunctionParams& parameters) {
const CommandLine& parsed_command_line = parameters.command_line_;
- sandbox::TargetServices* target_services =
+ sandbox::TargetServices* target_services =
parameters.sandbox_info_.TargetServices();
// The main thread of the plugin services IO.
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 671e977..891a9df 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -26,7 +26,7 @@ PluginThread::PluginThread()
: ChildThread(base::Thread::Options(MessageLoop::TYPE_UI, 0)),
preloaded_plugin_module_(NULL) {
plugin_path_ = FilePath::FromWStringHack(
- CommandLine::ForCurrentProcess()->GetSwitchValue(switches::kPluginPath));
+ CommandLine::ForCurrentProcess()->GetSwitchValue(switches::kPluginPath));
}
PluginThread::~PluginThread() {
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index b2041d4..023d807 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -80,8 +80,8 @@ void WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
OnDidFinishLoadWithReason)
IPC_MESSAGE_HANDLER(PluginMsg_SetFocus, OnSetFocus)
IPC_MESSAGE_HANDLER(PluginMsg_HandleEvent, OnHandleEvent)
- IPC_MESSAGE_HANDLER(PluginMsg_Paint, OnPaint)
- IPC_MESSAGE_HANDLER(PluginMsg_DidPaint, OnDidPaint)
+ IPC_MESSAGE_HANDLER(PluginMsg_Paint, OnPaint)
+ IPC_MESSAGE_HANDLER(PluginMsg_DidPaint, OnDidPaint)
IPC_MESSAGE_HANDLER(PluginMsg_Print, OnPrint)
IPC_MESSAGE_HANDLER(PluginMsg_GetPluginScriptableObject,
OnGetPluginScriptableObject)
diff --git a/chrome/renderer/dom_ui_bindings.h b/chrome/renderer/dom_ui_bindings.h
index 75b1385..2ef55e5 100644
--- a/chrome/renderer/dom_ui_bindings.h
+++ b/chrome/renderer/dom_ui_bindings.h
@@ -15,7 +15,7 @@ class DOMBoundBrowserObject : public CppBoundClass {
public:
DOMBoundBrowserObject() : routing_id_(0) { }
virtual ~DOMBoundBrowserObject();
-
+
// Set the message channel back to the browser.
void set_message_sender(IPC::Message::Sender* sender) {
sender_ = sender;
diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc
index 1d69817..7a065f9 100644
--- a/chrome/renderer/renderer_webkitclient_impl.cc
+++ b/chrome/renderer/renderer_webkitclient_impl.cc
@@ -63,7 +63,7 @@ WebString RendererWebKitClientImpl::MimeRegistry::mimeTypeForExtension(
RenderThread::current()->Send(new ViewHostMsg_GetMimeTypeFromExtension(
webkit_glue::WebStringToFilePathString(file_extension), &mime_type));
return ASCIIToUTF16(mime_type);
-
+
}
WebString RendererWebKitClientImpl::MimeRegistry::mimeTypeFromFile(
@@ -78,7 +78,7 @@ WebString RendererWebKitClientImpl::MimeRegistry::mimeTypeFromFile(
FilePath(webkit_glue::WebStringToFilePathString(file_path)),
&mime_type));
return ASCIIToUTF16(mime_type);
-
+
}
WebString RendererWebKitClientImpl::MimeRegistry::preferredExtensionForMIMEType(
diff --git a/chrome/renderer/user_script_slave.cc b/chrome/renderer/user_script_slave.cc
index 10d4e43..bc612f0 100644
--- a/chrome/renderer/user_script_slave.cc
+++ b/chrome/renderer/user_script_slave.cc
@@ -13,7 +13,7 @@
#include "googleurl/src/gurl.h"
#include "webkit/glue/webframe.h"
-#include "grit/renderer_resources.h"
+#include "grit/renderer_resources.h"
// These two strings are injected before and after the Greasemonkey API and
// user script to wrap it in an anonymous scope.
diff --git a/chrome/renderer/webmediaplayer_delegate_impl.cc b/chrome/renderer/webmediaplayer_delegate_impl.cc
index fbadad0..81d0abc 100644
--- a/chrome/renderer/webmediaplayer_delegate_impl.cc
+++ b/chrome/renderer/webmediaplayer_delegate_impl.cc
@@ -60,7 +60,7 @@ WebMediaPlayerDelegateImpl::~WebMediaPlayerDelegateImpl() {
// Cancel all tasks posted on the main_loop_.
CancelAllTasks();
- // After cancelling all tasks, we are sure there will be no calls to
+ // After cancelling all tasks, we are sure there will be no calls to
// web_media_player_, so we are safe to delete it.
if (web_media_player_) {
delete web_media_player_;
@@ -147,7 +147,7 @@ void WebMediaPlayerDelegateImpl::SetVolume(float volume) {
pipeline_.SetVolume(volume);
}
-
+
void WebMediaPlayerDelegateImpl::SetVisible(bool visible) {
DCHECK(main_loop_ && MessageLoop::current() == main_loop_);
@@ -327,7 +327,7 @@ void WebMediaPlayerDelegateImpl::PostTask(int index,
WebMediaPlayerMethod method) {
DCHECK(main_loop_);
- AutoLock auto_lock(task_lock_);
+ AutoLock auto_lock(task_lock_);
if(!tasks_[index]) {
CancelableTask* task = new NotifyWebMediaPlayerTask(web_media_player_,
method);
diff --git a/chrome/renderer/webmediaplayer_delegate_impl.h b/chrome/renderer/webmediaplayer_delegate_impl.h
index 7266b41..95423c7 100644
--- a/chrome/renderer/webmediaplayer_delegate_impl.h
+++ b/chrome/renderer/webmediaplayer_delegate_impl.h
@@ -145,7 +145,7 @@ class WebMediaPlayerDelegateImpl : public webkit_glue::WebMediaPlayerDelegate,
RenderView* view() { return view_; }
private:
- // Methods for posting tasks and cancelling tasks. This method may lives in
+ // Methods for posting tasks and cancelling tasks. This method may lives in
// the main thread or the media threads.
void PostTask(int index, WebMediaPlayerMethod method);
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index e5cf44a..89a0c45 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -463,7 +463,7 @@ void WebPluginDelegateProxy::Paint(HDC hdc, const gfx::Rect& damaged_rect) {
rect.x()-plugin_rect_.x(), rect.y()-plugin_rect_.y(), SRCCOPY);
if (invalidate_pending_) {
- // Only send the PaintAck message if this paint is in response to an
+ // Only send the PaintAck message if this paint is in response to an
// invalidate from the plugin, since this message acts as an access token
// to ensure only one process is using the transport dib at a time.
invalidate_pending_ = false;
@@ -472,7 +472,7 @@ void WebPluginDelegateProxy::Paint(HDC hdc, const gfx::Rect& damaged_rect) {
}
bool WebPluginDelegateProxy::BackgroundChanged(
- HDC hdc,
+ HDC hdc,
const gfx::Rect& rect) {
HBITMAP hbitmap = static_cast<HBITMAP>(GetCurrentObject(hdc, OBJ_BITMAP));
if (hbitmap == NULL) {
diff --git a/chrome/renderer/webworker_proxy.h b/chrome/renderer/webworker_proxy.h
index 019ff0d..6967ea0 100644
--- a/chrome/renderer/webworker_proxy.h
+++ b/chrome/renderer/webworker_proxy.h
@@ -17,7 +17,7 @@ class Message;
}
// This class provides an implementation of WebWorker that the renderer provides
-// to the glue. This class converts function calls to IPC messages that are
+// to the glue. This class converts function calls to IPC messages that are
// dispatched in the worker process by WebWorkerClientProxy. It also receives
// IPC messages from WebWorkerClientProxy which it converts to function calls to
// WebWorkerClient.
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 9e724f8..96c779a 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -74,7 +74,7 @@ IPC_BEGIN_MESSAGES(Automation)
// This message notifies the AutomationProvider to navigate to a specified
// url in the tab with given handle. The first parameter is the handle to
// the tab resource. The second parameter is the target url. The return
- // value contains a status code which is nonnegative on success.
+ // value contains a status code which is nonnegative on success.
// See AutomationMsg_NavigationResponseValues for the return value.
IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateToURL, int, GURL,
AutomationMsg_NavigationResponseValues)
@@ -128,7 +128,7 @@ IPC_BEGIN_MESSAGES(Automation)
// The return value contains the size of the title string. On error, this
// value should be -1 and empty string. Note that the title can be empty in
// which case the size would be 0.
- IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabTitle,
+ IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabTitle,
int,
int,
std::wstring)
@@ -798,7 +798,7 @@ IPC_BEGIN_MESSAGES(Automation)
// Queries whether an app modal dialog is currently being shown. (i.e. a
// javascript alert) and which buttons it contains.
- IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_ShowingAppModalDialog,
+ IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_ShowingAppModalDialog,
bool /* showing dialog */,
int /* view::DelegateDialog::DialogButton */)
diff --git a/chrome/test/data/extensions/bad/invalid_manifest/1/manifest.json b/chrome/test/data/extensions/bad/invalid_manifest/1/manifest.json
index 3aac2d6..0eb81fa 100644
--- a/chrome/test/data/extensions/bad/invalid_manifest/1/manifest.json
+++ b/chrome/test/data/extensions/bad/invalid_manifest/1/manifest.json
@@ -1 +1 @@
-I am not a manifest
+I am not a manifest
diff --git a/chrome/test/data/extensions/bad/missing_content_script/1/manifest.json b/chrome/test/data/extensions/bad/missing_content_script/1/manifest.json
index af1ea06..55e62a4 100644
--- a/chrome/test/data/extensions/bad/missing_content_script/1/manifest.json
+++ b/chrome/test/data/extensions/bad/missing_content_script/1/manifest.json
@@ -1,13 +1,13 @@
-{
- "format_version": 1,
- "id": "00123456789ABCDEF0123456789ABCDEF0123456",
- "version": "1.0.0.0",
- "name": "My extension 1",
- "description": "The first extension that I made.",
- "content_scripts": [
- {
- "matches": ["http://*.yahoo.com/*"],
- "files": ["script1.js"]
- }
- ]
-}
+{
+ "format_version": 1,
+ "id": "00123456789ABCDEF0123456789ABCDEF0123456",
+ "version": "1.0.0.0",
+ "name": "My extension 1",
+ "description": "The first extension that I made.",
+ "content_scripts": [
+ {
+ "matches": ["http://*.yahoo.com/*"],
+ "files": ["script1.js"]
+ }
+ ]
+}
diff --git a/chrome/test/data/extensions/good/extension1/1/manifest.json b/chrome/test/data/extensions/good/extension1/1/manifest.json
index 5a43dd0..bb8944b 100644
--- a/chrome/test/data/extensions/good/extension1/1/manifest.json
+++ b/chrome/test/data/extensions/good/extension1/1/manifest.json
@@ -1,17 +1,17 @@
-{
- "format_version": 1,
- "id": "00123456789ABCDEF0123456789ABCDEF0123456",
- "version": "1.0.0.0",
- "name": "My extension 1",
- "description": "The first extension that I made.",
- "content_scripts": [
- {
- "matches": ["http://*.google.com/*", "https://*.google.com/*"],
- "js": ["script1.js"]
- },
- {
- "matches": ["http://*.yahoo.com/*"],
- "js": ["script2.js"]
- }
- ]
-}
+{
+ "format_version": 1,
+ "id": "00123456789ABCDEF0123456789ABCDEF0123456",
+ "version": "1.0.0.0",
+ "name": "My extension 1",
+ "description": "The first extension that I made.",
+ "content_scripts": [
+ {
+ "matches": ["http://*.google.com/*", "https://*.google.com/*"],
+ "js": ["script1.js"]
+ },
+ {
+ "matches": ["http://*.yahoo.com/*"],
+ "js": ["script2.js"]
+ }
+ ]
+}
diff --git a/chrome/test/data/extensions/good/extension2/2/manifest.json b/chrome/test/data/extensions/good/extension2/2/manifest.json
index 5e1fb5a..d5bb394 100644
--- a/chrome/test/data/extensions/good/extension2/2/manifest.json
+++ b/chrome/test/data/extensions/good/extension2/2/manifest.json
@@ -1,7 +1,7 @@
-{
- "format_version": 1,
- "id": "10123456789ABCDEF0123456789ABCDEF0123456",
- "version": "1.0.0.0",
- "name": "My extension 2",
- "plugins_dir": "npapi"
-}
+{
+ "format_version": 1,
+ "id": "10123456789ABCDEF0123456789ABCDEF0123456",
+ "version": "1.0.0.0",
+ "name": "My extension 2",
+ "plugins_dir": "npapi"
+}
diff --git a/chrome/test/data/pref_service/overlay.json b/chrome/test/data/pref_service/overlay.json
index ea4d831..11c0293 100644
--- a/chrome/test/data/pref_service/overlay.json
+++ b/chrome/test/data/pref_service/overlay.json
@@ -1,22 +1,22 @@
-{
- "both": {
- "bool": false,
- "dictionary": {
- "value": "persistent"
- },
- "int": 1,
- "list": [ "persistent" ],
- "real": 1,
- "string": "persistent"
- },
- "persistent": {
- "bool": false,
- "dictionary": {
- "value": "persistent"
- },
- "int": 1,
- "list": [ "persistent" ],
- "real": 1.0,
- "string": "persistent"
- }
-}
+{
+ "both": {
+ "bool": false,
+ "dictionary": {
+ "value": "persistent"
+ },
+ "int": 1,
+ "list": [ "persistent" ],
+ "real": 1,
+ "string": "persistent"
+ },
+ "persistent": {
+ "bool": false,
+ "dictionary": {
+ "value": "persistent"
+ },
+ "int": 1,
+ "list": [ "persistent" ],
+ "real": 1.0,
+ "string": "persistent"
+ }
+}
diff --git a/chrome/test/data/safe_browsing/download_update.py b/chrome/test/data/safe_browsing/download_update.py
index ff504f8..bef5c6d 100755
--- a/chrome/test/data/safe_browsing/download_update.py
+++ b/chrome/test/data/safe_browsing/download_update.py
@@ -29,7 +29,7 @@ for line in response_file:
filename = chunk_url[chunk_url.rfind('/') + 1:]
filename = "%03d" % counter + filename[0:filename.rfind('_')]
counter += 1
-
+
urllib.urlretrieve(chunk_url, filename)
response_file.close()
diff --git a/chrome/test/debugger/debugger_unittests.py b/chrome/test/debugger/debugger_unittests.py
index 8384fb0..19db317 100755
--- a/chrome/test/debugger/debugger_unittests.py
+++ b/chrome/test/debugger/debugger_unittests.py
@@ -39,7 +39,7 @@ def RunTests(build_dir=None):
os.path.join(chrome_dir, "test", "debugger", "mjsunit.js"),
os.path.join(chrome_dir, "test", "debugger", "test_protocol.js")
]
- (retcode, output) = google.process_utils.RunCommandFull(cmd,
+ (retcode, output) = google.process_utils.RunCommandFull(cmd,
collect_output=True)
if "Success" in output:
return 0
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index aae695b..aec6391 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -143,7 +143,7 @@ Browser* InProcessBrowserTest::CreateBrowser(Profile* profile) {
browser->AddTabWithURL(
GURL("about:blank"), GURL(), PageTransition::START_PAGE, true, NULL);
-
+
// Wait for the page to finish loading.
ui_test_utils::WaitForNavigation(
browser->GetSelectedTabContents()->controller());
diff --git a/chrome/test/interactive_ui/npapi_interactive_test.cc b/chrome/test/interactive_ui/npapi_interactive_test.cc
index 4ec2b86..95be3f6 100644
--- a/chrome/test/interactive_ui/npapi_interactive_test.cc
+++ b/chrome/test/interactive_ui/npapi_interactive_test.cc
@@ -41,14 +41,14 @@ const char kTestCompleteCookie[] = "status";
const char kTestCompleteSuccess[] = "OK";
const int kShortWaitTimeout = 5 * 1000;
-// Tests if a plugin executing a self deleting script in the context of
+// Tests if a plugin executing a self deleting script in the context of
// a synchronous mousemove works correctly
TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) {
if (!UITest::in_process_renderer()) {
scoped_ptr<TabProxy> tab_proxy(GetActiveTab());
HWND tab_window = NULL;
tab_proxy->GetHWND(&tab_window);
-
+
EXPECT_TRUE(IsWindow(tab_window));
show_window_ = true;
@@ -59,8 +59,8 @@ TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) {
POINT cursor_position = {130, 130};
ClientToScreen(tab_window, &cursor_position);
- double screen_width = ::GetSystemMetrics( SM_CXSCREEN ) - 1;
- double screen_height = ::GetSystemMetrics( SM_CYSCREEN ) - 1;
+ double screen_width = ::GetSystemMetrics( SM_CXSCREEN ) - 1;
+ double screen_height = ::GetSystemMetrics( SM_CYSCREEN ) - 1;
double location_x = cursor_position.x * (65535.0f / screen_width);
double location_y = cursor_position.y * (65535.0f / screen_height);
diff --git a/chrome/test/interactive_ui/view_event_test_base.h b/chrome/test/interactive_ui/view_event_test_base.h
index 42a614b..673657c 100644
--- a/chrome/test/interactive_ui/view_event_test_base.h
+++ b/chrome/test/interactive_ui/view_event_test_base.h
@@ -81,7 +81,7 @@ class ViewEventTestBase : public views::WindowDelegate,
void Release() {}
protected:
- // Returns the view that is added to the window.
+ // Returns the view that is added to the window.
virtual views::View* CreateContentsView() = 0;
// Called once the message loop is running.
@@ -129,7 +129,7 @@ class ViewEventTestBase : public views::WindowDelegate,
DISALLOW_COPY_AND_ASSIGN(ViewEventTestBase);
};
-// Convenience macro for defining a ViewEventTestBase. See class description
+// Convenience macro for defining a ViewEventTestBase. See class description
// of ViewEventTestBase for details.
#define VIEW_TEST(test_class, name) \
TEST_F(test_class, name) {\
diff --git a/chrome/test/plugin/plugin_test.cpp b/chrome/test/plugin/plugin_test.cpp
index 0faaf8e..07e764a 100644
--- a/chrome/test/plugin/plugin_test.cpp
+++ b/chrome/test/plugin/plugin_test.cpp
@@ -193,7 +193,7 @@ class ActiveXTest : public PluginTest {
L"\\activex_test_control.dll";
HMODULE h = LoadLibrary(test_control_path.c_str());
ASSERT_TRUE(h != NULL) << "Failed to load activex_test_control.dll";
- const char* func_name = register_server ?
+ const char* func_name = register_server ?
"DllRegisterServer" : "DllUnregisterServer";
DllRegUnregServerFunc func = reinterpret_cast<DllRegUnregServerFunc>(
GetProcAddress(h, func_name));
diff --git a/chrome/test/test_location_bar.h b/chrome/test/test_location_bar.h
index 6f9b2ab..d81eb4a 100644
--- a/chrome/test/test_location_bar.h
+++ b/chrome/test/test_location_bar.h
@@ -39,7 +39,7 @@ class TestLocationBar : public LocationBar {
virtual void SaveStateToContents(TabContents* contents) {}
private:
-
+
// Test-supplied values that will be returned through the LocationBar
// interface.
std::wstring input_string_;
diff --git a/chrome/test/ui/npapi_test_helper.cc b/chrome/test/ui/npapi_test_helper.cc
index 83e3c5b..c6753d0 100644
--- a/chrome/test/ui/npapi_test_helper.cc
+++ b/chrome/test/ui/npapi_test_helper.cc
@@ -31,7 +31,7 @@
#include "chrome/test/ui/npapi_test_helper.h"
-NPAPITester::NPAPITester()
+NPAPITester::NPAPITester()
: UITest() {
}
@@ -41,7 +41,7 @@ void NPAPITester::SetUp() {
std::wstring plugins_directory = browser_directory_ + L"\\plugins";
std::wstring plugin_src = browser_directory_ + L"\\npapi_test_plugin.dll";
plugin_dll_ = plugins_directory + L"\\npapi_test_plugin.dll";
-
+
CreateDirectory(plugins_directory.c_str(), NULL);
CopyFile(plugin_src.c_str(), plugin_dll_.c_str(), FALSE);
diff --git a/chrome/test/ui/npapi_uitest.cpp b/chrome/test/ui/npapi_uitest.cpp
index d8dbdff..8d808be 100644
--- a/chrome/test/ui/npapi_uitest.cpp
+++ b/chrome/test/ui/npapi_uitest.cpp
@@ -72,7 +72,7 @@ TEST_F(NPAPITester, Arguments) {
std::wstring test_case = L"arguments.html";
GURL url = GetTestUrl(L"npapi", test_case);
NavigateToURL(url);
- WaitForFinish("arguments", "1", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
}
@@ -83,35 +83,35 @@ TEST_F(NPAPITester, ManyPlugins) {
GURL url(GetTestUrl(L"npapi", test_case));
NavigateToURL(url);
- WaitForFinish("arguments", "1", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "2", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "2", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "3", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "3", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "4", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "4", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "5", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "5", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "6", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "6", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "7", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "7", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "8", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "8", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "9", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "9", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "10", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "10", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "11", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "11", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "12", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "12", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "13", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "13", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "14", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "14", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
- WaitForFinish("arguments", "15", url, kTestCompleteCookie,
+ WaitForFinish("arguments", "15", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
}
@@ -120,17 +120,17 @@ TEST_F(NPAPITester, GetURL) {
std::wstring test_case = L"geturl.html";
GURL url = GetTestUrl(L"npapi", test_case);
NavigateToURL(url);
- WaitForFinish("geturl", "1", url, kTestCompleteCookie,
+ WaitForFinish("geturl", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
}
-// Test various calls to GetURL for javascript URLs with
+// Test various calls to GetURL for javascript URLs with
// non NULL targets from a plugin.
TEST_F(NPAPITester, GetJavaScriptURL) {
std::wstring test_case = L"get_javascript_url.html";
GURL url = GetTestUrl(L"npapi", test_case);
NavigateToURL(url);
- WaitForFinish("getjavascripturl", "1", url, kTestCompleteCookie,
+ WaitForFinish("getjavascripturl", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
}
@@ -142,13 +142,13 @@ TEST_F(NPAPITester, NPObjectProxy) {
std::wstring test_case = L"npobject_proxy.html";
GURL url = GetTestUrl(L"npapi", test_case);
NavigateToURL(url);
- WaitForFinish("npobject_proxy", "1", url, kTestCompleteCookie,
+ WaitForFinish("npobject_proxy", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
}
// Tests if a plugin executing a self deleting script using NPN_GetURL
// works without crashing or hanging
-TEST_F(NPAPITester, SelfDeletePluginGetUrl) {
+TEST_F(NPAPITester, SelfDeletePluginGetUrl) {
std::wstring test_case = L"self_delete_plugin_geturl.html";
GURL url = GetTestUrl(L"npapi", test_case);
NavigateToURL(url);
@@ -186,7 +186,7 @@ TEST_F(NPAPITester, DISABLED_SelfDeletePluginInvokeAlert) {
kShortWaitTimeout);
}
-// Tests if a plugin executing a self deleting script in the context of
+// Tests if a plugin executing a self deleting script in the context of
// a synchronous paint event works correctly
TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousPaint) {
if (!UITest::in_process_renderer()) {
@@ -218,7 +218,7 @@ TEST_F(NPAPIVisiblePluginTester, VerifyPluginWindowRect) {
std::wstring test_case = L"verify_plugin_window_rect.html";
GURL url = GetTestUrl(L"npapi", test_case);
NavigateToURL(url);
- WaitForFinish("checkwindowrect", "1", url, kTestCompleteCookie,
+ WaitForFinish("checkwindowrect", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
}
@@ -238,7 +238,7 @@ TEST_F(NPAPIVisiblePluginTester, VerifyNPObjectLifetimeTest) {
TEST_F(NPAPIVisiblePluginTester, NewFails) {
GURL url = GetTestUrl(L"npapi", L"new_fails.html");
NavigateToURL(url);
- WaitForFinish("new_fails", "1", url, kTestCompleteCookie,
+ WaitForFinish("new_fails", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, kShortWaitTimeout);
}
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index 7471711..af0932b2 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -54,7 +54,7 @@ class NavigationNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(NavigationNotificationObserver);
};
-} // namespace
+} // namespace
void RunMessageLoop() {
MessageLoopForUI* loop = MessageLoopForUI::current();
diff --git a/chrome/tools/automated_ui_test_tools/auto_ui_test_input_generator.py b/chrome/tools/automated_ui_test_tools/auto_ui_test_input_generator.py
index 7756028..7e3d3f9 100755
--- a/chrome/tools/automated_ui_test_tools/auto_ui_test_input_generator.py
+++ b/chrome/tools/automated_ui_test_tools/auto_ui_test_input_generator.py
@@ -4,69 +4,69 @@
"""This generates the input file for automated_ui_tests.exe.
-We take in a list of possible actions separated by new lines, the number of
-commands per file, and the number of actions per command, and generate
+We take in a list of possible actions separated by new lines, the number of
+commands per file, and the number of actions per command, and generate
a single random file, or one or more files containing all possible commands,
-or one file with a partial set of possible commands starting at a certain
+or one file with a partial set of possible commands starting at a certain
command number.
-Example usage:
- python auto_ui_test_input_generator.py --commands-per-file 50
- --actions-per-command 5 --action-list-file possible_actions.txt
+Example usage:
+ python auto_ui_test_input_generator.py --commands-per-file 50
+ --actions-per-command 5 --action-list-file possible_actions.txt
--output random_file.txt
-
- Generates a file called random_file.txt with 50 commands containing 5 actions
- each randomly chosen from the list of new line separated actions in
+
+ Generates a file called random_file.txt with 50 commands containing 5 actions
+ each randomly chosen from the list of new line separated actions in
possible_actions.txt
-
- python auto_ui_test_input_generator.py --commands-per-file 200
+
+ python auto_ui_test_input_generator.py --commands-per-file 200
--actions-per-command 6 --partial-coverage-from 700
- --action-list-file possible_actions.txt
+ --action-list-file possible_actions.txt
--output partial_coverage.txt
-
- Generates a file called partial_coverage.txt with 200 commands containing 6
+
+ Generates a file called partial_coverage.txt with 200 commands containing 6
actions each starting at command #700 and ending at command #899 and chosen
from the list of new line separated actions possible_actions.txt
-
-Options:
- --action-list-file input_file_name
- Name of file containing possible actions separated by new lines. You can
+
+Options:
+ --action-list-file input_file_name
+ Name of file containing possible actions separated by new lines. You can
find supported actions in the automated_ui_tests.h documentation.
-
- --output output_file_name
- Name of XML file that will be outputted for use as input for
+
+ --output output_file_name
+ Name of XML file that will be outputted for use as input for
automated_ui_tests.exe.
-
- --commands-per-file commands_per_file
+
+ --commands-per-file commands_per_file
Number of commands per file.
-
- --actions-per-command actions_per_command
+
+ --actions-per-command actions_per_command
Number of actions per command.
-
- --full-coverage
- If full_coverage flag is set will output as many files as neccesary to cover
- every combination of possible actions. Files will be named
- output_file_name_1.txt, output_file_name_2.txt, etc...
+
+ --full-coverage
+ If full_coverage flag is set will output as many files as neccesary to cover
+ every combination of possible actions. Files will be named
+ output_file_name_1.txt, output_file_name_2.txt, etc...
If --full-coverage is true, --full-coverage-one-file and
--partial-coverage-from are ignored.
-
+
--full-coverage-one-file
- Just like --full_coverage, but outputs to just one file.
- Ignores commands_per_file. This is very likely to cause memory errors on
+ Just like --full_coverage, but outputs to just one file.
+ Ignores commands_per_file. This is very likely to cause memory errors on
large action sets. If --full coverage-one-file is true,
--partial-coverage-from is ignored.
-
- --partial-coverage-from command_to_start_at
- Outputs a part of the full coverage, starting at command number
- |command_to_start_at| and ending at command number |command_to_start_at| +
- |commands_per_file|. Command numbering starts at 0, and the maximum
+
+ --partial-coverage-from command_to_start_at
+ Outputs a part of the full coverage, starting at command number
+ |command_to_start_at| and ending at command number |command_to_start_at| +
+ |commands_per_file|. Command numbering starts at 0, and the maximum
command number is number_of_actions_we_choose_from ^ actions_per_command - 1.
If |command_to_start_at| + |commands_per_file| is greater than the maximum
command number, then only the commands up to the maximum command number
are printed.
-
- --quiet
+
+ --quiet
Silence progress messages.
"""
@@ -76,30 +76,30 @@ import random
import xml.dom.minidom
class ComprehensiveListGenerator:
- """Generates a comprehensive list of all the ways to choose x combinations
+ """Generates a comprehensive list of all the ways to choose x combinations
from an input list, with replacement.
-
- Init takes |list_length|, which is the length of the of the combination and
+
+ Init takes |list_length|, which is the length of the of the combination and
|source_list|, which is the list we want to choose from.
- GetNextPortionOfSourceList() returns a list of length |list_length| with a
- portion of the complete list of all combinations or None once all possible
+ GetNextPortionOfSourceList() returns a list of length |list_length| with a
+ portion of the complete list of all combinations or None once all possible
combinations have been returned.
-
- Example:
+
+ Example:
>>> list_gen = ComprehensiveListGenerator(2, ['a','b','c'])
- >>> print list_gen.GetNextPortionOfSourceList()
+ >>> print list_gen.GetNextPortionOfSourceList()
['a','a']
- >>> print list_gen.GetNextPortionOfSourceList()
+ >>> print list_gen.GetNextPortionOfSourceList()
['a','b']
- >>> print list_gen.GetNextPortionOfSourceList()
+ >>> print list_gen.GetNextPortionOfSourceList()
['a','c']
>>> ...print list_gen.GetNextPortionOfSourceList() 6 more times...
- >>> print list_gen.GetNextPortionOfSourceList()
+ >>> print list_gen.GetNextPortionOfSourceList()
None
>>> list_gen.SetIntegerListToCombinationNumber(2)
>>> print list_gen.GetCurrentPortionOfSourceList()
['a','c']
- >>> print list_gen.GetNextPortionOfSourceList()
+ >>> print list_gen.GetNextPortionOfSourceList()
['b','a']
>>> list_gen.SetIntegerListToCombinationNumber(8)
>>> print list_gen.GetCurrentPortionOfSourceList()
@@ -107,31 +107,31 @@ class ComprehensiveListGenerator:
>>> list_gen.SetIntegerListToCombinationNumber(9)
>>> print list_gen.GetCurrentPortionOfSourceList()
None
-
+
Attributes:
__list_length: Length of the resulting combinations.
__source_list: The list we are pulling combinations from.
- __integer_list: A list of integers representing which indices of
+ __integer_list: A list of integers representing which indices of
|source_list| to return.
"""
-
+
def __init__(self, list_length, source_list):
self.__list_length = list_length
self.__integer_list = None
self.__source_list = source_list
-
+
def SetIntegerListToCombinationNumber(self, combo_number):
- """ Sets the integer list to represent the |combo_number|th number in the
+ """ Sets the integer list to represent the |combo_number|th number in the
sequence, counting from 0.
-
- Args:
+
+ Args:
combo_number: Number to set the integer list to represent.
-
+
Returns: Sets integer_list to None and returns False if the combo_number is
- out of range (bigger than the maximum number of combinations possible or
+ out of range (bigger than the maximum number of combinations possible or
less than 0)
"""
- if (combo_number < 0 or
+ if (combo_number < 0 or
combo_number >= len(self.__source_list) ** self.__list_length):
self.__integer_list = None
return False
@@ -147,18 +147,18 @@ class ComprehensiveListGenerator:
quotient, remainder = divmod(combo_number, index_max_value)
combo_number = quotient
self.__integer_list[index] = remainder
-
+
return True
-
+
def __IncrementIntegerListIndex(self, index):
- """ Increments the given index of integer_list, rolling over to 0 and
- incrementing the a lower index if the index is incremented above the last
+ """ Increments the given index of integer_list, rolling over to 0 and
+ incrementing the a lower index if the index is incremented above the last
index of source_list
-
- Args:
+
+ Args:
index: The index integer_list to attempt to increment.
-
- Returns: False if it is impossible to incremement any index in the list
+
+ Returns: False if it is impossible to incremement any index in the list
which is less than or equal to the given index.
"""
self.__integer_list[index] += 1
@@ -175,14 +175,14 @@ class ComprehensiveListGenerator:
return False
# Successfuly incremented the index, return true.
return True
-
+
def __IncrementIntegerList(self):
- """ Gets the next integer list in the series by attempting to increment the
+ """ Gets the next integer list in the series by attempting to increment the
final index of integer_list.
-
+
Returns: False if we can't increment any index in the integer_list.
"""
-
+
# If the list is empty we just started, so populate it with zeroes.
if self.__integer_list == None:
self.__integer_list = []
@@ -191,50 +191,50 @@ class ComprehensiveListGenerator:
return True
else:
return self.__IncrementIntegerListIndex(self.__list_length-1)
-
+
def GetCurrentPortionOfSourceList(self):
- """ Returns the current portion of source_list corresponding to the
+ """ Returns the current portion of source_list corresponding to the
integer_list
-
+
For example, if our current state is:
- integer_list = [0,1,0,2]
+ integer_list = [0,1,0,2]
source_list = ['a','b','c','d']
Then calling GetCurrentPortionOfSourceList() returns:
['a','b','a','c']
-
+
Returns: None if the integer_list is empty, otherwise a list of length
list_length with a combination of elements from source_list
"""
portion_list = []
if self.__integer_list == None:
return None
-
+
for index in range(self.__list_length):
portion_list.append(self.__source_list[self.__integer_list[index]])
-
+
return portion_list
-
+
def GetNextPortionOfSourceList(self):
- """ Increments the integer_list and then returns the current portion of
+ """ Increments the integer_list and then returns the current portion of
source_list corresponding to the integer_list.
-
+
This is the only function outside users should be calling. It will advance
- to the next combination of elements from source_list, and return it. See
+ to the next combination of elements from source_list, and return it. See
the class documentation for proper use.
-
- Returns: None if all possible combinations of source_list have previously
- been returned. Otherwise a new list of length list_length with a combination
+
+ Returns: None if all possible combinations of source_list have previously
+ been returned. Otherwise a new list of length list_length with a combination
of elements from source_list.
"""
if self.__IncrementIntegerList():
return self.GetCurrentPortionOfSourceList()
else:
return None
-
+
class AutomatedTestInputGenerator:
- """Creates a random file with with the name |file_name| with
+ """Creates a random file with with the name |file_name| with
the number of commands and actions specified in the command line.
-
+
Attributes:
__commands_per_file: Number of commands per file.
__actions_per_command: Number of actions per command.
@@ -246,7 +246,7 @@ class AutomatedTestInputGenerator:
input_file = open(options.input_file_name)
actions_list = input_file.readlines()
input_file.close()
-
+
self.__commands_per_file = options.commands_per_file
self.__actions_per_command = options.actions_per_command
self.__actions_list = [action.strip() for action in actions_list]
@@ -254,7 +254,7 @@ class AutomatedTestInputGenerator:
def __CreateDocument(self):
""" Create the starter XML document.
-
+
Returns: A tuple containing the XML document and its root element named
"Command List".
"""
@@ -262,11 +262,11 @@ class AutomatedTestInputGenerator:
root_element = doc.createElement("CommandList")
doc.appendChild(root_element)
return doc, root_element
-
+
def __WriteToOutputFile(self, file_name, output):
"""Writes |output| to file with name |filename|. Overwriting any pre-existing
file.
-
+
Args:
file_name: Name of the file to create.
output: The string to write to file.
@@ -274,15 +274,15 @@ class AutomatedTestInputGenerator:
output_file = open(file_name, 'w')
output_file.write(output)
output_file.close()
-
+
def CreateRandomFile(self, file_name):
- """Creates a random file with with the name |file_name| with
+ """Creates a random file with with the name |file_name| with
the number of commands and actions specified in the command line.
-
- Args:
+
+ Args:
file_name - Name of the file to create.
-
- Return:
+
+ Return:
Nothing.
"""
output_doc, root_element = self.__CreateDocument()
@@ -294,18 +294,18 @@ class AutomatedTestInputGenerator:
command_element.appendChild(action_element)
root_element.appendChild(command_element)
self.__WriteToOutputFile(file_name, output_doc.toprettyxml())
-
+
def __AddCommandToDoc(self, output_doc, root_element, command, command_num):
"""Adds a given command to the output XML document
-
- Args:
+
+ Args:
output_doc - The output XML document. Used to create elements.
- root_element - The root element of the XML document. (What we add the
+ root_element - The root element of the XML document. (What we add the
command to)
command - The name of the command element we create and add to the doc.
command_num - The number of the command.
-
- Return:
+
+ Return:
Nothing.
"""
command_element = output_doc.createElement("command")
@@ -314,20 +314,20 @@ class AutomatedTestInputGenerator:
action_element = output_doc.createElement(action)
command_element.appendChild(action_element)
root_element.appendChild(command_element)
-
+
def CreateComprehensiveFile(self, file_name, start_command, write_to_end):
- """Creates one file containing all or part of the comprehensive list of
+ """Creates one file containing all or part of the comprehensive list of
commands starting at a set command.
-
- Args:
+
+ Args:
file_name - Name of the file to create.
start_command - Command number to start at.
- write_to_end - If true, writes all remaining commands, starting at
- start_command. (If start_command is 0, this would write all
- possible commands to one file.) If false, write only
+ write_to_end - If true, writes all remaining commands, starting at
+ start_command. (If start_command is 0, this would write all
+ possible commands to one file.) If false, write only
commands_per_file commands starting at start_command
-
- Return:
+
+ Return:
Nothing.
"""
list_generator = ComprehensiveListGenerator(self.__actions_per_command,
@@ -336,80 +336,80 @@ class AutomatedTestInputGenerator:
command_counter = start_command
end_command = start_command + self.__commands_per_file
is_complete = False
- # Set the underlying integer representation of the command to the
+ # Set the underlying integer representation of the command to the
# the starting command number.
list_generator.SetIntegerListToCombinationNumber(start_command)
command = list_generator.GetCurrentPortionOfSourceList()
- while (command != None and
+ while (command != None and
(write_to_end == True or command_counter < end_command)):
self.__AddCommandToDoc(output_doc, root_element, command, command_counter)
command_counter += 1;
command = list_generator.GetNextPortionOfSourceList()
-
- self.__WriteToOutputFile(file_name, output_doc.toprettyxml())
-
+
+ self.__WriteToOutputFile(file_name, output_doc.toprettyxml())
+
def CreateComprehensiveFiles(self, file_name):
- """Creates a comprehensive coverage of all possible combinations from
- action_list of length commands_per_file. Names them |file_name|_1,
- |file_name|_2, and so on.
-
- Args:
+ """Creates a comprehensive coverage of all possible combinations from
+ action_list of length commands_per_file. Names them |file_name|_1,
+ |file_name|_2, and so on.
+
+ Args:
file_name - Name of the file to create.
-
- Return:
+
+ Return:
Nothing.
"""
list_generator = ComprehensiveListGenerator(self.__actions_per_command,
self.__actions_list)
-
+
is_complete = False
file_counter = 0
# Split the file name so we can include the file number before the extension.
base_file_name, extension = os.path.splitext(file_name)
command_num = 0
-
+
while is_complete == False:
output_doc, root_element = self.__CreateDocument()
file_counter += 1
if self.__is_verbose and file_counter % 200 == 0:
print "Created " + str(file_counter) + " files... "
-
+
for i in range(self.__commands_per_file):
# Get the next sequence of actions as a list.
command = list_generator.GetNextPortionOfSourceList()
if command == None:
is_complete = True
break
-
+
# Parse through the list and add them to the output document as children
# of a command element
self.__AddCommandToDoc(output_doc, root_element, command, command_num)
command_num += 1
-
+
# Finished the commands for this file, so write it and start on next file.
- self.__WriteToOutputFile(base_file_name + "_" + str(file_counter) +
+ self.__WriteToOutputFile(base_file_name + "_" + str(file_counter) +
extension, output_doc.toprettyxml())
-
+
def ParseCommandLine():
"""Parses the command line.
-
- Return: List of options and their values and a list of arguments which were
+
+ Return: List of options and their values and a list of arguments which were
unparsed.
"""
parser = optparse.OptionParser()
parser.set_defaults(full_coverage=False)
- parser.add_option("-i", "--action-list-file", dest="input_file_name",
- type="string", action="store", default="possible_actions.txt",
+ parser.add_option("-i", "--action-list-file", dest="input_file_name",
+ type="string", action="store", default="possible_actions.txt",
help="input file with a test of newline separated actions"
"which are possible. Default is 'possible_actions.txt'")
parser.add_option("-o", "--output", dest="output_file_name", type="string",
action="store", default="automated_ui_tests.txt",
help="the file to output the command list to")
- parser.add_option("-c", "--commands-per-file", dest="commands_per_file",
- type="int", action="store", default=500,
+ parser.add_option("-c", "--commands-per-file", dest="commands_per_file",
+ type="int", action="store", default=500,
help="number of commands per file")
- parser.add_option("-a", "--actions-per-command", dest="actions_per_command",
- type="int", action="store", default=5,
+ parser.add_option("-a", "--actions-per-command", dest="actions_per_command",
+ type="int", action="store", default=5,
help="number of actions per command")
parser.add_option("-f", "--full-coverage", dest="full_coverage",
action="store_true", help="Output files for every possible"
@@ -418,14 +418,14 @@ def ParseCommandLine():
action="store_false", dest="is_verbose", default=True,
help="don't print progress message while creating files")
parser.add_option("-1", "--full-coverage-one-file",
- action="store_true", dest="full_coverage_one_file",
+ action="store_true", dest="full_coverage_one_file",
default=False,
help="complete coverage all outputted to one file")
- parser.add_option("-p", "--partial-coverage-from", dest="start_at_command",
- type="int", action="store", default=-1,
- help="partial list from the complete coverage, starting at"
+ parser.add_option("-p", "--partial-coverage-from", dest="start_at_command",
+ type="int", action="store", default=-1,
+ help="partial list from the complete coverage, starting at"
"command #start_at_command")
-
+
return parser.parse_args()
def main():
@@ -445,7 +445,7 @@ def main():
print "Finished writing comprehensive files."
elif options.full_coverage_one_file:
if options.start_at_command >= 0 and options.is_verbose == True:
- print ("Error: Both --full-coverage-one-file present and"
+ print ("Error: Both --full-coverage-one-file present and"
"--partial-coverage-from present, ignoring --partial-coverage-from")
if options.is_verbose == True:
print "Starting to write comprehensive file:"
@@ -455,7 +455,7 @@ def main():
elif options.start_at_command >= 0:
if options.is_verbose == True:
print "Starting to write partial file:"
- test_generator.CreateComprehensiveFile(options.output_file_name,
+ test_generator.CreateComprehensiveFile(options.output_file_name,
options.start_at_command , False)
if options.is_verbose == True:
print "Finished writing partial file."
@@ -463,6 +463,6 @@ def main():
test_generator.CreateRandomFile(options.output_file_name)
if options.is_verbose == True:
print "Output written to file: " + options.output_file_name
-
+
if __name__ == '__main__':
main()
diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py
index 61579ae..cf6d846 100755
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -5,11 +5,11 @@
"""Script to create Chrome Installer archive.
- This script is used to create an archive of all the files required for a
+ This script is used to create an archive of all the files required for a
Chrome install in appropriate directory structure. It reads chrome.release
- file as input, creates chrome.7z archive, compresses setup.exe and
- generates packed_files.txt for mini_installer project.
-
+ file as input, creates chrome.7z archive, compresses setup.exe and
+ generates packed_files.txt for mini_installer project.
+
"""
import ConfigParser
@@ -33,13 +33,13 @@ BSDIFF_EXEC = "bsdiff.exe"
VERSION_FILE = "VERSION"
PACKED_FILE_COMMENTS = """
// This file is automatically generated by create_installer_archive.py.
-// It contains the resource entries that are going to be linked inside
-// mini_installer.exe. For each file to be linked there should be two
+// It contains the resource entries that are going to be linked inside
+// mini_installer.exe. For each file to be linked there should be two
// lines:
// - The first line contains the output filename (without path) and the
-// type of the resource ('BN' means the file is not compressed and
+// type of the resource ('BN' means the file is not compressed and
// 'BL' means the file is compressed.
-// - The second line contains the path to the input file. Uses '/' to
+// - The second line contains the path to the input file. Uses '/' to
// separate path components.
"""
@@ -71,7 +71,7 @@ def Readconfig(output_dir, input_file, current_version):
"""
variables = {}
variables['ChromeDir'] = CHROME_DIR
- variables['VersionDir'] = os.path.join(variables['ChromeDir'],
+ variables['VersionDir'] = os.path.join(variables['ChromeDir'],
current_version)
config = ConfigParser.SafeConfigParser(variables)
config.read(input_file)
@@ -131,7 +131,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
lzma_exec = os.path.join(output_dir, "..", "..", "third_party",
"lzma_sdk", "Executable", "7za.exe")
archive_file = os.path.join(output_dir, FULL_ARCHIVE_FILE)
- cmd = '%s a -t7z "%s" "%s" -mx0' % (lzma_exec, archive_file,
+ cmd = '%s a -t7z "%s" "%s" -mx0' % (lzma_exec, archive_file,
os.path.join(staging_dir, CHROME_DIR))
# There doesnt seem to be any way in 7za.exe to override existing file so
# we always delete before creating a new one.
@@ -147,7 +147,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
if (prev_version_dir):
prev_archive_file = os.path.join(prev_version_dir, FULL_ARCHIVE_FILE)
patch_file = os.path.join(output_dir, "patch.7z")
- cmd = '%s "%s" "%s" "%s"' % (os.path.join(output_dir, BSDIFF_EXEC),
+ cmd = '%s "%s" "%s" "%s"' % (os.path.join(output_dir, BSDIFF_EXEC),
prev_archive_file, archive_file, patch_file)
RunSystemCommand(cmd)
@@ -158,7 +158,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
orig_file = archive_file
compressed_archive_file_path = os.path.join(output_dir, archive_file_name)
- cmd = '%s a -t7z "%s" "%s" -mx9' % (lzma_exec, compressed_archive_file_path,
+ cmd = '%s a -t7z "%s" "%s" -mx9' % (lzma_exec, compressed_archive_file_path,
orig_file)
if os.path.exists(compressed_archive_file_path):
os.remove(compressed_archive_file_path)
@@ -169,7 +169,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
def CompressSetupExec(output_dir):
"""Compresses setup.exe to reduce size."""
- cmd = 'makecab.exe /V1 /L "%s" "%s"' % (output_dir,
+ cmd = 'makecab.exe /V1 /L "%s" "%s"' % (output_dir,
os.path.join(output_dir, SETUP_EXEC))
RunSystemCommand(cmd)
@@ -181,15 +181,15 @@ def GetFileMD5Hash(file):
return hash
-def CreateResourceInputFile(output_dir,
+def CreateResourceInputFile(output_dir,
prev_version_dir, archive_file_name):
"""Creates resource input file (packed_files.txt) for mini_installer project.
-
+
This method checks if we are generating a patch instead of full installer. In
case of patch it also checks if setup.exe has changed by comparing its
MD5 hash with the MD5 hash of previous setup.exe. If hash values are same
setup.exe is not included in packed_files.txt.
-
+
In case of patch we include patch.7z and in case of full
installer we include chrome.7z in packed_files.txt.
"""
@@ -199,13 +199,13 @@ def CreateResourceInputFile(output_dir,
prev_hash = GetFileMD5Hash(os.path.join(prev_version_dir, SETUP_EXEC))
if (current_hash == prev_hash):
setup_exe_needed = 0
-
+
if (setup_exe_needed):
CompressSetupExec(output_dir)
c_setup_file = SETUP_EXEC[:len(SETUP_EXEC) - 1] + "_"
- setup_file_entry = "%s\t\tBL\n\"%s\"" % (c_setup_file,
+ setup_file_entry = "%s\t\tBL\n\"%s\"" % (c_setup_file,
os.path.join(output_dir, c_setup_file).replace("\\","/"))
-
+
archive_file_entry = "\n%s\t\tB7\n\"%s\"" % (archive_file_name,
os.path.join(output_dir, archive_file_name).replace("\\","/"))
output_file = os.path.join(output_dir, MINI_INSTALLER_INPUT_FILE)
@@ -231,7 +231,7 @@ def main(options):
CopyAllFilesToStagingDir(config, options.distribution,
staging_dir, options.output_dir)
-
+
# Name of the archive file built (for example - chrome.7z or
# patch-<old_version>-<new_version>.7z or patch-<new_version>.7z
archive_file_name = CreateArchiveFile(options.output_dir, staging_dir,
@@ -250,11 +250,11 @@ if '__main__' == __name__:
help='Name of Chromium Distribution. Optional.')
option_parser.add_option('-s', '--skip_rebuild_archive',
default="False", help='Skip re-building Chrome.7z archive if it exists.')
- option_parser.add_option('-l', '--last_chrome_installer',
+ option_parser.add_option('-l', '--last_chrome_installer',
help='Generate differential installer. The value of this parameter ' +
'specifies the directory that contains base versions of ' +
'setup.exe & chrome.7z.')
- option_parser.add_option('-v', '--last_chrome_version',
+ option_parser.add_option('-v', '--last_chrome_version',
help='Version of the previous installer. ' +
'Used only for the purpose of naming archive file. Optional.')
diff --git a/chrome/tools/build/win/dependencies.py b/chrome/tools/build/win/dependencies.py
index c06f9f3..06ce64c 100755
--- a/chrome/tools/build/win/dependencies.py
+++ b/chrome/tools/build/win/dependencies.py
@@ -160,7 +160,7 @@ def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose):
# The dependency files have dependencies in two section - dependents and delay_loaded
# Also various distributions of Chromium can have different dependencies. So first
# we read generic dependencies ("dependents" and "delay_loaded"). If distribution
- # specific dependencies exist (i.e. "dependents_google_chrome" and
+ # specific dependencies exist (i.e. "dependents_google_chrome" and
# "delay_loaded_google_chrome") we use those instead.
distribution = DIST_DEFAULT
if DIST_ENV_VAR in os.environ.keys():
@@ -170,7 +170,7 @@ def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose):
dist_dependents = "dependents" + distribution
if dist_dependents in scope.keys():
expected_dependents = scope[dist_dependents]
-
+
expected_delay_loaded = scope["delay_loaded"]
dist_delay_loaded = "delay_loaded" + distribution
if dist_delay_loaded in scope.keys():
@@ -181,7 +181,7 @@ def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose):
print "\n".join(expected_dependents)
print "Expected delayloaded:"
print "\n".join(expected_delay_loaded)
-
+
deps_result = Diff(pe_name,
"dll",
dependents,
diff --git a/chrome/tools/build/win/sln_deps.py b/chrome/tools/build/win/sln_deps.py
index fecb100..ef7803e 100755
--- a/chrome/tools/build/win/sln_deps.py
+++ b/chrome/tools/build/win/sln_deps.py
@@ -95,7 +95,7 @@ def main(filename, project_to_scan, reverse):
if __name__ == '__main__':
usage = "usage: %prog [options] solution [project]"
-
+
description = ("Display the dependencies of a project in human readable"
" form. [project] is optional. If omited, all projects are"
" listed.")
diff --git a/chrome/tools/convert_dict/dic_reader.cc b/chrome/tools/convert_dict/dic_reader.cc
index 5ddbee7..6035d23 100644
--- a/chrome/tools/convert_dict/dic_reader.cc
+++ b/chrome/tools/convert_dict/dic_reader.cc
@@ -43,12 +43,12 @@ void SplitDicLine(const std::string& line, std::vector<std::string>* output) {
output->push_back(line.substr(slash_index + 1));
}
-// This function reads words from a .dic file, or a .dic_delta file. Note that
+// This function reads words from a .dic file, or a .dic_delta file. Note that
// we read 'all' the words in the file, irrespective of the word count given
// in the first non empty line of a .dic file. Also note that, for a .dic_delta
// file, the first line actually does _not_ have the number of words. In order
-// to control this, we use the |file_has_word_count_in_the_first_line|
-// parameter to tell this method whether the first non empty line in the file
+// to control this, we use the |file_has_word_count_in_the_first_line|
+// parameter to tell this method whether the first non empty line in the file
// contains the number of words or not. If it does, skip the first line. If it
// does not, then the first line contains a word.
bool PopulateWordSet(WordSet* word_set, FILE* file, AffReader* aff_reader,
@@ -141,7 +141,7 @@ bool DicReader::Read(AffReader* aff_reader) {
// Add words from the dic file to the word set.
// Note that the first line is the word count in the file.
- if (!PopulateWordSet(&word_set, file_, aff_reader, "dic",
+ if (!PopulateWordSet(&word_set, file_, aff_reader, "dic",
aff_reader->encoding(), true))
return false;
diff --git a/chrome/tools/extensions/chromium_extension.py b/chrome/tools/extensions/chromium_extension.py
index 4431b34..81e4662 100755
--- a/chrome/tools/extensions/chromium_extension.py
+++ b/chrome/tools/extensions/chromium_extension.py
@@ -56,7 +56,7 @@ class ExtensionDir:
f = open(os.path.join(self._root, MANIFEST_FILENAME))
manifest = json.load(f)
f.close()
-
+
zip_path = path + ".zip"
if os.path.exists(zip_path):
os.remove(zip_path)
@@ -68,7 +68,7 @@ class ExtensionDir:
logging.debug("%s: %s" % (arcname, file))
zip.write(file, arcname)
zip.close()
-
+
zip = open(zip_path, mode="rb")
hash = hashlib.sha256()
while True:
@@ -77,11 +77,11 @@ class ExtensionDir:
break
hash.update(buf)
zip.close()
-
+
manifest["zip_hash"] = hash.hexdigest()
# This is a bit odd - we're actually appending a new zip file to the end
- # of the manifest. Believe it or not, this is actually an explicit
+ # of the manifest. Believe it or not, this is actually an explicit
# feature of the zip format, and many zip utilities (this library
# and three others I tried) can still read the underlying zip file.
if os.path.exists(path):
@@ -105,7 +105,7 @@ class ExtensionDir:
out.write(buf)
zip.close()
out.close()
-
+
os.remove(zip_path)
logging.info("created extension package %s" % path)
@@ -136,7 +136,7 @@ class ExtensionPackage:
def Run():
logging.basicConfig(level=logging.INFO, format="[%(levelname)s] %(message)s")
-
+
parser = optparse.OptionParser("usage: %prog --indir=<dir> --outfile=<file>")
parser.add_option("", "--indir",
help="an input directory where the extension lives")
diff --git a/chrome/tools/extract_actions.py b/chrome/tools/extract_actions.py
index 8eefbb6..6381976 100755
--- a/chrome/tools/extract_actions.py
+++ b/chrome/tools/extract_actions.py
@@ -58,7 +58,7 @@ def AddComputedActions(actions):
def AddWebKitEditorActions(actions):
"""Add editor actions from editor_client_impl.cc.
-
+
Arguments:
actions: set of actions to add to.
"""
diff --git a/chrome/tools/history-viz.py b/chrome/tools/history-viz.py
index 2f94d9a..ecceee4 100755
--- a/chrome/tools/history-viz.py
+++ b/chrome/tools/history-viz.py
@@ -40,11 +40,11 @@ class URL:
def PrettyPrint(self, include_host=True, include_path=True):
"""Pretty-print this URL in a form more suitable for the graph.
-
+
This will elide very long paths and potentially puts newlines between parts
of long components. include_host and include_path determine whether to
include the host and path in the output.
-
+
Returns: the pretty-printed string."""
MAX_LEN = 30 # Maximum length of a line in the output.
parts = []
@@ -130,7 +130,7 @@ class SQLite:
for line in subproc.stdout:
row = line.strip().split('\t')
yield row
-
+
def LoadHistory(filename):
db = SQLite(filename)
@@ -223,7 +223,7 @@ for src, dsts in edges.items():
label.append(text)
if len(label) == 0:
continue
-
+
edgeattrs = [] # Graphviz attributes for the edge.
# If the edge is from the start and the transitions are fishy, make it
# display as a dotted line.
diff --git a/chrome/tools/test/smoketests.py b/chrome/tools/test/smoketests.py
index cb566d4..c96f22f 100755
--- a/chrome/tools/test/smoketests.py
+++ b/chrome/tools/test/smoketests.py
@@ -145,7 +145,7 @@ def main(options, args):
len([x for x in tests if x.startswith('page-cycler')])):
print 'Skipping page-cycler tests (no data)'
options.nopage_cycler = True
-
+
# Start an httpd if needed.
http_tests = [x for x in tests if x.endswith('-http')]
if http_tests and not options.nopage_cycler and not options.nohttp:
diff --git a/chrome/views/accelerator.cc b/chrome/views/accelerator.cc
index b86133f..1a70c44 100644
--- a/chrome/views/accelerator.cc
+++ b/chrome/views/accelerator.cc
@@ -53,16 +53,16 @@ std::wstring Accelerator::GetShortcutText() const {
std::wstring shortcut;
if (!string_id) {
- // Our fallback is to try translate the key code to a regular character
+ // Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
// layouts have characters other than digits assigned in
// an unshifted mode (e.g. French AZERY layout has 'a with grave
- // accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
+ // accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
// default zoom level), we leave VK_[0-9] alone without translation.
wchar_t key;
if (key_code_ >= '0' && key_code_ <= '9')
key = key_code_;
- else
+ else
key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR));
shortcut += key;
} else {
diff --git a/chrome/views/client_view.h b/chrome/views/client_view.h
index 919f661..d573039 100644
--- a/chrome/views/client_view.h
+++ b/chrome/views/client_view.h
@@ -42,7 +42,7 @@ class ClientView : public View {
// forwards the notification to the delegate.
virtual void WindowClosing();
- // Tests to see if the specified point (in view coordinates) is within the
+ // Tests to see if the specified point (in view coordinates) is within the
// bounds of this view. If so, it returns HTCLIENT in this default
// implementation. If it is outside the bounds of this view, this must return
// HTNOWHERE to tell the caller to do further processing to determine where
diff --git a/chrome/views/dialog_client_view.h b/chrome/views/dialog_client_view.h
index 32713d0..52862fb 100644
--- a/chrome/views/dialog_client_view.h
+++ b/chrome/views/dialog_client_view.h
@@ -97,7 +97,7 @@ class DialogClientView : public ClientView,
// The dialog buttons.
NativeButton* ok_button_;
NativeButton* cancel_button_;
-
+
// The button that is currently the default button if any.
NativeButton* default_button_;
diff --git a/chrome/views/focus_manager.cc b/chrome/views/focus_manager.cc
index 6dac309..093b0a4 100644
--- a/chrome/views/focus_manager.cc
+++ b/chrome/views/focus_manager.cc
@@ -744,7 +744,7 @@ void FocusManager::UnregisterAccelerator(const Accelerator& accelerator,
NOTREACHED() << "Unregistering non-existing accelerator";
return;
}
-
+
if (iter->second != target) {
NOTREACHED() << "Unregistering accelerator for wrong target";
return;
diff --git a/chrome/views/focus_manager_unittest.cc b/chrome/views/focus_manager_unittest.cc
index 30f7e85..edbb403 100644
--- a/chrome/views/focus_manager_unittest.cc
+++ b/chrome/views/focus_manager_unittest.cc
@@ -175,7 +175,7 @@ class TestViewWindow : public views::WidgetWin {
void Init();
views::View* contents() const { return contents_; }
-
+
// Return the ID of the component that currently has the focus.
int GetFocusedComponentID();
diff --git a/chrome/views/grid_layout.h b/chrome/views/grid_layout.h
index 358422a..27ccc3e 100644
--- a/chrome/views/grid_layout.h
+++ b/chrome/views/grid_layout.h
@@ -174,7 +174,7 @@ class GridLayout : public LayoutManager {
// they both call into this method. This sizes the Columns/Rows as
// appropriate. If layout is true, width/height give the width/height the
// of the host, otherwise they are ignored.
- void SizeRowsAndColumns(bool layout, int width, int height,
+ void SizeRowsAndColumns(bool layout, int width, int height,
gfx::Size* pref);
// Calculates the master columns of all the column sets. See Column for
diff --git a/chrome/views/hwnd_view.cc b/chrome/views/hwnd_view.cc
index e812a06..82ce224 100644
--- a/chrome/views/hwnd_view.cc
+++ b/chrome/views/hwnd_view.cc
@@ -176,9 +176,9 @@ void HWNDView::Focus() {
}
void HWNDView::Paint(ChromeCanvas* canvas) {
- // The area behind our window is black, so during a fast resize (where our
- // content doesn't draw over the full size of our HWND, and the HWND
- // background color doesn't show up), we need to cover that blackness with
+ // The area behind our window is black, so during a fast resize (where our
+ // content doesn't draw over the full size of our HWND, and the HWND
+ // background color doesn't show up), we need to cover that blackness with
// something so that fast resizes don't result in black flash.
//
// It would be nice if this used some approximation of the page's
diff --git a/chrome/views/hwnd_view.h b/chrome/views/hwnd_view.h
index ae33d0f..8219991 100644
--- a/chrome/views/hwnd_view.h
+++ b/chrome/views/hwnd_view.h
@@ -69,7 +69,7 @@ class HWNDView : public View {
// Notification that our visible bounds relative to the root has changed.
// This updates the bounds of the HWND.
virtual void VisibleBoundsInRootChanged();
-
+
virtual void Focus();
private:
diff --git a/chrome/views/native_button.cc b/chrome/views/native_button.cc
index d6db326..71ff637 100644
--- a/chrome/views/native_button.cc
+++ b/chrome/views/native_button.cc
@@ -14,7 +14,7 @@ namespace views {
const char NativeButton::kViewClassName[] = "chrome/views/NativeButton";
-NativeButton::NativeButton(const std::wstring& label)
+NativeButton::NativeButton(const std::wstring& label)
: enforce_dlu_min_size_(true) {
Init(label, false);
}
diff --git a/chrome/views/single_split_view.cc b/chrome/views/single_split_view.cc
index a7832b6..845d980 100644
--- a/chrome/views/single_split_view.cc
+++ b/chrome/views/single_split_view.cc
@@ -13,7 +13,7 @@ namespace views {
// Size of the divider in pixels.
static const int kDividerSize = 4;
-SingleSplitView::SingleSplitView(View* leading, View* trailing)
+SingleSplitView::SingleSplitView(View* leading, View* trailing)
: divider_x_(-1) {
AddChildView(leading);
AddChildView(trailing);
diff --git a/chrome/views/table_view_unittest.cc b/chrome/views/table_view_unittest.cc
index 9ef53da..41c985c 100644
--- a/chrome/views/table_view_unittest.cc
+++ b/chrome/views/table_view_unittest.cc
@@ -83,7 +83,7 @@ void TestTableModel::ChangeRow(int row, int c1_value, int c2_value) {
int TestTableModel::RowCount() {
return static_cast<int>(rows_.size());
}
-
+
std::wstring TestTableModel::GetText(int row, int column_id) {
return IntToWString(rows_[row][column_id]);
}
diff --git a/chrome/views/text_button.cc b/chrome/views/text_button.cc
index ba4e3b2..1eca617 100644
--- a/chrome/views/text_button.cc
+++ b/chrome/views/text_button.cc
@@ -169,7 +169,7 @@ gfx::Size TextButton::GetPreferredSize() {
if (max_width_ > 0)
prefsize.set_width(std::min(max_width_, prefsize.width()));
-
+
return prefsize;
}
diff --git a/chrome/views/tree_view.cc b/chrome/views/tree_view.cc
index 4e77db0..7166a31 100644
--- a/chrome/views/tree_view.cc
+++ b/chrome/views/tree_view.cc
@@ -487,7 +487,7 @@ void TreeView::OnContextMenu(const CPoint& location) {
NativeControl::OnContextMenu(location);
return;
}
-
+
if (show_context_menu_only_when_node_selected_) {
if (!GetSelectedNode())
return;
diff --git a/chrome/views/view_unittest.cc b/chrome/views/view_unittest.cc
index e26ff2f..feb9182 100644
--- a/chrome/views/view_unittest.cc
+++ b/chrome/views/view_unittest.cc
@@ -27,7 +27,7 @@ class ViewTest : public testing::Test {
~ViewTest() {
OleUninitialize();
}
-
+
private:
MessageLoopForUI message_loop_;
};
@@ -592,7 +592,7 @@ class TestDialogView : public views::View,
public:
TestDialogView() {
}
-
+
// views::DialogDelegate implementation:
virtual int GetDialogButtons() const {
return DIALOGBUTTON_OK | DIALOGBUTTON_CANCEL;
@@ -658,4 +658,4 @@ TEST_F(ViewTest, DialogDefaultButtonTest) {
EXPECT_TRUE(cancel_button->IsDefaultButton());
EXPECT_FALSE(dialog_view_->button1_->IsDefaultButton());
EXPECT_FALSE(dialog_view_->button2_->IsDefaultButton());
-} \ No newline at end of file
+}
diff --git a/chrome/views/window.cc b/chrome/views/window.cc
index 12f7d9a..1dcf75f 100644
--- a/chrome/views/window.cc
+++ b/chrome/views/window.cc
@@ -352,7 +352,7 @@ void Window::Init(HWND parent, const gfx::Rect& bounds) {
WidgetWin::Init(parent, bounds, true);
win_util::SetWindowUserData(GetHWND(), this);
-
+
// Create the ClientView, add it to the NonClientView and add the
// NonClientView to the RootView. This will cause everything to be parented.
non_client_view_->set_client_view(window_delegate_->CreateClientView(this));
diff --git a/chrome/views/window.h b/chrome/views/window.h
index 564cfab..089fea4 100644
--- a/chrome/views/window.h
+++ b/chrome/views/window.h
@@ -252,7 +252,7 @@ class Window : public WidgetWin,
enum ResizeCursor {
RC_NORMAL = 0, RC_VERTICAL, RC_HORIZONTAL, RC_NESW, RC_NWSE
};
- static HCURSOR resize_cursors_[6];
+ static HCURSOR resize_cursors_[6];
// Our window delegate (see Init method for documentation).
WindowDelegate* window_delegate_;
diff --git a/chrome/views/window_delegate.cc b/chrome/views/window_delegate.cc
index 171b642..e76330a 100644
--- a/chrome/views/window_delegate.cc
+++ b/chrome/views/window_delegate.cc
@@ -48,7 +48,7 @@ bool WindowDelegate::GetSavedWindowBounds(gfx::Rect* bounds) const {
if (window_name.empty())
return false;
- const DictionaryValue* dictionary =
+ const DictionaryValue* dictionary =
g_browser_process->local_state()->GetDictionary(window_name.c_str());
int left, top, right, bottom;
if (!dictionary || !dictionary->GetInteger(L"left", &left) ||
@@ -66,7 +66,7 @@ bool WindowDelegate::GetSavedMaximizedState(bool* maximized) const {
if (window_name.empty())
return false;
- const DictionaryValue* dictionary =
+ const DictionaryValue* dictionary =
g_browser_process->local_state()->GetDictionary(window_name.c_str());
return dictionary && dictionary->GetBoolean(L"maximized", maximized);
}
@@ -79,7 +79,7 @@ bool WindowDelegate::GetSavedAlwaysOnTopState(bool* always_on_top) const {
if (window_name.empty())
return false;
- const DictionaryValue* dictionary =
+ const DictionaryValue* dictionary =
g_browser_process->local_state()->GetDictionary(window_name.c_str());
return dictionary && dictionary->GetBoolean(L"always_on_top", always_on_top);
}
diff --git a/chrome/views/window_delegate.h b/chrome/views/window_delegate.h
index 8f60db4..7d0cb44 100644
--- a/chrome/views/window_delegate.h
+++ b/chrome/views/window_delegate.h
@@ -120,7 +120,7 @@ class WindowDelegate {
virtual bool GetSavedWindowBounds(gfx::Rect* bounds) const;
virtual bool GetSavedMaximizedState(bool* maximized) const;
virtual bool GetSavedAlwaysOnTopState(bool* always_on_top) const;
-
+
// Called when the window closes.
virtual void WindowClosing() { }
diff --git a/chrome/worker/webworkerclient_proxy.cc b/chrome/worker/webworkerclient_proxy.cc
index 84cb2ed..fc8c2d3 100644
--- a/chrome/worker/webworkerclient_proxy.cc
+++ b/chrome/worker/webworkerclient_proxy.cc
@@ -67,7 +67,7 @@ bool WebWorkerClientProxy::Send(IPC::Message* message) {
}
void WebWorkerClientProxy::OnMessageReceived(const IPC::Message& message) {
- if (!started_worker_ &&
+ if (!started_worker_ &&
message.type() != WorkerMsg_StartWorkerContext::ID) {
queued_messages_.push_back(new IPC::Message(message));
return;