summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/l10n_util.cc2
-rw-r--r--chrome/browser/automation/automation_provider_win.cc4
-rw-r--r--chrome/browser/automation/ui_controls_win.cc2
-rw-r--r--chrome/browser/chrome_thread_unittest.cc5
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc2
-rw-r--r--chrome/browser/dom_ui/new_tab_page_sync_handler.cc2
-rw-r--r--chrome/browser/download/download_request_manager.cc2
-rw-r--r--chrome/browser/download/download_request_manager_unittest.cc3
-rw-r--r--chrome/browser/extensions/convert_user_script.cc2
-rw-r--r--chrome/browser/importer/importer_unittest.cc2
-rw-r--r--chrome/browser/login_prompt_gtk.cc2
-rw-r--r--chrome/browser/login_prompt_win.cc2
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc4
-rw-r--r--chrome/browser/net/url_fetcher_unittest.cc2
-rw-r--r--chrome/browser/parsers/metadata_parser_filebase.cc4
-rw-r--r--chrome/browser/parsers/metadata_parser_jpeg_factory.cc3
-rw-r--r--chrome/browser/password_manager/password_form_manager.cc2
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc2
-rw-r--r--chrome/browser/process_info_snapshot_mac.cc2
-rw-r--r--chrome/browser/renderer_host/async_resource_handler.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_unittest.cc2
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc2
-rw-r--r--chrome/browser/safe_browsing/database_perftest.cc2
-rw-r--r--chrome/browser/safe_browsing/protocol_parser_unittest.cc2
-rw-r--r--chrome/browser/search_engines/edit_search_engine_controller.cc2
-rw-r--r--chrome/browser/search_engines/template_url_prepopulate_data.cc2
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc2
-rw-r--r--chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc8
-rw-r--r--chrome/browser/sync/engine/conflict_resolver.cc8
-rw-r--r--chrome/browser/sync/notifier/communicator/login.cc2
-rw-r--r--chrome/browser/sync/notifier/communicator/mailbox.cc2
-rw-r--r--chrome/browser/sync/sync_setup_wizard_unittest.cc1
-rw-r--r--chrome/browser/views/about_ipc_dialog.cc2
-rw-r--r--chrome/browser/views/about_network_dialog.cc2
-rw-r--r--chrome/browser/views/bookmark_table_view.cc2
-rw-r--r--chrome/browser/views/browser_bubble_win.cc3
-rw-r--r--chrome/browser/views/download_item_view.cc2
-rw-r--r--chrome/browser/views/download_started_animation_win.cc2
-rw-r--r--chrome/browser/views/infobars/infobars.cc2
-rw-r--r--chrome/browser/views/shell_dialogs_win.cc5
-rw-r--r--chrome/common/extensions/extension_action_unittest.cc4
-rw-r--r--chrome/common/logging_chrome.cc2
-rw-r--r--chrome/common/mru_cache_unittest.cc4
-rw-r--r--chrome/common/pref_member_unittest.cc3
-rw-r--r--chrome/common/worker_thread_ticker.cc2
-rw-r--r--chrome/installer/gcapi/gcapi.cc2
-rw-r--r--chrome/installer/setup/uninstall.cc2
-rw-r--r--chrome/installer/util/browser_distribution.cc2
-rw-r--r--chrome/installer/util/create_dir_work_item.cc2
-rw-r--r--chrome/installer/util/create_reg_key_work_item.cc10
-rw-r--r--chrome/installer/util/html_dialog_impl.cc2
-rw-r--r--chrome/installer/util/lzma_util.cc2
-rw-r--r--chrome/installer/util/lzma_util_unittest.cc2
-rw-r--r--chrome/installer/util/shell_util.cc2
-rw-r--r--chrome/renderer/automation/dom_automation_controller.cc2
-rw-r--r--chrome/renderer/render_thread.cc10
-rw-r--r--chrome/renderer/renderer_glue.cc2
-rw-r--r--chrome/renderer/visitedlink_slave.cc2
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc5
-rw-r--r--chrome/renderer/websharedworker_proxy.cc3
-rw-r--r--chrome/test/chrome_plugin/test_chrome_plugin.cc2
-rw-r--r--chrome/test/page_cycler/page_cycler_test.cc4
-rw-r--r--chrome/test/security_tests/ipc_security_tests.cc2
-rw-r--r--chrome/test/sync/engine/mock_server_connection.cc6
-rw-r--r--chrome/tools/crash_service/crash_service.cc2
65 files changed, 100 insertions, 87 deletions
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index c04d3d5..d35f68d 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -1041,4 +1041,4 @@ void BiDiLineIterator::GetLogicalRun(int start,
ubidi_getLogicalRun(bidi_, start, end, level);
}
-}
+} // namespace l10n_util
diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc
index 7b750ca..109fa09 100644
--- a/chrome/browser/automation/automation_provider_win.cc
+++ b/chrome/browser/automation/automation_provider_win.cc
@@ -41,8 +41,8 @@ static void MoveMouse(const POINT& point) {
// when a mouse move event is removed from the event queue.
PostMessage(NULL, WM_MOUSEMOVE, 0, MAKELPARAM(point.x, point.y));
MSG msg;
- while (PeekMessage(&msg, NULL, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE))
- ;
+ while (PeekMessage(&msg, NULL, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_REMOVE)) {
+ }
// Verify
#ifndef NDEBUG
diff --git a/chrome/browser/automation/ui_controls_win.cc b/chrome/browser/automation/ui_controls_win.cc
index 43e8b32..3ff1a5c 100644
--- a/chrome/browser/automation/ui_controls_win.cc
+++ b/chrome/browser/automation/ui_controls_win.cc
@@ -262,7 +262,7 @@ bool SendMouseEventsImpl(MouseButton type, int state, Task* task) {
DWORD up_flags = MOUSEEVENTF_ABSOLUTE;
UINT last_event;
- switch(type) {
+ switch (type) {
case LEFT:
down_flags |= MOUSEEVENTF_LEFTDOWN;
up_flags |= MOUSEEVENTF_LEFTUP;
diff --git a/chrome/browser/chrome_thread_unittest.cc b/chrome/browser/chrome_thread_unittest.cc
index 62f8097..f322e6d 100644
--- a/chrome/browser/chrome_thread_unittest.cc
+++ b/chrome/browser/chrome_thread_unittest.cc
@@ -33,7 +33,7 @@ class ChromeThreadTest : public testing::Test {
class DummyTask : public Task {
public:
- DummyTask(bool* deleted) : deleted_(deleted) { }
+ explicit DummyTask(bool* deleted) : deleted_(deleted) { }
~DummyTask() {
*deleted_ = true;
}
@@ -50,7 +50,8 @@ class ChromeThreadTest : public testing::Test {
: public base::RefCountedThreadSafe<
DeletedOnIO, ChromeThread::DeleteOnIOThread> {
public:
- DeletedOnIO(MessageLoop* message_loop) : message_loop_(message_loop) { }
+ explicit DeletedOnIO(MessageLoop* message_loop)
+ : message_loop_(message_loop) { }
~DeletedOnIO() {
CHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index b5110da..f10f655 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -146,7 +146,7 @@ class DevToolsSanityTest : public InProcessBrowserTest {
class CancelableQuitTask : public Task {
public:
- CancelableQuitTask(const std::string& timeout_message)
+ explicit CancelableQuitTask(const std::string& timeout_message)
: timeout_message_(timeout_message),
cancelled_(false) {
}
diff --git a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
index 3a05ed1..6773756 100644
--- a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
+++ b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
@@ -129,7 +129,7 @@ void NewTabPageSyncHandler::BuildAndSendSyncStatus() {
// logged in to Google Accounts. If the user is not signed in to GA, we
// should hide the sync status section entirely.
if (!sync_service_->HasSyncSetupCompleted()) {
- if(!sync_service_->SetupInProgress() && IsGoogleGAIACookieInstalled()) {
+ if (!sync_service_->SetupInProgress() && IsGoogleGAIACookieInstalled()) {
SendSyncMessageToPage(PROMOTION,
WideToUTF8(l10n_util::GetString(IDS_SYNC_NTP_PROMOTION_MESSAGE)),
WideToUTF8(l10n_util::GetString(IDS_SYNC_NTP_START_NOW_LINK_LABEL)));
diff --git a/chrome/browser/download/download_request_manager.cc b/chrome/browser/download/download_request_manager.cc
index 8cb21c9..4498233 100644
--- a/chrome/browser/download/download_request_manager.cc
+++ b/chrome/browser/download/download_request_manager.cc
@@ -91,7 +91,7 @@ void DownloadRequestManager::TabDownloadState::Observe(
return;
}
- switch(type.value) {
+ switch (type.value) {
case NotificationType::NAV_ENTRY_PENDING: {
// NOTE: resetting state on a pending navigate isn't ideal. In particular
// it is possible that queued up downloads for the page before the
diff --git a/chrome/browser/download/download_request_manager_unittest.cc b/chrome/browser/download/download_request_manager_unittest.cc
index bd52631..f604292 100644
--- a/chrome/browser/download/download_request_manager_unittest.cc
+++ b/chrome/browser/download/download_request_manager_unittest.cc
@@ -58,7 +58,8 @@ class DownloadRequestManagerTest
class DownloadRequestManagerTestDelegate
: public DownloadRequestManager::TestingDelegate {
public:
- DownloadRequestManagerTestDelegate(DownloadRequestManagerTest* test)
+ explicit DownloadRequestManagerTestDelegate(
+ DownloadRequestManagerTest* test)
: test_(test) { }
virtual bool ShouldAllowDownload() {
diff --git a/chrome/browser/extensions/convert_user_script.cc b/chrome/browser/extensions/convert_user_script.cc
index 70de6d9..1f5d027 100644
--- a/chrome/browser/extensions/convert_user_script.cc
+++ b/chrome/browser/extensions/convert_user_script.cc
@@ -24,7 +24,7 @@ namespace keys = extension_manifest_keys;
Extension* ConvertUserScriptToExtension(const FilePath& user_script_path,
const GURL& original_url,
- std::string* error){
+ std::string* error) {
std::string content;
if (!file_util::ReadFileToString(user_script_path, &content)) {
*error = "Could not read source file: " +
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index 7d9f36a..c10ca1e 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -733,7 +733,7 @@ class Firefox3Observer : public ProfileWriter,
password_count_(0), keyword_count_(0), import_search_engines_(true) {
}
- Firefox3Observer(bool import_search_engines)
+ explicit Firefox3Observer(bool import_search_engines)
: ProfileWriter(NULL), bookmark_count_(0), history_count_(0),
password_count_(0), keyword_count_(0),
import_search_engines_(import_search_engines) {
diff --git a/chrome/browser/login_prompt_gtk.cc b/chrome/browser/login_prompt_gtk.cc
index ec67bab..b5045ad 100644
--- a/chrome/browser/login_prompt_gtk.cc
+++ b/chrome/browser/login_prompt_gtk.cc
@@ -34,7 +34,7 @@ class LoginHandlerGtk : public LoginHandler,
public ConstrainedWindowGtkDelegate,
public LoginModelObserver {
public:
- LoginHandlerGtk(URLRequest* request)
+ explicit LoginHandlerGtk(URLRequest* request)
: handled_auth_(false),
dialog_(NULL),
request_(request),
diff --git a/chrome/browser/login_prompt_win.cc b/chrome/browser/login_prompt_win.cc
index 18ed7e4..72d4658 100644
--- a/chrome/browser/login_prompt_win.cc
+++ b/chrome/browser/login_prompt_win.cc
@@ -30,7 +30,7 @@ class LoginHandlerWin : public LoginHandler,
public base::RefCountedThreadSafe<LoginHandlerWin>,
public views::DialogDelegate {
public:
- LoginHandlerWin(URLRequest* request)
+ explicit LoginHandlerWin(URLRequest* request)
: dialog_(NULL),
handled_auth_(false),
request_(request),
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index eb71147..c75243c 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -240,7 +240,7 @@ ChromeURLRequestContext* FactoryForExtensions::Create() {
// Factory that creates the ChromeURLRequestContext for incognito profile.
class FactoryForOffTheRecord : public ChromeURLRequestContextFactory {
public:
- FactoryForOffTheRecord(Profile* profile)
+ explicit FactoryForOffTheRecord(Profile* profile)
: ChromeURLRequestContextFactory(profile),
original_context_getter_(
static_cast<ChromeURLRequestContextGetter*>(
@@ -303,7 +303,7 @@ ChromeURLRequestContext* FactoryForOffTheRecord::Create() {
class FactoryForOffTheRecordExtensions
: public ChromeURLRequestContextFactory {
public:
- FactoryForOffTheRecordExtensions(Profile* profile)
+ explicit FactoryForOffTheRecordExtensions(Profile* profile)
: ChromeURLRequestContextFactory(profile) {}
virtual ChromeURLRequestContext* Create();
diff --git a/chrome/browser/net/url_fetcher_unittest.cc b/chrome/browser/net/url_fetcher_unittest.cc
index d186b40..a9141e9 100644
--- a/chrome/browser/net/url_fetcher_unittest.cc
+++ b/chrome/browser/net/url_fetcher_unittest.cc
@@ -167,7 +167,7 @@ class CancelTestURLRequestContext : public TestURLRequestContext {
class CancelTestURLRequestContextGetter : public URLRequestContextGetter {
public:
- CancelTestURLRequestContextGetter(bool* destructor_called)
+ explicit CancelTestURLRequestContextGetter(bool* destructor_called)
: destructor_called_(destructor_called) {
}
diff --git a/chrome/browser/parsers/metadata_parser_filebase.cc b/chrome/browser/parsers/metadata_parser_filebase.cc
index 7bcbe2c..a5bfc6a 100644
--- a/chrome/browser/parsers/metadata_parser_filebase.cc
+++ b/chrome/browser/parsers/metadata_parser_filebase.cc
@@ -11,7 +11,7 @@
#include "base/string_util.h"
FileMetadataParser::FileMetadataParser(const FilePath& path)
- : MetadataParser(path){
+ : MetadataParser(path) {
path_ = path;
}
@@ -46,7 +46,7 @@ MetadataPropertyIterator* FileMetadataParser::GetPropertyIterator() {
}
FileMetadataPropertyIterator::FileMetadataPropertyIterator(
- PropertyMap& properties): properties_(properties){
+ PropertyMap& properties) : properties_(properties) {
it = properties_.begin();
}
diff --git a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
index e49cbcb..ac74173 100644
--- a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
+++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc
@@ -9,7 +9,8 @@
#include "base/string_util.h"
MetadataParserJpegFactory::MetadataParserJpegFactory()
- : MetadataParserFactory(){}
+ : MetadataParserFactory() {
+}
bool MetadataParserJpegFactory::CanParse(const FilePath& path,
char* bytes,
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index de6dff6..eb26ce8 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -212,7 +212,7 @@ void PasswordFormManager::OnRequestDone(int handle,
// path matches.
if ((observed_form_.scheme == PasswordForm::SCHEME_HTML) &&
(observed_form_.signon_realm == logins_result[i]->origin.spec()) &&
- (current_score > 0) && (!logins_result[i]->blacklisted_by_user)){
+ (current_score > 0) && (!logins_result[i]->blacklisted_by_user)) {
empties.push_back(*logins_result[i]);
}
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index 3102938..3f5ea0b 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -22,7 +22,7 @@ using webkit_glue::PasswordForm;
// search from a set of attributes.
class KeychainSearch {
public:
- KeychainSearch(const MacKeychain& keychain);
+ explicit KeychainSearch(const MacKeychain& keychain);
~KeychainSearch();
// Sets up a keycahin search based on an non "null" (NULL for char*,
diff --git a/chrome/browser/process_info_snapshot_mac.cc b/chrome/browser/process_info_snapshot_mac.cc
index c594e75..7e8117b 100644
--- a/chrome/browser/process_info_snapshot_mac.cc
+++ b/chrome/browser/process_info_snapshot_mac.cc
@@ -34,7 +34,7 @@ bool ProcessInfoSnapshot::Sample(std::vector<base::ProcessId> pid_list) {
argv.push_back("-o");
argv.push_back("pid=,ppid=,ruid=,uid=,rss=,vsz=,comm=");
// Only display the specified PIDs.
- for(std::vector<base::ProcessId>::iterator it = pid_list.begin();
+ for (std::vector<base::ProcessId>::iterator it = pid_list.begin();
it != pid_list.end(); ++it) {
argv.push_back("-p");
argv.push_back(Int64ToString(static_cast<int64>(*it)));
diff --git a/chrome/browser/renderer_host/async_resource_handler.cc b/chrome/browser/renderer_host/async_resource_handler.cc
index 1bf7259..e7fe56c 100644
--- a/chrome/browser/renderer_host/async_resource_handler.cc
+++ b/chrome/browser/renderer_host/async_resource_handler.cc
@@ -28,7 +28,7 @@ const int kMaxReadBufSize = 524288;
// Our version of IOBuffer that uses shared memory.
class SharedIOBuffer : public net::IOBuffer {
public:
- SharedIOBuffer(int buffer_size)
+ explicit SharedIOBuffer(int buffer_size)
: net::IOBuffer(),
ok_(false),
buffer_size_(buffer_size) {
diff --git a/chrome/browser/renderer_host/render_widget_host_unittest.cc b/chrome/browser/renderer_host/render_widget_host_unittest.cc
index 066de84..39fcbb9 100644
--- a/chrome/browser/renderer_host/render_widget_host_unittest.cc
+++ b/chrome/browser/renderer_host/render_widget_host_unittest.cc
@@ -100,7 +100,7 @@ bool RenderWidgetHostProcess::WaitForPaintMsg(int render_widget_id,
// This test view allows us to specify the size.
class TestView : public TestRenderWidgetHostView {
public:
- TestView(RenderWidgetHost* rwh) : TestRenderWidgetHostView(rwh) {}
+ explicit TestView(RenderWidgetHost* rwh) : TestRenderWidgetHostView(rwh) {}
// Sets the bounds returned by GetViewBounds.
void set_bounds(const gfx::Rect& bounds) {
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
index bbf97c3..b8a6d61 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -119,7 +119,7 @@ void ResourceIPCAccumulator::GetClassifiedMessages(ClassifiedMessages* msgs) {
// messages to go to the same place, which is why this forwards.
class ForwardingReceiver : public ResourceDispatcherHost::Receiver {
public:
- ForwardingReceiver(ResourceDispatcherHost::Receiver* dest)
+ explicit ForwardingReceiver(ResourceDispatcherHost::Receiver* dest)
: ResourceDispatcherHost::Receiver(dest->type(), -1),
dest_(dest) {
set_handle(dest->handle());
diff --git a/chrome/browser/safe_browsing/database_perftest.cc b/chrome/browser/safe_browsing/database_perftest.cc
index e134b18..29a1cdb 100644
--- a/chrome/browser/safe_browsing/database_perftest.cc
+++ b/chrome/browser/safe_browsing/database_perftest.cc
@@ -381,7 +381,7 @@ TEST_F(SafeBrowsing, DISABLED_CountIndexedWithID_500K) {
class SafeBrowsingDatabaseTest {
public:
- SafeBrowsingDatabaseTest(const FilePath& filename) {
+ explicit SafeBrowsingDatabaseTest(const FilePath& filename) {
logging::InitLogging(
NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
logging::LOCK_LOG_FILE,
diff --git a/chrome/browser/safe_browsing/protocol_parser_unittest.cc b/chrome/browser/safe_browsing/protocol_parser_unittest.cc
index eac93b7..f20cb29 100644
--- a/chrome/browser/safe_browsing/protocol_parser_unittest.cc
+++ b/chrome/browser/safe_browsing/protocol_parser_unittest.cc
@@ -468,7 +468,7 @@ TEST(SafeBrowsingProtocolParsingTest, TestGetHashWithMac) {
0xf9, 0x44, 0x4f, 0x28, 0xb4, 0xeb, 0x45
};
- const unsigned char hash_result [] = {
+ const unsigned char hash_result[] = {
0x17, 0x7f, 0x03, 0x42, 0x28, 0x1c, 0x31, 0xb9,
0x0b, 0x1c, 0x7b, 0x9d, 0xaf, 0x7b, 0x43, 0x99,
0x10, 0xc1, 0xab, 0xe3, 0x1b, 0x35, 0x80, 0x38,
diff --git a/chrome/browser/search_engines/edit_search_engine_controller.cc b/chrome/browser/search_engines/edit_search_engine_controller.cc
index 7ec3b53..d8cacd1 100644
--- a/chrome/browser/search_engines/edit_search_engine_controller.cc
+++ b/chrome/browser/search_engines/edit_search_engine_controller.cc
@@ -130,7 +130,7 @@ std::wstring EditSearchEngineController::GetFixedUpURL(
url_parse::Parsed parts;
std::string scheme(
URLFixerUpper::SegmentURL(WideToUTF8(expanded_url), &parts));
- if(!parts.scheme.is_valid()) {
+ if (!parts.scheme.is_valid()) {
scheme.append("://");
url.insert(0, UTF8ToWide(scheme));
}
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc
index 1fb7137..7a92cf4 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc
@@ -2721,7 +2721,7 @@ int GeoIDToCountryID(GEOID geo_id) {
static_cast<char>(isobuf[1]));
// Various locations have ISO codes that Windows does not return.
- switch(geo_id) {
+ switch (geo_id) {
case 0x144: // Guernsey
return CountryCharsToCountryID('G', 'G');
case 0x148: // Jersey
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index ef1711a..974a2c5 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -78,7 +78,7 @@ class SSLUITest : public InProcessBrowserTest {
base::Time timeToQuit = base::Time::Now() +
base::TimeDelta::FromMilliseconds(30000);
- while(base::Time::Now() < timeToQuit) {
+ while (base::Time::Now() < timeToQuit) {
bool workerFinished = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->render_view_host(), L"",
diff --git a/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc b/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc
index 0cc1ac6..8277859 100644
--- a/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc
+++ b/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc
@@ -54,8 +54,8 @@ bool BuildAndProcessConflictSetsCommand::ProcessSingleDirectionConflictSets(
bool rv = false;
ConflictResolutionView conflict_view(session);
set<ConflictSet*>::const_iterator all_sets_iterator;
- for(all_sets_iterator = conflict_view.ConflictSetsBegin();
- all_sets_iterator != conflict_view.ConflictSetsEnd() ; ) {
+ for (all_sets_iterator = conflict_view.ConflictSetsBegin();
+ all_sets_iterator != conflict_view.ConflictSetsEnd(); ) {
const ConflictSet* conflict_set = *all_sets_iterator;
CHECK(conflict_set->size() >= 2);
// We scan the set to see if it consists of changes of only one type.
@@ -86,9 +86,9 @@ namespace {
void StoreLocalDataForUpdateRollback(syncable::Entry* entry,
syncable::EntryKernel* backup) {
CHECK(!entry->Get(syncable::IS_UNSYNCED)) << " Storing Rollback data for "
- "entry that's unsynced." << *entry ;
+ "entry that's unsynced." << *entry;
CHECK(entry->Get(syncable::IS_UNAPPLIED_UPDATE)) << " Storing Rollback data "
- "for entry that's not an unapplied update." << *entry ;
+ "for entry that's not an unapplied update." << *entry;
*backup = entry->GetKernelCopy();
}
diff --git a/chrome/browser/sync/engine/conflict_resolver.cc b/chrome/browser/sync/engine/conflict_resolver.cc
index 61eec3c..f67ea52 100644
--- a/chrome/browser/sync/engine/conflict_resolver.cc
+++ b/chrome/browser/sync/engine/conflict_resolver.cc
@@ -389,7 +389,7 @@ ConflictResolver::ConflictSetCountMapKey ConflictResolver::GetSetKey(
// binary_search in ProcessConflictSet.
sort(set->begin(), set->end());
std::stringstream rv;
- for(ConflictSet::iterator i = set->begin() ; i != set->end() ; ++i )
+ for (ConflictSet::iterator i = set->begin() ; i != set->end() ; ++i )
rv << *i << ".";
return rv.str();
}
@@ -399,7 +399,7 @@ namespace {
bool AttemptToFixCircularConflict(WriteTransaction* trans,
ConflictSet* conflict_set) {
ConflictSet::const_iterator i, j;
- for(i = conflict_set->begin() ; i != conflict_set->end() ; ++i) {
+ for (i = conflict_set->begin() ; i != conflict_set->end() ; ++i) {
MutableEntry entryi(trans, syncable::GET_BY_ID, *i);
if (entryi.Get(syncable::PARENT_ID) ==
entryi.Get(syncable::SERVER_PARENT_ID) ||
@@ -655,7 +655,7 @@ bool ConflictResolver::ResolveSimpleConflicts(const ScopedDirLookup& dir,
// First iterate over simple conflict items (those that belong to no set).
set<Id>::const_iterator conflicting_item_it;
for (conflicting_item_it = view->CommitConflictsBegin();
- conflicting_item_it != view->CommitConflictsEnd() ;
+ conflicting_item_it != view->CommitConflictsEnd();
++conflicting_item_it) {
Id id = *conflicting_item_it;
map<Id, ConflictSet*>::const_iterator item_set_it =
@@ -663,7 +663,7 @@ bool ConflictResolver::ResolveSimpleConflicts(const ScopedDirLookup& dir,
if (item_set_it == view->IdToConflictSetEnd() ||
0 == item_set_it->second) {
// We have a simple conflict.
- switch(ProcessSimpleConflict(&trans, id, session)) {
+ switch (ProcessSimpleConflict(&trans, id, session)) {
case NO_SYNC_PROGRESS:
{
int conflict_count = (simple_conflict_count_map_[id] += 2);
diff --git a/chrome/browser/sync/notifier/communicator/login.cc b/chrome/browser/sync/notifier/communicator/login.cc
index 90a0e70..de7fd3a 100644
--- a/chrome/browser/sync/notifier/communicator/login.cc
+++ b/chrome/browser/sync/notifier/communicator/login.cc
@@ -124,7 +124,7 @@ void Login::StartConnection() {
single_attempt_->SignalRedirect.connect(this, &Login::OnRedirect);
single_attempt_->SignalClientStateChange.connect(
this,
- &Login::OnClientStateChange) ;
+ &Login::OnClientStateChange);
single_attempt_->SignalUnexpectedDisconnect.connect(
this,
&Login::OnUnexpectedDisconnect);
diff --git a/chrome/browser/sync/notifier/communicator/mailbox.cc b/chrome/browser/sync/notifier/communicator/mailbox.cc
index df8d7cf..5cabf04 100644
--- a/chrome/browser/sync/notifier/communicator/mailbox.cc
+++ b/chrome/browser/sync/notifier/communicator/mailbox.cc
@@ -31,7 +31,7 @@ static void ParseLabelSet(const std::string& text,
char* result = new char[text.size() + 1];
char* next_write = result;
- while(input_cur < input_end) {
+ while (input_cur < input_end) {
if (*input_cur == '|') {
if (next_write != result) {
*next_write = '\0';
diff --git a/chrome/browser/sync/sync_setup_wizard_unittest.cc b/chrome/browser/sync/sync_setup_wizard_unittest.cc
index 2cc16bf..bf5ee91 100644
--- a/chrome/browser/sync/sync_setup_wizard_unittest.cc
+++ b/chrome/browser/sync/sync_setup_wizard_unittest.cc
@@ -1,3 +1,4 @@
+// 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.
diff --git a/chrome/browser/views/about_ipc_dialog.cc b/chrome/browser/views/about_ipc_dialog.cc
index 4ad5695..d7ece5d 100644
--- a/chrome/browser/views/about_ipc_dialog.cc
+++ b/chrome/browser/views/about_ipc_dialog.cc
@@ -200,7 +200,7 @@ void CloseDialog() {
}
void OnButtonClick(int id) {
- switch(id) {
+ switch (id) {
case IDC_ViewAll:
CheckButtons(settings_views.view, true);
break;
diff --git a/chrome/browser/views/about_network_dialog.cc b/chrome/browser/views/about_network_dialog.cc
index afea0ec..65adf01 100644
--- a/chrome/browser/views/about_network_dialog.cc
+++ b/chrome/browser/views/about_network_dialog.cc
@@ -50,7 +50,7 @@ std::wstring URLForJob(URLRequestJob* job) {
class JobTracker : public URLRequestJobTracker::JobObserver,
public base::RefCountedThreadSafe<JobTracker> {
public:
- JobTracker(AboutNetworkDialog* view);
+ explicit JobTracker(AboutNetworkDialog* view);
// Called by the NetworkStatusView on the main application thread.
void StartTracking();
diff --git a/chrome/browser/views/bookmark_table_view.cc b/chrome/browser/views/bookmark_table_view.cc
index 1ea3aa6..1bf4245 100644
--- a/chrome/browser/views/bookmark_table_view.cc
+++ b/chrome/browser/views/bookmark_table_view.cc
@@ -165,7 +165,7 @@ void BookmarkTableView::PostPaint() {
}
LRESULT BookmarkTableView::OnNotify(int w_param, LPNMHDR l_param) {
- switch(l_param->code) {
+ switch (l_param->code) {
case LVN_BEGINDRAG:
BeginDrag();
return 0; // Return value doesn't matter for this message.
diff --git a/chrome/browser/views/browser_bubble_win.cc b/chrome/browser/views/browser_bubble_win.cc
index 4c085ee..f1a27b7 100644
--- a/chrome/browser/views/browser_bubble_win.cc
+++ b/chrome/browser/views/browser_bubble_win.cc
@@ -13,7 +13,8 @@
class BubbleWidget : public views::WidgetWin
{
public:
- BubbleWidget(BrowserBubble* bubble) : bubble_(bubble), closed_(false) {
+ explicit BubbleWidget(BrowserBubble* bubble)
+ : bubble_(bubble), closed_(false) {
}
void Show(bool activate) {
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 904a954..0f220b8 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -72,7 +72,7 @@ static const int kDisabledOnOpenDuration = 3000;
class DownloadShelfContextMenuWin : public DownloadShelfContextMenu,
public views::Menu::Delegate {
public:
- DownloadShelfContextMenuWin(BaseDownloadItemModel* model)
+ explicit DownloadShelfContextMenuWin(BaseDownloadItemModel* model)
: DownloadShelfContextMenu(model) {
DCHECK(model);
}
diff --git a/chrome/browser/views/download_started_animation_win.cc b/chrome/browser/views/download_started_animation_win.cc
index ec71683..84065e0 100644
--- a/chrome/browser/views/download_started_animation_win.cc
+++ b/chrome/browser/views/download_started_animation_win.cc
@@ -36,7 +36,7 @@ class DownloadStartedAnimationWin : public Animation,
public NotificationObserver,
public views::ImageView {
public:
- DownloadStartedAnimationWin(TabContents* tab_contents);
+ explicit DownloadStartedAnimationWin(TabContents* tab_contents);
private:
// Move the animation to wherever it should currently be.
diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc
index 07e2de9..1cba466 100644
--- a/chrome/browser/views/infobars/infobars.cc
+++ b/chrome/browser/views/infobars/infobars.cc
@@ -64,7 +64,7 @@ int OffsetY(views::View* parent, const gfx::Size prefsize) {
class InfoBarBackground : public views::Background {
public:
- InfoBarBackground(InfoBarDelegate::Type infobar_type) {
+ explicit InfoBarBackground(InfoBarDelegate::Type infobar_type) {
SkColor top_color;
SkColor bottom_color;
switch (infobar_type) {
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index bcb6c74..5c19e48 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -358,7 +358,7 @@ void SelectFileDialogImpl::ExecuteSelectFile(
success = win_util::SaveFileAsWithFilter(params.run_state.owner,
params.default_path.ToWStringHack(), filter,
params.default_extension, false, &filter_index, &path_as_wstring);
- if(success) {
+ if (success) {
path = FilePath::FromWStringHack(path_as_wstring);
}
DisableOwner(params.run_state.owner);
@@ -464,8 +464,7 @@ bool SelectFileDialogImpl::RunSelectFolderDialog(const std::wstring& title,
*path = FilePath(out_dir_buffer.pOleStr);
CoTaskMemFree(out_dir_buffer.pOleStr);
result = true;
- }
- else {
+ } else {
// Use old way if we don't get what we want.
wchar_t old_out_dir_buffer[MAX_PATH + 1];
if (SHGetPathFromIDList(list, old_out_dir_buffer)) {
diff --git a/chrome/common/extensions/extension_action_unittest.cc b/chrome/common/extensions/extension_action_unittest.cc
index d700c33..f3a9c90 100644
--- a/chrome/common/extensions/extension_action_unittest.cc
+++ b/chrome/common/extensions/extension_action_unittest.cc
@@ -1,3 +1,7 @@
+// 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 "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 6af2128..c8580be 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -206,7 +206,7 @@ size_t GetFatalAssertions(AssertionList* assertions) {
std::string utf8_line;
std::wstring wide_line;
- while(!log_file.eof()) {
+ while (!log_file.eof()) {
getline(log_file, utf8_line);
if (utf8_line.find(":FATAL:") != std::string::npos) {
wide_line = UTF8ToWide(utf8_line);
diff --git a/chrome/common/mru_cache_unittest.cc b/chrome/common/mru_cache_unittest.cc
index bacb8a5..7cfb7d8 100644
--- a/chrome/common/mru_cache_unittest.cc
+++ b/chrome/common/mru_cache_unittest.cc
@@ -15,11 +15,11 @@ struct CachedItem {
cached_item_live_count++;
}
- CachedItem(int new_value) : value(new_value) {
+ explicit CachedItem(int new_value) : value(new_value) {
cached_item_live_count++;
}
- CachedItem(const CachedItem& other) : value(other.value) {
+ explicit CachedItem(const CachedItem& other) : value(other.value) {
cached_item_live_count++;
}
diff --git a/chrome/common/pref_member_unittest.cc b/chrome/common/pref_member_unittest.cc
index bf9cc39..732708e 100644
--- a/chrome/common/pref_member_unittest.cc
+++ b/chrome/common/pref_member_unittest.cc
@@ -24,7 +24,8 @@ void RegisterTestPrefs(PrefService* prefs) {
class PrefMemberTestClass : public NotificationObserver {
public:
- PrefMemberTestClass(PrefService* prefs) : observe_cnt_(0), prefs_(prefs) {
+ explicit PrefMemberTestClass(PrefService* prefs)
+ : observe_cnt_(0), prefs_(prefs) {
str_.Init(kStringPref, prefs, this);
}
diff --git a/chrome/common/worker_thread_ticker.cc b/chrome/common/worker_thread_ticker.cc
index 6d0619f..22b4aa2 100644
--- a/chrome/common/worker_thread_ticker.cc
+++ b/chrome/common/worker_thread_ticker.cc
@@ -12,7 +12,7 @@
class WorkerThreadTicker::TimerTask : public Task {
public:
- TimerTask(WorkerThreadTicker* ticker) : ticker_(ticker) {
+ explicit TimerTask(WorkerThreadTicker* ticker) : ticker_(ticker) {
}
virtual void Run() {
diff --git a/chrome/installer/gcapi/gcapi.cc b/chrome/installer/gcapi/gcapi.cc
index 3f9804e..2f110fc 100644
--- a/chrome/installer/gcapi/gcapi.cc
+++ b/chrome/installer/gcapi/gcapi.cc
@@ -433,7 +433,7 @@ DLLEXPORT BOOL __stdcall LaunchGoogleChromeWithDimensions(int x,
}
}
- if(!handle)
+ if (!handle)
return false;
// At this point, there are several top-level Chrome windows
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 0ac0f2f..0b9c326 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -531,4 +531,4 @@ installer_util::InstallStatus installer_setup::UninstallChrome(
file_util::Delete(local_state_path, false);
return ret;
-} \ No newline at end of file
+}
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index da796aa..25ed75f 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -116,4 +116,4 @@ void BrowserDistribution::LaunchUserExperiment(
void BrowserDistribution::InactiveUserToastExperiment(int flavor) {
-} \ No newline at end of file
+}
diff --git a/chrome/installer/util/create_dir_work_item.cc b/chrome/installer/util/create_dir_work_item.cc
index cdc7d3e..3cfd1fb 100644
--- a/chrome/installer/util/create_dir_work_item.cc
+++ b/chrome/installer/util/create_dir_work_item.cc
@@ -55,7 +55,7 @@ void CreateDirWorkItem::Rollback() {
// along the way.
FilePath path_to_delete(path_);
- while(1) {
+ while (1) {
if (file_util::PathExists(path_to_delete)) {
if (!RemoveDirectory(path_to_delete.value().c_str()))
break;
diff --git a/chrome/installer/util/create_reg_key_work_item.cc b/chrome/installer/util/create_reg_key_work_item.cc
index a2a526b..221fe7b 100644
--- a/chrome/installer/util/create_reg_key_work_item.cc
+++ b/chrome/installer/util/create_reg_key_work_item.cc
@@ -21,7 +21,7 @@ CreateRegKeyWorkItem::CreateRegKeyWorkItem(HKEY predefined_root,
}
bool CreateRegKeyWorkItem::Do() {
- if(!InitKeyList()) {
+ if (!InitKeyList()) {
// Nothing needs to be done here.
LOG(INFO) << "no key to create";
return true;
@@ -35,8 +35,8 @@ bool CreateRegKeyWorkItem::Do() {
DWORD disposition;
key_path.assign(key_list_[i - 1]);
- if(key.CreateWithDisposition(predefined_root_, key_path.c_str(),
- &disposition)) {
+ if (key.CreateWithDisposition(predefined_root_, key_path.c_str(),
+ &disposition)) {
if (disposition == REG_OPENED_EXISTING_KEY) {
if (key_created_) {
// This should not happen. Someone created a subkey under the key
@@ -47,7 +47,7 @@ bool CreateRegKeyWorkItem::Do() {
LOG(INFO) << key_path << " exists";
// Remove the key path from list if it is already present.
key_list_.pop_back();
- } else if (disposition == REG_CREATED_NEW_KEY){
+ } else if (disposition == REG_CREATED_NEW_KEY) {
LOG(INFO) << "created " << key_path;
key_created_ = true;
} else {
@@ -99,7 +99,7 @@ bool CreateRegKeyWorkItem::InitKeyList() {
// This is pure string operation so it does not matter whether the
// path is file path or registry path.
file_util::UpOneDirectoryOrEmpty(&key_path);
- } while(!key_path.empty());
+ } while (!key_path.empty());
return true;
}
diff --git a/chrome/installer/util/html_dialog_impl.cc b/chrome/installer/util/html_dialog_impl.cc
index f896d0e..96cbc78 100644
--- a/chrome/installer/util/html_dialog_impl.cc
+++ b/chrome/installer/util/html_dialog_impl.cc
@@ -47,7 +47,7 @@ namespace installer {
class HTMLDialogWin : public HTMLDialog {
public:
- HTMLDialogWin(const std::wstring& url) : url_(url) {
+ explicit HTMLDialogWin(const std::wstring& url) : url_(url) {
if (!mshtml_)
mshtml_ = LoadLibrary(L"MSHTML.DLL");
}
diff --git a/chrome/installer/util/lzma_util.cc b/chrome/installer/util/lzma_util.cc
index 5208e12..de5f824 100644
--- a/chrome/installer/util/lzma_util.cc
+++ b/chrome/installer/util/lzma_util.cc
@@ -48,7 +48,7 @@ SZ_RESULT SzFileSeekImp(void *object, CFileSize pos) {
value.LowPart = SetFilePointer(s->File, value.LowPart, &value.HighPart,
FILE_BEGIN);
if (value.LowPart == 0xFFFFFFFF) {
- if(GetLastError() != NO_ERROR) {
+ if (GetLastError() != NO_ERROR) {
return SZE_FAIL;
}
}
diff --git a/chrome/installer/util/lzma_util_unittest.cc b/chrome/installer/util/lzma_util_unittest.cc
index 214b5c8..c0a629a 100644
--- a/chrome/installer/util/lzma_util_unittest.cc
+++ b/chrome/installer/util/lzma_util_unittest.cc
@@ -129,4 +129,4 @@ TEST_F(LzmaUtilTest, UnPackArchiveTest) {
archive = data_dir_.AppendASCII("invalid_archive.7z");
EXPECT_NE(LzmaUtil::UnPackArchive(archive.value(), extract_dir.value(),
&unpacked_file), NO_ERROR);
-} \ No newline at end of file
+}
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index d4f5930..f8022f0 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -526,7 +526,7 @@ bool ShellUtil::GetDesktopPath(bool system_level, std::wstring* path) {
}
bool ShellUtil::GetQuickLaunchPath(bool system_level, std::wstring* path) {
- const static wchar_t* kQuickLaunchPath =
+ static const wchar_t* kQuickLaunchPath =
L"Microsoft\\Internet Explorer\\Quick Launch";
wchar_t qlaunch[MAX_PATH];
if (system_level) {
diff --git a/chrome/renderer/automation/dom_automation_controller.cc b/chrome/renderer/automation/dom_automation_controller.cc
index a1cef66..3b7ac43 100644
--- a/chrome/renderer/automation/dom_automation_controller.cc
+++ b/chrome/renderer/automation/dom_automation_controller.cc
@@ -44,7 +44,7 @@ void DomAutomationController::Send(const CppArgumentList& args,
// writer is lenient, and (b) on the receiving side we wrap the JSON string
// in square brackets, converting it to an array, then parsing it and
// grabbing the 0th element to get the value out.
- switch(args[0].type) {
+ switch (args[0].type) {
case NPVariantType_String: {
value.reset(Value::CreateStringValue(args[0].ToString()));
break;
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 323d0f0..a388929 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -201,7 +201,7 @@ void RenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
void RenderThread::WidgetHidden() {
DCHECK(hidden_widget_count_ < widget_count_);
- hidden_widget_count_++ ;
+ hidden_widget_count_++;
if (widget_count_ && hidden_widget_count_ == widget_count_) {
// Reset the delay.
idle_notification_delay_in_s_ = kInitialIdleHandlerDelayS;
@@ -631,15 +631,15 @@ void RenderThread::OnPurgeMemory() {
// Release all freeable memory from the SQLite process-global page cache (a
// low-level object which backs the Connection-specific page caches).
- while (sqlite3_release_memory(std::numeric_limits<int>::max()) > 0)
- ;
+ while (sqlite3_release_memory(std::numeric_limits<int>::max()) > 0) {
+ }
// Repeatedly call the V8 idle notification until it returns true ("nothing
// more to free"). Note that it makes more sense to do this than to implement
// a new "delete everything" pass because object references make it difficult
// to free everything possible in just one pass.
- while (!v8::V8::IdleNotification())
- ;
+ while (!v8::V8::IdleNotification()) {
+ }
#if defined(OS_WIN)
// Tell tcmalloc to release any free pages it's still holding.
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index d922467..c22820a 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -172,7 +172,7 @@ HCURSOR LoadCursor(int cursor_id) {
// Clipboard glue
-Clipboard* ClipboardGetClipboard(){
+Clipboard* ClipboardGetClipboard() {
return NULL;
}
diff --git a/chrome/renderer/visitedlink_slave.cc b/chrome/renderer/visitedlink_slave.cc
index 00919c6..a2e9434 100644
--- a/chrome/renderer/visitedlink_slave.cc
+++ b/chrome/renderer/visitedlink_slave.cc
@@ -53,7 +53,7 @@ bool VisitedLinkSlave::Init(base::SharedMemoryHandle shared_memory) {
}
void VisitedLinkSlave::FreeTable() {
- if (shared_memory_ ) {
+ if (shared_memory_) {
delete shared_memory_;
shared_memory_ = NULL;
}
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index aa945c7..db7a42a 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -278,7 +278,7 @@ bool WebPluginDelegateProxy::Initialize(const GURL& url,
// Flash to use windowless mode so that it use CoreGraphics instead of opening
// OpenGL contexts overlaying the browser window (which will fail or crash
// because Mac OS X does not allow that across processes).
- if (!transparent_ && mime_type_ == "application/x-shockwave-flash" ) {
+ if (!transparent_ && mime_type_ == "application/x-shockwave-flash") {
params.arg_names.push_back("wmode");
params.arg_values.push_back("opaque");
}
@@ -452,7 +452,8 @@ void WebPluginDelegateProxy::UpdateGeometry(const gfx::Rect& window_rect,
// scripts the plugin to start playing while it's in the middle of handling
// an update geometry message, videos don't play. See urls in bug 20260.
msg = new PluginMsg_UpdateGeometrySync(instance_id_, param);
- } else
+ }
+ else
#endif
{
msg = new PluginMsg_UpdateGeometry(instance_id_, param);
diff --git a/chrome/renderer/websharedworker_proxy.cc b/chrome/renderer/websharedworker_proxy.cc
index fcaa83b..5bcde88 100644
--- a/chrome/renderer/websharedworker_proxy.cc
+++ b/chrome/renderer/websharedworker_proxy.cc
@@ -50,10 +50,11 @@ void WebSharedWorkerProxy::connect(WebKit::WebMessagePortChannel* channel,
Send(new WorkerMsg_Connect(route_id_, message_port_id, MSG_ROUTING_NONE));
if (HasQueuedMessages()) {
m_connectListener = listener;
- } else
+ } else {
listener->connected();
// The listener may free this object, so do not access the object after
// this point.
+ }
}
void WebSharedWorkerProxy::OnMessageReceived(const IPC::Message& message) {
diff --git a/chrome/test/chrome_plugin/test_chrome_plugin.cc b/chrome/test/chrome_plugin/test_chrome_plugin.cc
index 468ee0c..50672d0 100644
--- a/chrome/test/chrome_plugin/test_chrome_plugin.cc
+++ b/chrome/test/chrome_plugin/test_chrome_plugin.cc
@@ -228,7 +228,7 @@ int STDCALL CPR_Read(CPRequest* request, void* buf, uint32 buf_size) {
class RequestResponse {
public:
- RequestResponse(const std::string& raw_headers)
+ explicit RequestResponse(const std::string& raw_headers)
: raw_headers_(raw_headers), offset_(0) {}
void StartReading(CPRequest* request);
void ReadCompleted(CPRequest* request, int bytes_read);
diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc
index d950f14..bd6eb77 100644
--- a/chrome/test/page_cycler/page_cycler_test.cc
+++ b/chrome/test/page_cycler/page_cycler_test.cc
@@ -140,8 +140,8 @@ void PopulateUBC(const FilePath &test_dir) {
int fd = open(path.value().c_str(), O_RDONLY);
if (fd >= 0) {
++loaded;
- while (HANDLE_EINTR(read(fd, buf, sizeof(buf))) > 0)
- ;
+ while (HANDLE_EINTR(read(fd, buf, sizeof(buf))) > 0) {
+ }
HANDLE_EINTR(close(fd));
}
}
diff --git a/chrome/test/security_tests/ipc_security_tests.cc b/chrome/test/security_tests/ipc_security_tests.cc
index 038d662..3b026b3 100644
--- a/chrome/test/security_tests/ipc_security_tests.cc
+++ b/chrome/test/security_tests/ipc_security_tests.cc
@@ -102,7 +102,7 @@ HANDLE MakeServerPluginPipe(const std::wstring& prefix, int channel) {
struct Context {
HANDLE pipe;
- Context(HANDLE arg_pipe) : pipe(arg_pipe) {
+ explicit Context(HANDLE arg_pipe) : pipe(arg_pipe) {
}
};
diff --git a/chrome/test/sync/engine/mock_server_connection.cc b/chrome/test/sync/engine/mock_server_connection.cc
index c9e3be5..02d38c9 100644
--- a/chrome/test/sync/engine/mock_server_connection.cc
+++ b/chrome/test/sync/engine/mock_server_connection.cc
@@ -270,8 +270,10 @@ void MockConnectionManager::ProcessGetUpdates(ClientToServerMessage* csm,
ResetUpdates();
}
-void MockConnectionManager::ProcessAuthenticate(ClientToServerMessage* csm,
- ClientToServerResponse* response, const std::string& auth_token){
+void MockConnectionManager::ProcessAuthenticate(
+ ClientToServerMessage* csm,
+ ClientToServerResponse* response,
+ const std::string& auth_token) {
ASSERT_EQ(csm->message_contents(), ClientToServerMessage::AUTHENTICATE);
EXPECT_FALSE(auth_token.empty());
diff --git a/chrome/tools/crash_service/crash_service.cc b/chrome/tools/crash_service/crash_service.cc
index ddc7598..4c6344a3 100644
--- a/chrome/tools/crash_service/crash_service.cc
+++ b/chrome/tools/crash_service/crash_service.cc
@@ -398,7 +398,7 @@ unsigned long CrashService::AsyncSendDump(void* context) {
LOG(INFO) << "dump for pid =" << info->pid << " crash2 id =" << report_id;
--retry_round;
- } while(retry_round >= 0);
+ } while (retry_round >= 0);
if (!::DeleteFileW(info->dump_path.c_str()))
LOG(WARNING) << "could not delete " << info->dump_path;