summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chrome_dll_main.cc4
-rw-r--r--chrome/browser/automation/ui_controls_win.cc8
-rw-r--r--chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc4
-rw-r--r--chrome/browser/extensions/extension_uitest.cc6
-rw-r--r--chrome/browser/importer/importer_unittest.cc4
-rw-r--r--chrome/browser/sync/syncable/syncable.cc11
-rw-r--r--chrome/browser/views/select_profile_dialog.cc18
-rw-r--r--chrome/installer/util/l10n_string_util.cc4
8 files changed, 30 insertions, 29 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index ca682a5..edfadd9 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -524,7 +524,7 @@ int ChromeMain(int argc, char** argv) {
browser_pid =
static_cast<base::ProcessId>(StringToInt(WideToASCII(channel_name)));
- DCHECK_NE(browser_pid, 0u);
+ DCHECK_NE(browser_pid, 0);
#else
browser_pid = base::GetCurrentProcId();
#endif
diff --git a/chrome/browser/automation/ui_controls_win.cc b/chrome/browser/automation/ui_controls_win.cc
index 85aafec..4e9f673 100644
--- a/chrome/browser/automation/ui_controls_win.cc
+++ b/chrome/browser/automation/ui_controls_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -183,7 +183,7 @@ bool SendKeyPressImpl(base::KeyboardCode key,
INPUT input[8] = { 0 }; // 8, assuming all the modifiers are activated
- UINT i = 0;
+ int i = 0;
if (control) {
if (!FillKeyboardInput(base::VKEY_CONTROL, &input[i], false))
return false;
@@ -228,7 +228,9 @@ bool SendKeyPressImpl(base::KeyboardCode key,
i++;
}
- if (::SendInput(i, input, sizeof(INPUT) != i))
+ unsigned int rv = ::SendInput(i, input, sizeof(INPUT));
+
+ if (rv != i)
return false;
if (dispatcher.get())
diff --git a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc
index be08b4c6..79755e9 100644
--- a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc
+++ b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -79,7 +79,7 @@ void DevToolsRemoteListenSocketTester::SetUp() {
// verify the connect/accept and setup test_socket_
test_socket_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- ASSERT_NE(INVALID_SOCKET, test_socket_);
+ ASSERT_NE(-1, test_socket_);
struct sockaddr_in client;
client.sin_family = AF_INET;
client.sin_addr.s_addr = inet_addr(kLoopback);
diff --git a/chrome/browser/extensions/extension_uitest.cc b/chrome/browser/extensions/extension_uitest.cc
index 9adb732..6457728 100644
--- a/chrome/browser/extensions/extension_uitest.cc
+++ b/chrome/browser/extensions/extension_uitest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -163,7 +163,7 @@ TEST_F(ExtensionTestSimpleApiCall, FLAKY_RunTest) {
int callback_id = 0xBAADF00D;
message_dict->GetInteger(keys::kAutomationRequestIdKey, &callback_id);
- EXPECT_NE(callback_id, static_cast<int>(0xBAADF00D));
+ EXPECT_NE(callback_id, 0xBAADF00D);
bool has_callback = true;
EXPECT_TRUE(message_dict->GetBoolean(keys::kAutomationHasCallbackKey,
@@ -246,7 +246,7 @@ public:
std::string args;
EXPECT_TRUE(request_dict->GetString(keys::kAutomationArgsKey, &args));
- EXPECT_NE(std::string::npos, args.find("42"));
+ EXPECT_NE(args.find("42"), -1);
loop_.Quit();
} else {
FAIL();
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index 3da8361..eac9bed 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -122,7 +122,7 @@ const int kMaxPathSize = 5;
typedef struct {
const bool in_toolbar;
- const size_t path_size;
+ const int path_size;
const wchar_t* path[kMaxPathSize];
const wchar_t* title;
const char* url;
@@ -184,7 +184,7 @@ bool FindBookmarkEntry(const ProfileWriter::BookmarkEntry& entry,
list[i].url == entry.url.spec() &&
list[i].title == entry.title) {
bool equal = true;
- for (size_t k = 0; k < list[i].path_size; ++k)
+ for (int k = 0; k < list[i].path_size; ++k)
if (list[i].path[k] != entry.path[k]) {
equal = false;
break;
diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc
index ae0307c..01c2fc7 100644
--- a/chrome/browser/sync/syncable/syncable.cc
+++ b/chrome/browser/sync/syncable/syncable.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -586,13 +586,12 @@ void Directory::VacuumAfterSaveChanges(const SaveChangesSnapshot& snapshot) {
size_t num_erased = 0;
kernel_->flushed_metahandles.Push(entry->ref(META_HANDLE));
num_erased = kernel_->ids_index->erase(entry);
- DCHECK_EQ(1u, num_erased);
+ DCHECK(1 == num_erased);
num_erased = kernel_->metahandles_index->erase(entry);
- DCHECK_EQ(1u, num_erased);
+ DCHECK(1 == num_erased);
- // Might not be in it
- num_erased = kernel_->client_tag_index->erase(entry);
- DCHECK_EQ(entry->ref(UNIQUE_CLIENT_TAG).empty(), !num_erased);
+ num_erased = kernel_->client_tag_index->erase(entry); // Might not be in it
+ DCHECK(!entry->ref(UNIQUE_CLIENT_TAG).empty() == num_erased);
delete entry;
}
}
diff --git a/chrome/browser/views/select_profile_dialog.cc b/chrome/browser/views/select_profile_dialog.cc
index c92c2f8..d4af82e 100644
--- a/chrome/browser/views/select_profile_dialog.cc
+++ b/chrome/browser/views/select_profile_dialog.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -83,8 +83,8 @@ std::wstring SelectProfileDialog::GetWindowTitle() const {
}
bool SelectProfileDialog::Accept() {
- size_t index = profile_combobox_->selected_item();
- if (index > profiles_.size()) {
+ int index = profile_combobox_->selected_item();
+ if (index < 0) {
NOTREACHED();
return true;
}
@@ -93,10 +93,11 @@ bool SelectProfileDialog::Accept() {
// new profile dialog to the user.
if (index == profiles_.size()) {
NewProfileDialog::RunDialog();
- } else {
- std::wstring profile_name = profiles_[index];
- UserDataManager::Get()->LaunchChromeForProfile(profile_name);
+ return true;
}
+
+ std::wstring profile_name = profiles_[index];
+ UserDataManager::Get()->LaunchChromeForProfile(profile_name);
return true;
}
@@ -115,11 +116,10 @@ int SelectProfileDialog::GetItemCount() {
}
std::wstring SelectProfileDialog::GetItemAt(int index) {
- size_t index_size_t = index;
- DCHECK_LE(index_size_t, profiles_.size());
+ DCHECK(index >= 0 && index <= static_cast<int>(profiles_.size()));
// For the last item in the drop down, return the <New Profile> text,
// otherwise return the corresponding profile name from the vector.
- return index_size_t == profiles_.size() ?
+ return index == profiles_.size() ?
l10n_util::GetString(IDS_SELECT_PROFILE_DIALOG_NEW_PROFILE_ENTRY) :
profiles_[index];
}
diff --git a/chrome/installer/util/l10n_string_util.cc b/chrome/installer/util/l10n_string_util.cc
index 2f571de..6e9b726 100644
--- a/chrome/installer/util/l10n_string_util.cc
+++ b/chrome/installer/util/l10n_string_util.cc
@@ -42,7 +42,7 @@ std::wstring GetSystemLanguage(const bool use_omaha_language) {
}
length = GetLocaleInfo(id, LOCALE_SISO639LANGNAME,
WriteInto(&language, length), length);
- DCHECK(length == static_cast<int>(language.length() + 1));
+ DCHECK(length == language.length() + 1);
StringToLowerASCII(&language);
// Add the country if we need it.
@@ -51,7 +51,7 @@ std::wstring GetSystemLanguage(const bool use_omaha_language) {
if (0 != length) {
length = GetLocaleInfo(id, LOCALE_SISO3166CTRYNAME,
WriteInto(&country, length), length);
- DCHECK(length == static_cast<int>(country.length() + 1));
+ DCHECK(length == country.length() + 1);
StringToLowerASCII(&country);
if (L"en" == language) {
if (L"gb" == country) {