summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-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
39 files changed, 54 insertions, 50 deletions
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)) {