summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-17 12:30:34 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-17 12:30:34 +0000
commit4f4863750ceccaa845e03eaf9768451c0db7e805 (patch)
treea4ca9e2271a4479c8b260ad2c6c065a522acbc07 /chrome
parent60a0af936fe4d0254a721de500e50b5ffa798b4d (diff)
downloadchromium_src-4f4863750ceccaa845e03eaf9768451c0db7e805.zip
chromium_src-4f4863750ceccaa845e03eaf9768451c0db7e805.tar.gz
chromium_src-4f4863750ceccaa845e03eaf9768451c0db7e805.tar.bz2
[Mac] more -Wextra support:
- autofill: explicitly initialize in the copy constructor - make some loops clearly use {} for empty bodies - bump up app mode version number to 1.0 so we don't check for < 0 on the unsigned version number. BUG=34160 TEST=none Review URL: http://codereview.chromium.org/2856006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autofill/fax_field.cc5
-rw-r--r--chrome/browser/autofill/phone_field.cc3
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc34
-rw-r--r--chrome/common/app_mode_common_mac.h20
4 files changed, 33 insertions, 29 deletions
diff --git a/chrome/browser/autofill/fax_field.cc b/chrome/browser/autofill/fax_field.cc
index e7b475e..de86e30 100644
--- a/chrome/browser/autofill/fax_field.cc
+++ b/chrome/browser/autofill/fax_field.cc
@@ -24,4 +24,7 @@ bool FaxField::GetFieldInfo(FieldTypeMap* field_type_map) const {
FaxField::FaxField() : number_(NULL) {}
-FaxField::FaxField(const FaxField& fax_field) : number_(fax_field.number_) {}
+FaxField::FaxField(const FaxField& fax_field)
+ : FormField(),
+ number_(fax_field.number_) {
+}
diff --git a/chrome/browser/autofill/phone_field.cc b/chrome/browser/autofill/phone_field.cc
index 5b4494d..f67d6e2 100644
--- a/chrome/browser/autofill/phone_field.cc
+++ b/chrome/browser/autofill/phone_field.cc
@@ -132,7 +132,8 @@ PhoneField::PhoneField()
}
PhoneField::PhoneField(const PhoneField& phone_field)
- : phone_(phone_field.phone_),
+ : FormField(),
+ phone_(phone_field.phone_),
area_code_(phone_field.area_code_),
prefix_(phone_field.prefix_),
extension_(phone_field.extension_) {
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
index 2af376e..c6a07c1 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -348,7 +348,7 @@ TEST_F(ResourceDispatcherHostTest, TestMany) {
MakeTestRequest(0, 3, URLRequestTestJob::test_url_3());
// flush all the pending requests
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(0));
@@ -375,7 +375,7 @@ TEST_F(ResourceDispatcherHostTest, Cancel) {
MakeCancelRequest(2);
// flush all the pending requests
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
MessageLoop::current()->RunAllPending();
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(0));
@@ -463,7 +463,7 @@ TEST_F(ResourceDispatcherHostTest, TestProcessCancel) {
test_receiver.has_canceled_ = true;
// Flush all the pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.pending_requests());
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(
@@ -496,7 +496,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockingResumingRequests) {
MakeTestRequest(3, 6, URLRequestTestJob::test_url_3());
// Flush all the pending requests
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
// Sort out all the messages we saw by request
ResourceIPCAccumulator::ClassifiedMessages msgs;
@@ -511,7 +511,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockingResumingRequests) {
// Resume requests for RVH 1 and flush pending requests.
host_.ResumeBlockedRequestsForRoute(id(), 1);
KickOffRequest();
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
msgs.clear();
accum_.GetClassifiedMessages(&msgs);
@@ -521,7 +521,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockingResumingRequests) {
// Test that new requests are not blocked for RVH 1.
MakeTestRequest(1, 7, URLRequestTestJob::test_url_1());
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
msgs.clear();
accum_.GetClassifiedMessages(&msgs);
ASSERT_EQ(1U, msgs.size());
@@ -531,7 +531,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockingResumingRequests) {
host_.ResumeBlockedRequestsForRoute(id(), 2);
host_.ResumeBlockedRequestsForRoute(id(), 3);
KickOffRequest();
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0,
host_.GetOutstandingRequestsMemoryCost(id()));
@@ -556,7 +556,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockingCancelingRequests) {
MakeTestRequest(1, 4, URLRequestTestJob::test_url_1());
// Flush all the pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
// Sort out all the messages we saw by request.
ResourceIPCAccumulator::ClassifiedMessages msgs;
@@ -571,7 +571,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockingCancelingRequests) {
// Cancel requests for RVH 1.
host_.CancelBlockedRequestsForRoute(id(), 1);
KickOffRequest();
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0,
host_.GetOutstandingRequestsMemoryCost(id()));
@@ -602,7 +602,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockedRequestsProcessDies) {
host_.CancelRequestsForProcess(second_receiver.id());
// Flush all the pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(
id()));
@@ -642,7 +642,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockedRequestsDontLeak) {
MakeTestRequest(this, 2, 6, URLRequestTestJob::test_url_3());
// Flush all the pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
}
// Test the private helper method "CalculateApproximateMemoryCost()".
@@ -741,7 +741,7 @@ TEST_F(ResourceDispatcherHostTest, TooManyOutstandingRequests) {
URLRequestTestJob::test_url_2());
// Flush all the pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
MessageLoop::current()->RunAllPending();
EXPECT_EQ(0,
@@ -801,7 +801,7 @@ TEST_F(ResourceDispatcherHostTest, MimeSniffed) {
MakeTestRequest(0, 1, GURL("http:bla"));
// Flush all pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(0));
@@ -830,7 +830,7 @@ TEST_F(ResourceDispatcherHostTest, MimeNotSniffed) {
MakeTestRequest(0, 1, GURL("http:bla"));
// Flush all pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(0));
@@ -858,7 +858,7 @@ TEST_F(ResourceDispatcherHostTest, MimeNotSniffed2) {
MakeTestRequest(0, 1, GURL("http:bla"));
// Flush all pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(0));
@@ -885,7 +885,7 @@ TEST_F(ResourceDispatcherHostTest, MimeSniff204) {
MakeTestRequest(0, 1, GURL("http:bla"));
// Flush all pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(0));
@@ -918,7 +918,7 @@ TEST_F(ResourceDispatcherHostTest, ForbiddenDownload) {
MakeTestRequest(0, 1, GURL("http:bla"));
// Flush all pending requests.
- while (URLRequestTestJob::ProcessOnePendingMessage());
+ while (URLRequestTestJob::ProcessOnePendingMessage()) {}
EXPECT_EQ(0, host_.GetOutstandingRequestsMemoryCost(0));
diff --git a/chrome/common/app_mode_common_mac.h b/chrome/common/app_mode_common_mac.h
index 48d72fe..046324ab 100644
--- a/chrome/common/app_mode_common_mac.h
+++ b/chrome/common/app_mode_common_mac.h
@@ -21,8 +21,8 @@ extern const CFStringRef kAppPrefsID;
extern const CFStringRef kLastRunAppBundlePathPrefsKey;
// Current major/minor version numbers of |ChromeAppModeInfo| (defined below).
-const unsigned kCurrentChromeAppModeInfoMajorVersion = 0;
-const unsigned kCurrentChromeAppModeInfoMinorVersion = 1;
+const unsigned kCurrentChromeAppModeInfoMajorVersion = 1;
+const unsigned kCurrentChromeAppModeInfoMinorVersion = 0;
// The structure used to pass information from the app mode loader to the
// (browser) framework. This is versioned using major and minor version numbers,
@@ -36,29 +36,29 @@ struct ChromeAppModeInfo {
unsigned minor_version; // Required: all versions
// Original |argc| and |argv|.
- int argc; // Required: v0.1
- char** argv; // Required: v0.1
+ int argc; // Required: v1.0
+ char** argv; // Required: v1.0
// Versioned path to the browser which is being loaded.
- char* chrome_versioned_path; // Required: v0.1
+ char* chrome_versioned_path; // Required: v1.0
// Information about the App Mode shortcut:
// Path to the App Mode Loader application bundle originally run.
- char* app_mode_bundle_path; // Optional: v0.1
+ char* app_mode_bundle_path; // Optional: v1.0
// Short ID string, preferably derived from |app_mode_short_name|. Should be
// safe for the file system.
- char* app_mode_id; // Required: v0.1
+ char* app_mode_id; // Required: v1.0
// Short (e.g., one-word) UTF8-encoded name for the shortcut.
- char* app_mode_short_name; // Optional: v0.1
+ char* app_mode_short_name; // Optional: v1.0
// Unrestricted (e.g., several-word) UTF8-encoded name for the shortcut.
- char* app_mode_name; // Optional: v0.1
+ char* app_mode_name; // Optional: v1.0
// URL for the shortcut. Must be a valid URL.
- char* app_mode_url; // Required: v0.1
+ char* app_mode_url; // Required: v1.0
};
} // namespace app_mode