summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc2
-rw-r--r--chrome/browser/autocomplete/autocomplete_browsertest.cc1
-rw-r--r--chrome/browser/bookmarks/bookmark_folder_tree_model.cc2
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc2
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.h12
-rw-r--r--chrome/browser/dom_ui/dom_ui_factory.h2
-rw-r--r--chrome/browser/dom_ui/dom_ui_thumbnail_source.h1
-rw-r--r--chrome/browser/dom_ui/downloads_dom_handler.cc2
-rw-r--r--chrome/browser/dom_ui/downloads_dom_handler.h2
-rw-r--r--chrome/browser/dom_ui/fileicon_source.h2
-rw-r--r--chrome/browser/dom_ui/history_ui.h1
-rw-r--r--chrome/browser/dom_ui/html_dialog_ui.h43
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h2
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler.h2
-rw-r--r--chrome/browser/extensions/extension_file_util.cc2
-rw-r--r--chrome/browser/extensions/extension_install_ui.cc2
-rw-r--r--chrome/browser/extensions/extension_process_manager_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_startup_unittest.cc4
-rw-r--r--chrome/browser/extensions/extensions_service.cc2
-rw-r--r--chrome/browser/extensions/user_script_listener_unittest.cc16
-rw-r--r--chrome/browser/gtk/back_forward_menu_model_gtk.h2
-rw-r--r--chrome/browser/gtk/bookmark_context_menu_gtk.h6
-rw-r--r--chrome/browser/gtk/download_started_animation_gtk.cc2
-rw-r--r--chrome/browser/gtk/extension_shelf_gtk.h2
-rw-r--r--chrome/browser/gtk/external_protocol_dialog_gtk.h2
-rw-r--r--chrome/browser/gtk/gtk_theme_provider.cc1
-rw-r--r--chrome/browser/gtk/info_bubble_gtk.cc3
-rw-r--r--chrome/browser/gtk/menu_gtk.h2
-rw-r--r--chrome/browser/gtk/options/fonts_page_gtk.h3
-rw-r--r--chrome/browser/gtk/options/general_page_gtk.cc2
-rw-r--r--chrome/browser/gtk/options/options_layout_gtk.cc2
-rw-r--r--chrome/browser/gtk/options/passwords_exceptions_window_gtk.h6
-rw-r--r--chrome/browser/gtk/options/url_picker_dialog_gtk.h2
-rw-r--r--chrome/browser/hang_monitor/hung_plugin_action.h6
-rw-r--r--chrome/browser/hang_monitor/hung_window_detector.h8
-rw-r--r--chrome/browser/history/history_backend_unittest.cc6
-rw-r--r--chrome/browser/history/history_types.cc1
-rw-r--r--chrome/browser/history/page_usage_data.cc2
-rw-r--r--chrome/browser/history/query_parser.cc3
-rw-r--r--chrome/browser/history/snippet_unittest.cc21
-rw-r--r--chrome/browser/history/starred_url_database.cc2
-rw-r--r--chrome/browser/history/url_database_unittest.cc10
-rw-r--r--chrome/browser/history/visit_log_unittest.cc2
-rw-r--r--chrome/browser/history/visit_tracker_unittest.cc12
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_uitest.cc29
-rw-r--r--chrome/browser/net/url_fixer_upper.cc2
-rw-r--r--chrome/browser/net/url_fixer_upper_unittest.cc2
-rw-r--r--chrome/browser/net/url_request_tracking.cc2
-rw-r--r--chrome/browser/printing/print_dialog_gtk.cc2
-rw-r--r--chrome/browser/printing/print_job.cc3
-rw-r--r--chrome/browser/printing/print_job_unittest.cc2
-rw-r--r--chrome/browser/printing/printing_layout_uitest.cc2
-rw-r--r--chrome/browser/privacy_blacklist/blacklist_store.cc2
-rw-r--r--chrome/browser/privacy_blacklist/blocked_response.cc4
-rw-r--r--chrome/browser/sessions/session_service.cc4
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.cc2
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.h2
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc2
-rw-r--r--chrome/browser/tab_contents/interstitial_page.h2
-rw-r--r--chrome/browser/tab_contents/navigation_controller.h3
-rw-r--r--chrome/browser/tab_contents/navigation_controller_unittest.cc4
-rw-r--r--chrome/browser/tab_contents/navigation_entry.h2
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc4
-rw-r--r--chrome/browser/tab_contents/tab_contents_delegate.h3
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.h2
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator_unittest.cc2
-rw-r--r--chrome/browser/tab_contents/view_source_uitest.cc2
-rw-r--r--chrome/browser/tab_contents/web_drag_source.h2
-rw-r--r--chrome/browser/tab_contents/web_drop_target.h2
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc4
-rw-r--r--chrome/browser/visitedlink_master.cc6
71 files changed, 163 insertions, 147 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index 47b3160..45b9285 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -83,7 +83,7 @@ std::string AutocompleteInput::TypeToString(Type type) {
}
}
-//static
+// static
AutocompleteInput::Type AutocompleteInput::Parse(
const std::wstring& text,
const std::wstring& desired_tld,
diff --git a/chrome/browser/autocomplete/autocomplete_browsertest.cc b/chrome/browser/autocomplete/autocomplete_browsertest.cc
index 3700997..4776f64 100644
--- a/chrome/browser/autocomplete/autocomplete_browsertest.cc
+++ b/chrome/browser/autocomplete/autocomplete_browsertest.cc
@@ -64,7 +64,6 @@ class AutocompleteBrowserTest : public InProcessBrowserTest,
DCHECK(type == NotificationType::HISTORY_LOADED);
MessageLoop::current()->Quit();
}
-
};
IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, Basic) {
diff --git a/chrome/browser/bookmarks/bookmark_folder_tree_model.cc b/chrome/browser/bookmarks/bookmark_folder_tree_model.cc
index eedffb1..2591fd0 100644
--- a/chrome/browser/bookmarks/bookmark_folder_tree_model.cc
+++ b/chrome/browser/bookmarks/bookmark_folder_tree_model.cc
@@ -15,7 +15,7 @@ BookmarkFolderTreeModel::BookmarkFolderTreeModel(BookmarkModel* model)
: TreeNodeModel<FolderNode>(new FolderNode(NULL)),
model_(model),
recently_bookmarked_node_(new FolderNode(NULL)),
- search_node_(new FolderNode(NULL)){
+ search_node_(new FolderNode(NULL)) {
recently_bookmarked_node_->SetTitle(
l10n_util::GetString(IDS_BOOKMARK_TREE_RECENTLY_BOOKMARKED_NODE_TITLE));
search_node_->SetTitle(
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index 876cc50..6611f67 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -21,7 +21,7 @@ namespace {
// Used to block until a dev tools client window's browser is closed.
class BrowserClosedObserver : public NotificationObserver {
public:
- BrowserClosedObserver(Browser* browser) {
+ explicit BrowserClosedObserver(Browser* browser) {
registrar_.Add(this, NotificationType::BROWSER_CLOSED,
Source<Browser>(browser));
ui_test_utils::RunMessageLoop();
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.h b/chrome/browser/dom_ui/chrome_url_data_manager.h
index beecdaa..22b1ee4 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.h
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BROWSER_DOM_UI_CHROME_URL_DATA_MANAGER_H_
-#define BROWSER_DOM_UI_CHROME_URL_DATA_MANAGER_H_
+#ifndef CHROME_BROWSER_DOM_UI_CHROME_URL_DATA_MANAGER_H_
+#define CHROME_BROWSER_DOM_UI_CHROME_URL_DATA_MANAGER_H_
#include <map>
#include <string>
@@ -106,7 +106,7 @@ class ChromeURLDataManager {
static URLRequestJob* Factory(URLRequest* request, const std::string& scheme);
-private:
+ private:
friend class URLRequestChromeJob;
// Parse a URL into the components used to resolve its request.
@@ -154,8 +154,8 @@ private:
// Since we have a single global ChromeURLDataManager, we don't need to
// grab a reference to it when creating Tasks involving it.
template <> struct RunnableMethodTraits<ChromeURLDataManager> {
- void RetainCallee(ChromeURLDataManager*) {}
- void ReleaseCallee(ChromeURLDataManager*) {}
+ void RetainCallee(ChromeURLDataManager* manager) {}
+ void ReleaseCallee(ChromeURLDataManager* manager) {}
};
// The single global instance of ChromeURLDataManager.
@@ -168,4 +168,4 @@ void RegisterURLRequestChromeJob();
// Undoes the registration done by RegisterURLRequestChromeJob.
void UnregisterURLRequestChromeJob();
-#endif // BROWSER_DOM_UI_CHROME_URL_DATA_MANAGER_H_
+#endif // CHROME_BROWSER_DOM_UI_CHROME_URL_DATA_MANAGER_H_
diff --git a/chrome/browser/dom_ui/dom_ui_factory.h b/chrome/browser/dom_ui/dom_ui_factory.h
index db1500c..705708a 100644
--- a/chrome/browser/dom_ui/dom_ui_factory.h
+++ b/chrome/browser/dom_ui/dom_ui_factory.h
@@ -47,7 +47,7 @@ class DOMUIFactory {
private:
// Class is for scoping only.
- DOMUIFactory() {};
+ DOMUIFactory() {}
};
#endif // CHROME_BROWSER_DOM_UI_DOM_UI_FACTORY_H_
diff --git a/chrome/browser/dom_ui/dom_ui_thumbnail_source.h b/chrome/browser/dom_ui/dom_ui_thumbnail_source.h
index 4e1555d..6daf357 100644
--- a/chrome/browser/dom_ui/dom_ui_thumbnail_source.h
+++ b/chrome/browser/dom_ui/dom_ui_thumbnail_source.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_DOM_UI_DOM_UI_THUMBNAIL_SOURCE_H_
#include <string>
+#include <utility>
#include <vector>
#include "base/basictypes.h"
diff --git a/chrome/browser/dom_ui/downloads_dom_handler.cc b/chrome/browser/dom_ui/downloads_dom_handler.cc
index 33ea691..bdaddd7 100644
--- a/chrome/browser/dom_ui/downloads_dom_handler.cc
+++ b/chrome/browser/dom_ui/downloads_dom_handler.cc
@@ -223,7 +223,7 @@ void DownloadsDOMHandler::SendCurrentDownloads() {
int index = static_cast<int>(it - download_items_.begin());
if (index > kMaxDownloads)
break;
- results_value.Append(CreateDownloadItemValue(*it,index));
+ results_value.Append(CreateDownloadItemValue(*it, index));
}
dom_ui_->CallJavascriptFunction(L"downloadsList", results_value);
diff --git a/chrome/browser/dom_ui/downloads_dom_handler.h b/chrome/browser/dom_ui/downloads_dom_handler.h
index cb5063e..52a54da 100644
--- a/chrome/browser/dom_ui/downloads_dom_handler.h
+++ b/chrome/browser/dom_ui/downloads_dom_handler.h
@@ -103,4 +103,4 @@ class DownloadsDOMHandler : public DOMMessageHandler,
DISALLOW_COPY_AND_ASSIGN(DownloadsDOMHandler);
};
-#endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_
+#endif // CHROME_BROWSER_DOM_UI_DOWNLOADS_DOM_HANDLER_H_
diff --git a/chrome/browser/dom_ui/fileicon_source.h b/chrome/browser/dom_ui/fileicon_source.h
index 0f2924d..a13c207 100644
--- a/chrome/browser/dom_ui/fileicon_source.h
+++ b/chrome/browser/dom_ui/fileicon_source.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_DOM_UI_FILEICON_SOURCE_H_
#define CHROME_BROWSER_DOM_UI_FILEICON_SOURCE_H_
+#include <string>
+
#include "app/resource_bundle.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/browser/icon_manager.h"
diff --git a/chrome/browser/dom_ui/history_ui.h b/chrome/browser/dom_ui/history_ui.h
index 846fa61..892b2ab 100644
--- a/chrome/browser/dom_ui/history_ui.h
+++ b/chrome/browser/dom_ui/history_ui.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_DOM_UI_HISTORY_UI_H_
#define CHROME_BROWSER_DOM_UI_HISTORY_UI_H_
+#include <string>
#include <vector>
#include "chrome/browser/browsing_data_remover.h"
diff --git a/chrome/browser/dom_ui/html_dialog_ui.h b/chrome/browser/dom_ui/html_dialog_ui.h
index fce8f7c..ffc5196 100644
--- a/chrome/browser/dom_ui/html_dialog_ui.h
+++ b/chrome/browser/dom_ui/html_dialog_ui.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_DOM_UI_HTML_DIALOG_UI_H_
#define CHROME_BROWSER_DOM_UI_HTML_DIALOG_UI_H_
+#include <string>
#include <vector>
#include "chrome/browser/dom_ui/dom_ui.h"
@@ -18,33 +19,33 @@ class Size;
// Implement this class to receive notifications.
class HtmlDialogUIDelegate {
public:
- // Returns true if the contents needs to be run in a modal dialog.
- virtual bool IsDialogModal() const = 0;
+ // Returns true if the contents needs to be run in a modal dialog.
+ virtual bool IsDialogModal() const = 0;
- // Returns the title of the dialog.
- virtual std::wstring GetDialogTitle() const = 0;
+ // Returns the title of the dialog.
+ virtual std::wstring GetDialogTitle() const = 0;
- // Get the HTML file path for the content to load in the dialog.
- virtual GURL GetDialogContentURL() const = 0;
+ // Get the HTML file path for the content to load in the dialog.
+ virtual GURL GetDialogContentURL() const = 0;
- // Get DOMMessageHandler objects to handle messages from the HTML/JS page.
- // The handlers are used to send and receive messages from the page while it
- // is still open. Ownership of each handler is taken over by the DOMUI
- // hosting the page.
- virtual void GetDOMMessageHandlers(
- std::vector<DOMMessageHandler*>* handlers) const = 0;
+ // Get DOMMessageHandler objects to handle messages from the HTML/JS page.
+ // The handlers are used to send and receive messages from the page while it
+ // is still open. Ownership of each handler is taken over by the DOMUI
+ // hosting the page.
+ virtual void GetDOMMessageHandlers(
+ std::vector<DOMMessageHandler*>* handlers) const = 0;
- // Get the size of the dialog.
- virtual void GetDialogSize(gfx::Size* size) const = 0;
+ // Get the size of the dialog.
+ virtual void GetDialogSize(gfx::Size* size) const = 0;
- // Gets the JSON string input to use when showing the dialog.
- virtual std::string GetDialogArgs() const = 0;
+ // Gets the JSON string input to use when showing the dialog.
+ virtual std::string GetDialogArgs() const = 0;
- // A callback to notify the delegate that the dialog closed.
- virtual void OnDialogClosed(const std::string& json_retval) = 0;
+ // A callback to notify the delegate that the dialog closed.
+ virtual void OnDialogClosed(const std::string& json_retval) = 0;
- protected:
- ~HtmlDialogUIDelegate() {}
+ protected:
+ ~HtmlDialogUIDelegate() {}
};
// Displays file URL contents inside a modal HTML dialog.
@@ -71,7 +72,7 @@ class HtmlDialogUI : public DOMUI {
};
// When created, the property should already be set on the TabContents.
- HtmlDialogUI(TabContents* tab_contents);
+ explicit HtmlDialogUI(TabContents* tab_contents);
virtual ~HtmlDialogUI();
// Returns the PropertyBag accessor object used to write the delegate pointer
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index 24f0ace..5aed7c5 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
#define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
+#include <string>
+
#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/common/notification_registrar.h"
diff --git a/chrome/browser/dom_ui/shown_sections_handler.h b/chrome/browser/dom_ui/shown_sections_handler.h
index 70a7a50..cc1a300 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.h
+++ b/chrome/browser/dom_ui/shown_sections_handler.h
@@ -22,7 +22,7 @@ enum Section {
class ShownSectionsHandler : public DOMMessageHandler {
public:
ShownSectionsHandler() {}
- virtual ~ShownSectionsHandler() {}
+ virtual ~ShownSectionsHandler() {}
// DOMMessageHandler implementation.
virtual void RegisterMessages();
diff --git a/chrome/browser/extensions/extension_file_util.cc b/chrome/browser/extensions/extension_file_util.cc
index 638052d5..e5b0f85 100644
--- a/chrome/browser/extensions/extension_file_util.cc
+++ b/chrome/browser/extensions/extension_file_util.cc
@@ -402,4 +402,4 @@ bool CheckForIllegalFilenames(const FilePath& extension_path,
return true;
}
-} // extension_file_util
+} // namespace extension_file_util
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index d044bf0..b9de60a 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -82,7 +82,7 @@ static std::wstring GetInstallWarning(Extension* extension) {
#endif
-}
+} // namespace
ExtensionInstallUI::ExtensionInstallUI(Profile* profile)
: profile_(profile), ui_loop_(MessageLoop::current())
diff --git a/chrome/browser/extensions/extension_process_manager_unittest.cc b/chrome/browser/extensions/extension_process_manager_unittest.cc
index 5697dc0..76c163d 100644
--- a/chrome/browser/extensions/extension_process_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_process_manager_unittest.cc
@@ -23,7 +23,7 @@ class ExtensionProcessManagerTest : public testing::Test {
}
};
-}
+} // namespace
// Test that extensions get grouped in the right SiteInstance (and therefore
// process) based on their URLs.
diff --git a/chrome/browser/extensions/extension_startup_unittest.cc b/chrome/browser/extensions/extension_startup_unittest.cc
index 0efb161..00089ae 100644
--- a/chrome/browser/extensions/extension_startup_unittest.cc
+++ b/chrome/browser/extensions/extension_startup_unittest.cc
@@ -1,3 +1,7 @@
+// Copyright (c) 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 <vector>
#include "base/command_line.h"
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 0ff31f8..1dc1f05 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -36,7 +36,7 @@ namespace {
// Helper class to collect the IDs of every extension listed in the prefs.
class InstalledExtensionSet {
public:
- InstalledExtensionSet(InstalledExtensions* installed) {
+ explicit InstalledExtensionSet(InstalledExtensions* installed) {
scoped_ptr<InstalledExtensions> cleanup(installed);
installed->VisitInstalledExtensions(
NewCallback(this, &InstalledExtensionSet::ExtensionVisited));
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc
index ee5299f..fff1002 100644
--- a/chrome/browser/extensions/user_script_listener_unittest.cc
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -29,9 +29,9 @@ class SimpleTestJob : public URLRequestTestJob {
};
class MockUserScriptMaster : public UserScriptMaster {
-public:
- MockUserScriptMaster(MessageLoop* worker, const FilePath& script_dir) :
- UserScriptMaster(worker, script_dir) { }
+ public:
+ explicit MockUserScriptMaster(MessageLoop* worker, const FilePath& script_dir)
+ : UserScriptMaster(worker, script_dir) {}
virtual void StartScan() {
// Do nothing. We want to manually control when scans occur.
@@ -59,12 +59,12 @@ class MockIOThread : public base::Thread {
};
// A class to help with making and handling resource requests.
-class ResourceDispatcherHostTester :
- public ResourceDispatcherHost::Receiver,
- public URLRequest::Interceptor,
- public base::RefCountedThreadSafe<ResourceDispatcherHostTester> {
+class ResourceDispatcherHostTester
+ : public ResourceDispatcherHost::Receiver,
+ public URLRequest::Interceptor,
+ public base::RefCountedThreadSafe<ResourceDispatcherHostTester> {
public:
- ResourceDispatcherHostTester(MessageLoop* io_loop)
+ explicit ResourceDispatcherHostTester(MessageLoop* io_loop)
: Receiver(ChildProcessInfo::RENDER_PROCESS, -1),
host_(io_loop),
ui_loop_(MessageLoop::current()),
diff --git a/chrome/browser/gtk/back_forward_menu_model_gtk.h b/chrome/browser/gtk/back_forward_menu_model_gtk.h
index 9a6058c..c464421 100644
--- a/chrome/browser/gtk/back_forward_menu_model_gtk.h
+++ b/chrome/browser/gtk/back_forward_menu_model_gtk.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_GTK_BACK_FORWARD_MENU_MODEL_GTK_H_
#define CHROME_BROWSER_GTK_BACK_FORWARD_MENU_MODEL_GTK_H_
+#include <string>
+
#include "base/basictypes.h"
#include "chrome/browser/back_forward_menu_model.h"
diff --git a/chrome/browser/gtk/bookmark_context_menu_gtk.h b/chrome/browser/gtk/bookmark_context_menu_gtk.h
index 3680c65..faa4bed 100644
--- a/chrome/browser/gtk/bookmark_context_menu_gtk.h
+++ b/chrome/browser/gtk/bookmark_context_menu_gtk.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_GTK_BOOKMARK_CONTEXT_MENU_H_
-#define CHROME_BROWSER_GTK_BOOKMARK_CONTEXT_MENU_H_
+#ifndef CHROME_BROWSER_GTK_BOOKMARK_CONTEXT_MENU_GTK_H_
+#define CHROME_BROWSER_GTK_BOOKMARK_CONTEXT_MENU_GTK_H_
#include <vector>
@@ -138,4 +138,4 @@ class BookmarkContextMenuGtk : public BookmarkModelObserver,
DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuGtk);
};
-#endif // CHROME_BROWSER_GTK_BOOKMARK_CONTEXT_MENU_H_
+#endif // CHROME_BROWSER_GTK_BOOKMARK_CONTEXT_MENU_GTK_H_
diff --git a/chrome/browser/gtk/download_started_animation_gtk.cc b/chrome/browser/gtk/download_started_animation_gtk.cc
index 8913141..513a060 100644
--- a/chrome/browser/gtk/download_started_animation_gtk.cc
+++ b/chrome/browser/gtk/download_started_animation_gtk.cc
@@ -31,7 +31,7 @@ const double kMoveFraction = 1.0 / 3.0;
class DownloadStartedAnimationGtk : public Animation,
public NotificationObserver {
public:
- DownloadStartedAnimationGtk(TabContents* tab_contents);
+ explicit DownloadStartedAnimationGtk(TabContents* tab_contents);
// DownloadStartedAnimation will delete itself, but this is public so
// that we can use DeleteSoon().
diff --git a/chrome/browser/gtk/extension_shelf_gtk.h b/chrome/browser/gtk/extension_shelf_gtk.h
index b5ea977..d8af344 100644
--- a/chrome/browser/gtk/extension_shelf_gtk.h
+++ b/chrome/browser/gtk/extension_shelf_gtk.h
@@ -100,4 +100,4 @@ class ExtensionShelfGtk : public ExtensionShelfModelObserver,
DISALLOW_COPY_AND_ASSIGN(ExtensionShelfGtk);
};
-#endif // CHROME_BROWSER_EXTENSION_SHELF_GTK_H_
+#endif // CHROME_BROWSER_GTK_EXTENSION_SHELF_GTK_H_
diff --git a/chrome/browser/gtk/external_protocol_dialog_gtk.h b/chrome/browser/gtk/external_protocol_dialog_gtk.h
index c3801d2..0e2cac9 100644
--- a/chrome/browser/gtk/external_protocol_dialog_gtk.h
+++ b/chrome/browser/gtk/external_protocol_dialog_gtk.h
@@ -14,7 +14,7 @@ typedef struct _GtkWidget GtkWidget;
class ExternalProtocolDialogGtk {
public:
- ExternalProtocolDialogGtk(const GURL& url);
+ explicit ExternalProtocolDialogGtk(const GURL& url);
private:
static void OnDialogResponse(GtkWidget* widget,
diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc
index 9155125..6e78b69 100644
--- a/chrome/browser/gtk/gtk_theme_provider.cc
+++ b/chrome/browser/gtk/gtk_theme_provider.cc
@@ -17,7 +17,6 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
-#include "grit/theme_resources.h"
#include "skia/ext/skia_utils_gtk.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
diff --git a/chrome/browser/gtk/info_bubble_gtk.cc b/chrome/browser/gtk/info_bubble_gtk.cc
index b889628..3163555 100644
--- a/chrome/browser/gtk/info_bubble_gtk.cc
+++ b/chrome/browser/gtk/info_bubble_gtk.cc
@@ -249,8 +249,7 @@ void InfoBubbleGtk::MoveWindow() {
if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
screen_x = toplevel_x + rect_.x() + (rect_.width() / 2) -
window_->allocation.width + kArrowX;
- }
- else {
+ } else {
screen_x = toplevel_x + rect_.x() + (rect_.width() / 2) - kArrowX;
}
diff --git a/chrome/browser/gtk/menu_gtk.h b/chrome/browser/gtk/menu_gtk.h
index 8baf3002..7ce8800 100644
--- a/chrome/browser/gtk/menu_gtk.h
+++ b/chrome/browser/gtk/menu_gtk.h
@@ -36,7 +36,7 @@ class MenuGtk {
// Called when the menu stops showing. This will be called along with
// ExecuteCommand if the user clicks an item, but will also be called when
// the user clicks away from the menu.
- virtual void StoppedShowing() { };
+ virtual void StoppedShowing() {}
// Functions needed for creation of non-static menus.
virtual int GetItemCount() const { return 0; }
diff --git a/chrome/browser/gtk/options/fonts_page_gtk.h b/chrome/browser/gtk/options/fonts_page_gtk.h
index 7bcd244..017d8f5 100644
--- a/chrome/browser/gtk/options/fonts_page_gtk.h
+++ b/chrome/browser/gtk/options/fonts_page_gtk.h
@@ -75,5 +75,4 @@ class FontsPageGtk : public OptionsPageBase {
DISALLOW_COPY_AND_ASSIGN(FontsPageGtk);
};
-
-#endif // #ifndef CHROME_BROWSER_GTK_OPTIONS_FONTS_PAGE_GTK_H_
+#endif // CHROME_BROWSER_GTK_OPTIONS_FONTS_PAGE_GTK_H_
diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc
index 76915d2..58197d2 100644
--- a/chrome/browser/gtk/options/general_page_gtk.cc
+++ b/chrome/browser/gtk/options/general_page_gtk.cc
@@ -48,7 +48,7 @@ enum {
SEARCH_ENGINES_COL_COUNT,
};
-}
+} // namespace
///////////////////////////////////////////////////////////////////////////////
// GeneralPageGtk, public:
diff --git a/chrome/browser/gtk/options/options_layout_gtk.cc b/chrome/browser/gtk/options/options_layout_gtk.cc
index 5c3827b..4261f8a 100644
--- a/chrome/browser/gtk/options/options_layout_gtk.cc
+++ b/chrome/browser/gtk/options/options_layout_gtk.cc
@@ -11,7 +11,7 @@ namespace {
// Style for option group titles
const char kOptionGroupTitleMarkup[] = "<span weight='bold'>%s</span>";
-}
+} // namespace
OptionsLayoutBuilderGtk::OptionsLayoutBuilderGtk() {
page_ = gtk_vbox_new(FALSE, gtk_util::kContentAreaSpacing);
diff --git a/chrome/browser/gtk/options/passwords_exceptions_window_gtk.h b/chrome/browser/gtk/options/passwords_exceptions_window_gtk.h
index cca03f9..45aa8e0 100644
--- a/chrome/browser/gtk/options/passwords_exceptions_window_gtk.h
+++ b/chrome/browser/gtk/options/passwords_exceptions_window_gtk.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_GTK_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_H_
-#define CHROME_BROWSER_GTK_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_H_
+#ifndef CHROME_BROWSER_GTK_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_GTK_H_
+#define CHROME_BROWSER_GTK_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_GTK_H_
class Profile;
void ShowPasswordsExceptionsWindow(Profile* profile);
-#endif // #ifndef CHROME_BROWSER_GTK_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_H_
+#endif // CHROME_BROWSER_GTK_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_GTK_H_
diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.h b/chrome/browser/gtk/options/url_picker_dialog_gtk.h
index eead60a..f4c74b5 100644
--- a/chrome/browser/gtk/options/url_picker_dialog_gtk.h
+++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_GTK_OPTIONS_URL_PICKER_DIALOG_GTK_H_
#define CHROME_BROWSER_GTK_OPTIONS_URL_PICKER_DIALOG_GTK_H_
+#include <string>
+
#include "base/basictypes.h"
#include "base/task.h"
#include "chrome/browser/history/history.h"
diff --git a/chrome/browser/hang_monitor/hung_plugin_action.h b/chrome/browser/hang_monitor/hung_plugin_action.h
index f497346..631bd34 100644
--- a/chrome/browser/hang_monitor/hung_plugin_action.h
+++ b/chrome/browser/hang_monitor/hung_plugin_action.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__
-#define CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__
+#ifndef CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__
+#define CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__
#include "chrome/browser/hang_monitor/hung_window_detector.h"
// This class provides an implementation the
@@ -42,4 +42,4 @@ class HungPluginAction : public HungWindowDetector::HungWindowNotification {
HWND current_hung_plugin_window_;
};
-#endif // CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__
+#endif // CHROME_BROWSER_HANG_MONITOR_HUNG_PLUGIN_ACTION_H__
diff --git a/chrome/browser/hang_monitor/hung_window_detector.h b/chrome/browser/hang_monitor/hung_window_detector.h
index b3ac56d..d4e2553 100644
--- a/chrome/browser/hang_monitor/hung_window_detector.h
+++ b/chrome/browser/hang_monitor/hung_window_detector.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HUNG_WINDOW_DETECTOR_H__
-#define CHROME_BROWSER_HUNG_WINDOW_DETECTOR_H__
+#ifndef CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__
+#define CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__
#include "base/lock.h"
#include "chrome/common/worker_thread_ticker.h"
@@ -48,7 +48,7 @@ class HungWindowDetector : public WorkerThreadTicker::Callback {
// Ownership of this pointer is not transferred to this class.
// Note that the Initialize method needs to be called to initiate monitoring
// of hung windows.
- HungWindowDetector(HungWindowNotification* notification);
+ explicit HungWindowDetector(HungWindowNotification* notification);
~HungWindowDetector();
// This method initialized the monitoring of hung windows. All descendant
@@ -88,4 +88,4 @@ class HungWindowDetector : public WorkerThreadTicker::Callback {
};
-#endif // CHROME_BROWSER_HUNG_WINDOW_DETECTOR_H__
+#endif // CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index bb92d19..7270a3d 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -485,18 +485,18 @@ TEST_F(HistoryBackendTest, ClientRedirect) {
// Initial transition to page A.
GURL url_a("http://google.com/a");
- AddClientRedirect(GURL(), url_a, false, &transition1, &transition2);
+ AddClientRedirect(GURL(), url_a, false, &transition1, &transition2);
EXPECT_TRUE(transition2 & PageTransition::CHAIN_END);
// User initiated redirect to page B.
GURL url_b("http://google.com/b");
- AddClientRedirect(url_a, url_b, false, &transition1, &transition2);
+ AddClientRedirect(url_a, url_b, false, &transition1, &transition2);
EXPECT_TRUE(transition1 & PageTransition::CHAIN_END);
EXPECT_TRUE(transition2 & PageTransition::CHAIN_END);
// Non-user initiated redirect to page C.
GURL url_c("http://google.com/c");
- AddClientRedirect(url_b, url_c, true, &transition1, &transition2);
+ AddClientRedirect(url_b, url_c, true, &transition1, &transition2);
EXPECT_FALSE(transition1 & PageTransition::CHAIN_END);
EXPECT_TRUE(transition2 & PageTransition::CHAIN_END);
}
diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc
index cd16063..aadd0af 100644
--- a/chrome/browser/history/history_types.cc
+++ b/chrome/browser/history/history_types.cc
@@ -198,7 +198,6 @@ void QueryResults::DeleteRange(size_t begin, size_t end) {
// Remove this referece from the list.
found->second->erase(found->second->begin() + match);
match--;
-
}
}
diff --git a/chrome/browser/history/page_usage_data.cc b/chrome/browser/history/page_usage_data.cc
index 643f1a6..f202538 100644
--- a/chrome/browser/history/page_usage_data.cc
+++ b/chrome/browser/history/page_usage_data.cc
@@ -28,7 +28,7 @@ void PageUsageData::SetFavIcon(SkBitmap* img) {
favicon_set_ = true;
}
-//static
+// static
bool PageUsageData::Predicate(const PageUsageData* lhs,
const PageUsageData* rhs) {
return lhs->GetScore() > rhs->GetScore();
diff --git a/chrome/browser/history/query_parser.cc b/chrome/browser/history/query_parser.cc
index f17dad6..6bfaa7f 100644
--- a/chrome/browser/history/query_parser.cc
+++ b/chrome/browser/history/query_parser.cc
@@ -66,7 +66,8 @@ void CoalseAndSortMatchPositions(Snippet::MatchPositions* matches) {
// A QueryNodeWord is a single word in the query.
class QueryNodeWord : public QueryNode {
public:
- QueryNodeWord(const std::wstring& word) : word_(word), literal_(false) {}
+ explicit QueryNodeWord(const std::wstring& word)
+ : word_(word), literal_(false) {}
virtual ~QueryNodeWord() {}
virtual int AppendToSQLiteQuery(std::wstring* query) const;
virtual bool IsWord() const { return true; }
diff --git a/chrome/browser/history/snippet_unittest.cc b/chrome/browser/history/snippet_unittest.cc
index cfc935c..aa9aa2e 100644
--- a/chrome/browser/history/snippet_unittest.cc
+++ b/chrome/browser/history/snippet_unittest.cc
@@ -25,7 +25,6 @@ const char* kSampleDocument = "Google\xe2\x84\xa2 Terms of Service "
"Amphitheatre Parkway, Mountain View, CA 94043, United States. This document "
"explains how the agreement is made up, and sets out some of the terms of "
"that agreement.";
-
};
// Thai sample taken from http://www.google.co.th/intl/th/privacy.html
@@ -228,16 +227,16 @@ TEST(Snippets, ExtractMatchPositions) {
const size_t expected_match_count;
const size_t expected_matches[10];
} data[] = {
- { "0 0 1 2 0 0 4 1 0 0 1 5", 1, { 1,6 } },
- { "0 0 1 4 0 0 2 1", 1, { 1,5 } },
- { "0 0 4 1 0 0 2 1", 2, { 2,3, 4,5 } },
- { "0 0 0 1", 1, { 0,1 } },
- { "0 0 0 1 0 0 0 2", 1, { 0,2 } },
- { "0 0 1 1 0 0 1 2", 1, { 1,3 } },
- { "0 0 1 2 0 0 4 3 0 0 3 1", 1, { 1,7 } },
- { "0 0 1 4 0 0 2 5", 1, { 1,7 } },
- { "0 0 1 2 0 0 1 1", 1, { 1,3 } },
- { "0 0 1 1 0 0 5 2 0 0 10 1 0 0 3 10", 2, { 1,2, 3,13 } },
+ { "0 0 1 2 0 0 4 1 0 0 1 5", 1, { 1, 6 } },
+ { "0 0 1 4 0 0 2 1", 1, { 1, 5 } },
+ { "0 0 4 1 0 0 2 1", 2, { 2, 3, 4, 5 } },
+ { "0 0 0 1", 1, { 0, 1 } },
+ { "0 0 0 1 0 0 0 2", 1, { 0, 2 } },
+ { "0 0 1 1 0 0 1 2", 1, { 1, 3 } },
+ { "0 0 1 2 0 0 4 3 0 0 3 1", 1, { 1, 7 } },
+ { "0 0 1 4 0 0 2 5", 1, { 1, 7 } },
+ { "0 0 1 2 0 0 1 1", 1, { 1, 3 } },
+ { "0 0 1 1 0 0 5 2 0 0 10 1 0 0 3 10", 2, { 1, 2, 3, 13 } },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
Snippet::MatchPositions matches;
diff --git a/chrome/browser/history/starred_url_database.cc b/chrome/browser/history/starred_url_database.cc
index 7c77574..31e659c 100644
--- a/chrome/browser/history/starred_url_database.cc
+++ b/chrome/browser/history/starred_url_database.cc
@@ -380,7 +380,7 @@ bool StarredURLDatabase::BuildStarNodes(
StarredNode* node = group_id_to_node_map[star_entries[i].group_id];
if (!node->HasAncestor(parent) && !parent->HasAncestor(node)) {
parent->Add(parent->GetChildCount(), node);
- } else{
+ } else {
// The node has a cycle. Add it to the list of roots so the cycle is
// broken.
roots->insert(node);
diff --git a/chrome/browser/history/url_database_unittest.cc b/chrome/browser/history/url_database_unittest.cc
index 0f0be54..d6dc43f 100644
--- a/chrome/browser/history/url_database_unittest.cc
+++ b/chrome/browser/history/url_database_unittest.cc
@@ -112,13 +112,13 @@ TEST_F(URLDatabaseTest, AddURL) {
EXPECT_EQ(0, GetRowForURL(GURL("http://news.google.com/"), &info));
// Delete all urls in the domain
- // FIXME(ACW) test the new url based delete domain
- //EXPECT_TRUE(db.DeleteDomain(kDomainID));
+ // TODO(acw): test the new url based delete domain
+ // EXPECT_TRUE(db.DeleteDomain(kDomainID));
// Make sure the urls have been properly removed
- // FIXME(ACW) commented out because remove no longer works.
- //EXPECT_TRUE(db.GetURLInfo(url1, NULL) == NULL);
- //EXPECT_TRUE(db.GetURLInfo(url2, NULL) == NULL);
+ // TODO(acw): commented out because remove no longer works.
+ // EXPECT_TRUE(db.GetURLInfo(url1, NULL) == NULL);
+ // EXPECT_TRUE(db.GetURLInfo(url2, NULL) == NULL);
}
// Tests adding, querying and deleting keyword visits.
diff --git a/chrome/browser/history/visit_log_unittest.cc b/chrome/browser/history/visit_log_unittest.cc
index 5389281..c69f051 100644
--- a/chrome/browser/history/visit_log_unittest.cc
+++ b/chrome/browser/history/visit_log_unittest.cc
@@ -18,7 +18,7 @@ TEST(VisitLog, SimpleRecording) {
ASSERT_EQ(history::VisitLog::NO_OP, vlog_buffer[2]);
ASSERT_EQ(history::VisitLog::NO_OP, vlog_buffer[vlog_buffer_size-1]);
- for (int i=0; i<vlog_buffer_size; i++)
+ for (int i = 0; i < vlog_buffer_size; i++)
vlog.AddEvent(history::VisitLog::ADD_VISIT);
ASSERT_EQ(history::VisitLog::ADD_VISIT, vlog_buffer[0]);
diff --git a/chrome/browser/history/visit_tracker_unittest.cc b/chrome/browser/history/visit_tracker_unittest.cc
index 8676fbe..5c84d28 100644
--- a/chrome/browser/history/visit_tracker_unittest.cc
+++ b/chrome/browser/history/visit_tracker_unittest.cc
@@ -76,17 +76,17 @@ TEST(VisitTracker, SimpleTransitions) {
TEST(VisitTracker, Frames) {
VisitToTest test_frames[] = {
// Started here:
- {1, 1, "http://foo.com/", 1, "", 0},
+ {1, 1, "http://foo.com/", 1, "", 0},
// Which had an auto-loaded subframe:
- {1, 1, "http://foo.com/ad.html", 2, "http://foo.com/", 1},
+ {1, 1, "http://foo.com/ad.html", 2, "http://foo.com/", 1},
// ...and another auto-loaded subframe:
- {1, 1, "http://foo.com/ad2.html", 3, "http://foo.com/", 1},
+ {1, 1, "http://foo.com/ad2.html", 3, "http://foo.com/", 1},
// ...and the user navigated the first subframe to somwhere else
- {1, 2, "http://bar.com/", 4, "http://foo.com/ad.html", 2},
+ {1, 2, "http://bar.com/", 4, "http://foo.com/ad.html", 2},
// ...and then the second subframe somewhere else
- {1, 3, "http://fud.com/", 5, "http://foo.com/ad2.html",3},
+ {1, 3, "http://fud.com/", 5, "http://foo.com/ad2.html", 3},
// ...and then the main frame somewhere else.
- {1, 4, "http://www.google.com/", 6, "http://foo.com/", 1},
+ {1, 4, "http://www.google.com/", 6, "http://foo.com/", 1},
};
VisitTracker tracker;
diff --git a/chrome/browser/in_process_webkit/dom_storage_uitest.cc b/chrome/browser/in_process_webkit/dom_storage_uitest.cc
index d372883..874e094 100644
--- a/chrome/browser/in_process_webkit/dom_storage_uitest.cc
+++ b/chrome/browser/in_process_webkit/dom_storage_uitest.cc
@@ -8,9 +8,9 @@
// TODO(jorlow): Enable these tests when we remove them from the
// test_exceptions.txt file.
-//static const char* kTopLevelFiles[] = {
- //"window-attributes-exist.html"
-//};
+// static const char* kTopLevelFiles[] = {
+// "window-attributes-exist.html"
+// };
// TODO(jorlow): Enable these tests when we remove them from the
// test_exceptions.txt file.
@@ -19,15 +19,15 @@ static const char* kSubDirFiles[] = {
"delete-removal.html",
"enumerate-storage.html",
"enumerate-with-length-and-key.html",
- //"iframe-events.html",
- //"index-get-and-set.html",
- //"onstorage-attribute-markup.html",
- //"onstorage-attribute-setattribute.html",
- //"localstorage/onstorage-attribute-setwindow.html",
- //"simple-events.html",
+ // "iframe-events.html",
+ // "index-get-and-set.html",
+ // "onstorage-attribute-markup.html",
+ // "onstorage-attribute-setattribute.html",
+ // "localstorage/onstorage-attribute-setwindow.html",
+ // "simple-events.html",
"simple-usage.html",
- //"string-conversion.html",
- //"window-open.html"
+ // "string-conversion.html",
+ // "window-open.html"
};
class DOMStorageTest : public UILayoutTest {
@@ -35,8 +35,7 @@ class DOMStorageTest : public UILayoutTest {
DOMStorageTest()
: UILayoutTest(),
test_dir_(FilePath().AppendASCII("LayoutTests").
- AppendASCII("storage").AppendASCII("domstorage"))
- {
+ AppendASCII("storage").AppendASCII("domstorage")) {
}
virtual ~DOMStorageTest() { }
@@ -70,13 +69,13 @@ TEST_F(DOMStorageTest, DOMStorageLayoutTests) {
TEST_F(DOMStorageTest, MAYBE_LocalStorageLayoutTests) {
InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("localstorage"),
false);
- for (size_t i=0; i<arraysize(kSubDirFiles); ++i)
+ for (size_t i = 0; i < arraysize(kSubDirFiles); ++i)
RunLayoutTest(kSubDirFiles[i], false);
}
TEST_F(DOMStorageTest, SessionStorageLayoutTests) {
InitializeForLayoutTest(test_dir_, FilePath().AppendASCII("sessionstorage"),
false);
- for (size_t i=0; i<arraysize(kSubDirFiles); ++i)
+ for (size_t i = 0; i < arraysize(kSubDirFiles); ++i)
RunLayoutTest(kSubDirFiles[i], false);
}
diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc
index b276e02..8aee921 100644
--- a/chrome/browser/net/url_fixer_upper.cc
+++ b/chrome/browser/net/url_fixer_upper.cc
@@ -246,7 +246,7 @@ static void FixupPort(const string& text,
// Look for non-digit in port and strip if found.
string port(text, part.begin, part.len);
- for (string::iterator i = port.begin(); i != port.end(); ) {
+ for (string::iterator i = port.begin(); i != port.end();) {
if (IsAsciiDigit(*i))
++i;
else
diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc
index 61ba171..62ca1f9 100644
--- a/chrome/browser/net/url_fixer_upper_unittest.cc
+++ b/chrome/browser/net/url_fixer_upper_unittest.cc
@@ -231,7 +231,7 @@ struct fixup_case {
// It would be better if this next case got treated as http, but I don't see
// a clean way to guess this isn't the new-and-exciting "user" scheme.
{"user:passwd@www.google.com:8080/", "", "user:passwd@www.google.com:8080/"},
- //{"file:///c:/foo/bar%20baz.txt", "", "file:///C:/foo/bar%20baz.txt"},
+ // {"file:///c:/foo/bar%20baz.txt", "", "file:///C:/foo/bar%20baz.txt"},
{"ftp.google.com", "", "ftp://ftp.google.com/"},
{" ftp.google.com", "", "ftp://ftp.google.com/"},
{"FTP.GooGle.com", "", "ftp://FTP.GooGle.com/"},
diff --git a/chrome/browser/net/url_request_tracking.cc b/chrome/browser/net/url_request_tracking.cc
index f877782..60ad7d2 100644
--- a/chrome/browser/net/url_request_tracking.cc
+++ b/chrome/browser/net/url_request_tracking.cc
@@ -15,7 +15,7 @@ const void* kOriginProcessUniqueIDKey = 0;
class UniqueIDData : public URLRequest::UserData {
public:
- UniqueIDData(int id) : id_(id) {}
+ explicit UniqueIDData(int id) : id_(id) {}
virtual ~UniqueIDData() {}
int id() const { return id_; }
diff --git a/chrome/browser/printing/print_dialog_gtk.cc b/chrome/browser/printing/print_dialog_gtk.cc
index 14cc54e..7536a59 100644
--- a/chrome/browser/printing/print_dialog_gtk.cc
+++ b/chrome/browser/printing/print_dialog_gtk.cc
@@ -22,7 +22,7 @@ namespace {
// to print to printers that don't support PDF.
class PdfUnsupportedInfoBarDelegate : public LinkInfoBarDelegate {
public:
- PdfUnsupportedInfoBarDelegate(Browser* browser)
+ explicit PdfUnsupportedInfoBarDelegate(Browser* browser)
: LinkInfoBarDelegate(NULL),
browser_(browser) {
}
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
index 8a1a5e2..245c01a 100644
--- a/chrome/browser/printing/print_job.cc
+++ b/chrome/browser/printing/print_job.cc
@@ -317,8 +317,7 @@ void PrintJob::ControlledWorkerShutdown() {
DispatchMessage(&msg);
}
// Continue looping.
- }
- else if (result == WAIT_OBJECT_0) {
+ } else if (result == WAIT_OBJECT_0) {
// The thread quit.
break;
} else {
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc
index 3ef795c..8c79e6a 100644
--- a/chrome/browser/printing/print_job_unittest.cc
+++ b/chrome/browser/printing/print_job_unittest.cc
@@ -63,7 +63,7 @@ class TestOwner : public printing::PrintJobWorkerOwner {
class TestPrintJob : public printing::PrintJob {
public:
- TestPrintJob(volatile bool* check) : check_(check) {
+ explicit TestPrintJob(volatile bool* check) : check_(check) {
}
~TestPrintJob() {
*check_ = true;
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc
index 80093fe..fb0b6c0 100644
--- a/chrome/browser/printing/printing_layout_uitest.cc
+++ b/chrome/browser/printing/printing_layout_uitest.cc
@@ -262,7 +262,7 @@ bool CloseDialogWindow(HWND dialog_window) {
// default button.
class DismissTheWindow : public base::DelegateSimpleThread::Delegate {
public:
- DismissTheWindow(DWORD owner_process)
+ explicit DismissTheWindow(DWORD owner_process)
: owner_process_(owner_process) {
}
diff --git a/chrome/browser/privacy_blacklist/blacklist_store.cc b/chrome/browser/privacy_blacklist/blacklist_store.cc
index 95dd67c..327b255 100644
--- a/chrome/browser/privacy_blacklist/blacklist_store.cc
+++ b/chrome/browser/privacy_blacklist/blacklist_store.cc
@@ -18,7 +18,7 @@ const char cookie[] = "GCPBL100";
const size_t kMaxBlockedTypes = 256;
const size_t kMaxStringSize = 8192;
-}
+} // namespace
bool BlacklistStoreOutput::WriteUInt(uint32 i) {
return fwrite(reinterpret_cast<char*>(&i), 1, sizeof(uint32), file_) ==
diff --git a/chrome/browser/privacy_blacklist/blocked_response.cc b/chrome/browser/privacy_blacklist/blocked_response.cc
index b4e94d9..c0c00a9 100644
--- a/chrome/browser/privacy_blacklist/blocked_response.cc
+++ b/chrome/browser/privacy_blacklist/blocked_response.cc
@@ -25,7 +25,7 @@ std::string Dehash(unsigned long l) {
return *(std::string*)l;
}
-}
+} // namespace
namespace chrome {
@@ -101,4 +101,4 @@ std::string BlockedResponse::GetOriginalURL(const std::string& url) {
return chrome::kAboutBlankURL;
}
-} // end namespace chrome
+} // namespace chrome
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index bfed63f..9522cee 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -59,8 +59,8 @@ namespace {
// first and then the caller. This is done so that the SessionWindows can be
// recreated from the SessionCommands and the SessionWindows passed to the
// caller. The following class is used for this.
-class InternalLastSessionRequest :
- public BaseSessionService::InternalGetCommandsRequest {
+class InternalLastSessionRequest
+ : public BaseSessionService::InternalGetCommandsRequest {
public:
InternalLastSessionRequest(
CallbackType* callback,
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index a875229..0ff9d6b 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -191,7 +191,7 @@ void SyncBackendHost::Core::DoInitialize(
string16 path_str;
#if defined (OS_WIN)
path_str = host_->sync_data_folder_path().value();
-#elif (defined(OS_LINUX) || defined(OS_MACOSX))
+#elif defined(OS_LINUX) || defined(OS_MACOSX)
path_str = UTF8ToUTF16(host_->sync_data_folder_path().value());
#endif
success = syncapi_->Init(path_str.c_str(),
diff --git a/chrome/browser/tab_contents/infobar_delegate.h b/chrome/browser/tab_contents/infobar_delegate.h
index 104501e..d6a1899 100644
--- a/chrome/browser/tab_contents/infobar_delegate.h
+++ b/chrome/browser/tab_contents/infobar_delegate.h
@@ -251,4 +251,4 @@ class SimpleAlertInfoBarDelegate : public AlertInfoBarDelegate {
DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate);
};
-#endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
+#endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index 0959aa4..042801a 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -315,7 +315,7 @@ void InterstitialPage::DidNavigate(
// A fast user could have navigated away from the page that triggered the
// interstitial while the interstitial was loading, that would have disabled
// us. In that case we can dismiss ourselves.
- if (!enabled_){
+ if (!enabled_) {
DontProceed();
return;
}
diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h
index 3d6a6bc..b6d30c4 100644
--- a/chrome/browser/tab_contents/interstitial_page.h
+++ b/chrome/browser/tab_contents/interstitial_page.h
@@ -206,7 +206,7 @@ class InterstitialPage : public NotificationObserver,
// We keep a map of the various blocking pages shown as the UI tests need to
// be able to retrieve them.
- typedef std::map<TabContents*,InterstitialPage*> InterstitialPageMap;
+ typedef std::map<TabContents*, InterstitialPage*> InterstitialPageMap;
static InterstitialPageMap* tab_to_interstitial_page_;
// Settings passed to the renderer.
diff --git a/chrome/browser/tab_contents/navigation_controller.h b/chrome/browser/tab_contents/navigation_controller.h
index 57fe395..0ac4c3b 100644
--- a/chrome/browser/tab_contents/navigation_controller.h
+++ b/chrome/browser/tab_contents/navigation_controller.h
@@ -7,6 +7,9 @@
#include "build/build_config.h"
+#include <string>
+#include <vector>
+
#include "base/linked_ptr.h"
#include "base/string16.h"
#include "base/time.h"
diff --git a/chrome/browser/tab_contents/navigation_controller_unittest.cc b/chrome/browser/tab_contents/navigation_controller_unittest.cc
index a8b75c3..9dc51d4 100644
--- a/chrome/browser/tab_contents/navigation_controller_unittest.cc
+++ b/chrome/browser/tab_contents/navigation_controller_unittest.cc
@@ -557,7 +557,7 @@ TEST_F(NavigationControllerTest, Back_NewPending) {
EXPECT_TRUE(notifications.Check1AndReset(
NotificationType::NAV_ENTRY_COMMITTED));
- //controller().LoadURL(kUrl2, PageTransition::TYPED);
+ // controller().LoadURL(kUrl2, PageTransition::TYPED);
rvh()->SendNavigate(1, kUrl2);
EXPECT_TRUE(notifications.Check1AndReset(
NotificationType::NAV_ENTRY_COMMITTED));
@@ -1082,7 +1082,7 @@ class PrunedListener : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(PrunedListener);
};
-}
+} // namespace
// Tests that we limit the number of navigation entries created correctly.
TEST_F(NavigationControllerTest, EnforceMaxNavigationCount) {
diff --git a/chrome/browser/tab_contents/navigation_entry.h b/chrome/browser/tab_contents/navigation_entry.h
index 433f80b..1d58ce6 100644
--- a/chrome/browser/tab_contents/navigation_entry.h
+++ b/chrome/browser/tab_contents/navigation_entry.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
#define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_
+#include <string>
+
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index be80fda..053e9ac 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -206,8 +206,8 @@ void RenderViewContextMenu::AppendFrameItems() {
AppendSeparator();
// These two menu items have yet to be implemented.
// http://code.google.com/p/chromium/issues/detail?id=11827
- //AppendMenuItem(IDS_CONTENT_CONTEXT_SAVEFRAMEAS);
- //AppendMenuItem(IDS_CONTENT_CONTEXT_PRINTFRAME);
+ // AppendMenuItem(IDS_CONTENT_CONTEXT_SAVEFRAMEAS);
+ // AppendMenuItem(IDS_CONTENT_CONTEXT_PRINTFRAME);
AppendMenuItem(IDS_CONTENT_CONTEXT_VIEWFRAMESOURCE);
AppendMenuItem(IDS_CONTENT_CONTEXT_VIEWFRAMEINFO);
}
diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h
index 7b5f7a7..1fcde96 100644
--- a/chrome/browser/tab_contents/tab_contents_delegate.h
+++ b/chrome/browser/tab_contents/tab_contents_delegate.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
#define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
+#include <string>
+
#include "app/gfx/native_widget_types.h"
#include "base/basictypes.h"
#include "base/gfx/rect.h"
@@ -237,7 +239,6 @@ class TabContentsDelegate {
protected:
~TabContentsDelegate() {}
-
};
#endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
diff --git a/chrome/browser/tab_contents/thumbnail_generator.h b/chrome/browser/tab_contents/thumbnail_generator.h
index d3d3d15..499c2d6 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.h
+++ b/chrome/browser/tab_contents/thumbnail_generator.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_
#define CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_
+#include <vector>
+
#include "base/basictypes.h"
#include "base/timer.h"
#include "chrome/browser/renderer_host/render_widget_host_painting_observer.h"
diff --git a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
index 160a377..753848b 100644
--- a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc
@@ -20,7 +20,7 @@ static const int kBitmapHeight = 100;
// TODO(brettw) enable this when GetThumbnailForBackingStore is implemented
// for other platforms in thumbnail_generator.cc
-//#if defined(OS_WIN)
+// #if defined(OS_WIN)
// TODO(brettw) enable this on Windows after we clobber a build to see if the
// failures of this on the buildbot can be resolved.
#if 0
diff --git a/chrome/browser/tab_contents/view_source_uitest.cc b/chrome/browser/tab_contents/view_source_uitest.cc
index 04499ff..4ee078d 100644
--- a/chrome/browser/tab_contents/view_source_uitest.cc
+++ b/chrome/browser/tab_contents/view_source_uitest.cc
@@ -29,7 +29,7 @@ class ViewSourceTest : public UITest {
}
protected:
- std::wstring test_html_;
+ std::wstring test_html_;
};
// This test renders a page in view-source and then checks to see if a cookie
diff --git a/chrome/browser/tab_contents/web_drag_source.h b/chrome/browser/tab_contents/web_drag_source.h
index 7896dd4..597e087 100644
--- a/chrome/browser/tab_contents/web_drag_source.h
+++ b/chrome/browser/tab_contents/web_drag_source.h
@@ -65,4 +65,4 @@ class WebDragSource : public BaseDragSource,
DISALLOW_COPY_AND_ASSIGN(WebDragSource);
};
-#endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_
+#endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_H_
diff --git a/chrome/browser/tab_contents/web_drop_target.h b/chrome/browser/tab_contents/web_drop_target.h
index 36894c8..38a3466 100644
--- a/chrome/browser/tab_contents/web_drop_target.h
+++ b/chrome/browser/tab_contents/web_drop_target.h
@@ -70,4 +70,4 @@ class WebDropTarget : public BaseDropTarget {
DISALLOW_EVIL_CONSTRUCTORS(WebDropTarget);
};
-#endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DROP_TARGET_H_
+#endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DROP_TARGET_H_
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 949d29e..081f1b4 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -111,7 +111,7 @@ class TabStripModelTest : public RenderViewHostTestHarness {
}
void SwitchTabTo(TabContents* contents) {
- //contents()->DidBecomeSelected();
+ // contents()->DidBecomeSelected();
}
// Sets the id of the specified contents.
@@ -150,7 +150,7 @@ class TabStripModelTest : public RenderViewHostTestHarness {
std::wstring test_dir_;
std::wstring profile_path_;
- std::map<TabContents*,int> foo_;
+ std::map<TabContents*, int> foo_;
ProfileManager pm_;
};
diff --git a/chrome/browser/visitedlink_master.cc b/chrome/browser/visitedlink_master.cc
index 6bd06bb..1036bb6 100644
--- a/chrome/browser/visitedlink_master.cc
+++ b/chrome/browser/visitedlink_master.cc
@@ -165,9 +165,9 @@ class AsyncCloseHandle : public Task {
// Sometimes, the master will be deleted before the rebuild is complete, in
// which case it notifies the builder via DisownMaster(). The builder will
// delete itself once rebuilding is complete, and not execute any callback.
-class VisitedLinkMaster::TableBuilder :
- public HistoryService::URLEnumerator,
- public base::RefCountedThreadSafe<TableBuilder> {
+class VisitedLinkMaster::TableBuilder
+ : public HistoryService::URLEnumerator,
+ public base::RefCountedThreadSafe<TableBuilder> {
public:
TableBuilder(VisitedLinkMaster* master,
const uint8 salt[LINK_SALT_LENGTH]);