summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/base.gypi8
-rw-r--r--base/stack_container.h4
-rw-r--r--base/string_util.cc20
-rw-r--r--build/common.gypi8
-rw-r--r--build/external_code.gypi3
-rw-r--r--chrome/browser/autocomplete/autocomplete.h10
-rw-r--r--chrome/browser/autofill/address.cc3
-rw-r--r--chrome/browser/autofill/address_field.cc5
-rw-r--r--chrome/browser/autofill/autofill_profile.cc3
-rw-r--r--chrome/browser/autofill/contact_info.cc3
-rw-r--r--chrome/browser/autofill/credit_card.cc2
-rw-r--r--chrome/browser/autofill/credit_card_field.cc5
-rw-r--r--chrome/browser/autofill/name_field.cc5
-rw-r--r--chrome/browser/autofill/phone_number.cc3
-rw-r--r--chrome/browser/browser_theme_pack.cc6
-rw-r--r--chrome/browser/character_encoding.cc7
-rw-r--r--chrome/browser/debugger/devtools_remote_message.h4
-rw-r--r--chrome/browser/dom_ui/dom_ui.h6
-rw-r--r--chrome/browser/dom_ui/most_visited_handler.cc6
-rw-r--r--chrome/browser/dom_ui/most_visited_handler.h4
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h4
-rw-r--r--chrome/browser/notifications/balloon_collection.cc7
-rw-r--r--chrome/browser/notifications/balloon_collection.h4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util.h4
-rw-r--r--chrome/browser/sync/glue/bookmark_model_associator.h4
-rw-r--r--chrome/browser/sync/notifier/base/async_dns_lookup.h4
-rw-r--r--chrome/browser/task_manager.cc4
-rw-r--r--chrome/common/chrome_plugin_lib.h4
-rw-r--r--chrome/common/extensions/extension.h4
-rw-r--r--chrome/common/extensions/user_script.h2
-rw-r--r--ipc/ipc_message_utils.h4
-rw-r--r--media/base/filters.h14
-rw-r--r--net/base/host_resolver.h4
-rw-r--r--net/base/listen_socket_unittest.h4
-rw-r--r--net/base/sdch_manager.cc4
-rw-r--r--net/base/sdch_manager.h4
-rw-r--r--printing/printed_document.h4
-rw-r--r--third_party/libjingle/files/talk/base/httpcommon.h2
-rw-r--r--third_party/libjingle/files/talk/p2p/base/candidate.h2
-rw-r--r--third_party/libjingle/files/talk/p2p/base/stunrequest.cc2
-rw-r--r--third_party/libjingle/files/talk/p2p/base/stunrequest.h2
-rwxr-xr-xviews/controls/label.cc4
-rw-r--r--views/controls/label.h6
-rw-r--r--webkit/appcache/appcache_group.h2
44 files changed, 125 insertions, 89 deletions
diff --git a/base/base.gypi b/base/base.gypi
index c7e3a29..369fa54 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 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.
@@ -607,6 +607,9 @@
'cflags': [
'-Wno-sign-compare',
],
+ 'cflags!': [
+ '-Wextra',
+ ],
'sources': [
'third_party/symbolize/symbolize.cc',
'third_party/symbolize/demangle.cc',
@@ -615,6 +618,9 @@
{
'target_name': 'xdg_mime',
'type': '<(library)',
+ 'cflags!': [
+ '-Wextra',
+ ],
'sources': [
'third_party/xdg_mime/xdgmime.c',
'third_party/xdg_mime/xdgmime.h',
diff --git a/base/stack_container.h b/base/stack_container.h
index 1b325b1..388872f 100644
--- a/base/stack_container.h
+++ b/base/stack_container.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -72,7 +72,7 @@ class StackAllocator : public std::allocator<T> {
// For the straight up copy c-tor, we can share storage.
StackAllocator(const StackAllocator<T, stack_capacity>& rhs)
- : source_(rhs.source_) {
+ : std::allocator<T>(), source_(rhs.source_) {
}
// ISO C++ requires the following constructor to be defined,
diff --git a/base/string_util.cc b/base/string_util.cc
index 5990ef4..a66dae6 100644
--- a/base/string_util.cc
+++ b/base/string_util.cc
@@ -1182,6 +1182,24 @@ struct IntToStringT {
}
};
+ // This set of templates is very similar to the above templates, but
+ // for testing whether an integer is negative.
+ template <typename INT2, bool NEG2>
+ struct TestNegT { };
+ template <typename INT2>
+ struct TestNegT<INT2, false> {
+ static bool TestNeg(INT2 value) {
+ // value is unsigned, and can never be negative.
+ return false;
+ }
+ };
+ template <typename INT2>
+ struct TestNegT<INT2, true> {
+ static bool TestNeg(INT2 value) {
+ return value < 0;
+ }
+ };
+
static STR IntToString(INT value) {
// log10(2) ~= 0.3 bytes needed per bit or per byte log10(2**8) ~= 2.4.
// So round up to allocate 3 output characters per byte, plus 1 for '-'.
@@ -1191,7 +1209,7 @@ struct IntToStringT {
// then return the substr of what we ended up using.
STR outbuf(kOutputBufSize, 0);
- bool is_neg = value < 0;
+ bool is_neg = TestNegT<INT, NEG>::TestNeg(value);
// Even though is_neg will never be true when INT is parameterized as
// unsigned, even the presence of the unary operation causes a warning.
UINT res = ToUnsignedT<INT, UINT, NEG>::ToUnsigned(value);
diff --git a/build/common.gypi b/build/common.gypi
index 877679b..5d96ae5 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 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.
@@ -602,6 +602,12 @@
'-pthread',
'-fno-exceptions',
'-Wall',
+ # TODO(evan): turn this back on once the v8 change lands.
+ #'-Wextra',
+ # Don't warn about unused function params. We use those everywhere.
+ '-Wno-unused-parameter',
+ # Don't warn about the "struct foo f = {0};" initialization pattern.
+ '-Wno-missing-field-initializers',
'-D_FILE_OFFSET_BITS=64',
# Don't export any symbols (for example, to plugins we dlopen()).
# Note: this is *required* to make some plugins work.
diff --git a/build/external_code.gypi b/build/external_code.gypi
index c45603b..4f59b2b 100644
--- a/build/external_code.gypi
+++ b/build/external_code.gypi
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 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.
@@ -8,6 +8,7 @@
'target_defaults': {
'cflags!': [
'-Wall',
+ '-Wextra',
'-Werror',
],
},
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index f7de326..d64fd6c 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -233,19 +233,19 @@ class AutocompleteInput {
const GURL& canonicalized_url() const { return canonicalized_url_; }
// Returns whether inline autocompletion should be prevented.
- const bool prevent_inline_autocomplete() const {
+ bool prevent_inline_autocomplete() const {
return prevent_inline_autocomplete_;
}
// Returns whether, given an input string consisting solely of a substituting
// keyword, we should score it like a non-substituting keyword.
- const bool prefer_keyword() const { return prefer_keyword_; }
+ bool prefer_keyword() const { return prefer_keyword_; }
// Returns whether providers should avoid scheduling asynchronous work. If
// this is true, providers should stop after returning all the
// synchronously-available matches. This also means any in-progress
// asynchronous work should be canceled, so no later callbacks are fired.
- const bool synchronous_only() const { return synchronous_only_; }
+ bool synchronous_only() const { return synchronous_only_; }
// operator==() by another name.
bool Equals(const AutocompleteInput& other) const;
@@ -778,7 +778,7 @@ class AutocompleteController : public ACProviderListener {
// This next is temporary and should go away when
// AutocompletePopup::URLsForCurrentSelection() moves to the controller.
const AutocompleteResult& latest_result() const { return latest_result_; }
- const bool done() const { return done_ && !update_delay_timer_.IsRunning(); }
+ bool done() const { return done_ && !update_delay_timer_.IsRunning(); }
// From AutocompleteProvider::Listener
virtual void OnProviderUpdate(bool updated_matches);
diff --git a/chrome/browser/autofill/address.cc b/chrome/browser/autofill/address.cc
index f39f141..c76f6af 100644
--- a/chrome/browser/autofill/address.cc
+++ b/chrome/browser/autofill/address.cc
@@ -153,7 +153,8 @@ void Address::set_line2(const string16& line2) {
}
Address::Address(const Address& address)
- : line1_tokens_(address.line1_tokens_),
+ : FormGroup(),
+ line1_tokens_(address.line1_tokens_),
line2_tokens_(address.line2_tokens_),
line1_(address.line1_),
line2_(address.line2_),
diff --git a/chrome/browser/autofill/address_field.cc b/chrome/browser/autofill/address_field.cc
index 0994ac6..a40ad87 100644
--- a/chrome/browser/autofill/address_field.cc
+++ b/chrome/browser/autofill/address_field.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -161,7 +161,8 @@ AddressField::AddressField()
}
AddressField::AddressField(const AddressField& field)
- : address1_(field.address1_),
+ : FormField(),
+ address1_(field.address1_),
address2_(field.address2_),
city_(field.city_),
state_(field.state_),
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc
index cd0438d..caf335a 100644
--- a/chrome/browser/autofill/autofill_profile.cc
+++ b/chrome/browser/autofill/autofill_profile.cc
@@ -32,7 +32,8 @@ AutoFillProfile::AutoFillProfile()
use_billing_address_(true) {
}
-AutoFillProfile::AutoFillProfile(const AutoFillProfile& source) {
+AutoFillProfile::AutoFillProfile(const AutoFillProfile& source)
+ : FormGroup() {
operator=(source);
}
diff --git a/chrome/browser/autofill/contact_info.cc b/chrome/browser/autofill/contact_info.cc
index 266ea8e..37c5714 100644
--- a/chrome/browser/autofill/contact_info.cc
+++ b/chrome/browser/autofill/contact_info.cc
@@ -150,7 +150,8 @@ string16 ContactInfo::MiddleInitial() const {
}
ContactInfo::ContactInfo(const ContactInfo& contact_info)
- : first_tokens_(contact_info.first_tokens_),
+ : FormGroup(),
+ first_tokens_(contact_info.first_tokens_),
middle_tokens_(contact_info.middle_tokens_),
last_tokens_(contact_info.last_tokens_),
first_(contact_info.first_),
diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc
index 0f0d526..d4e5589 100644
--- a/chrome/browser/autofill/credit_card.cc
+++ b/chrome/browser/autofill/credit_card.cc
@@ -33,7 +33,7 @@ CreditCard::CreditCard(const string16& label, int unique_id)
unique_id_(unique_id) {
}
-CreditCard::CreditCard(const CreditCard& card) {
+CreditCard::CreditCard(const CreditCard& card) : FormGroup() {
operator=(card);
}
diff --git a/chrome/browser/autofill/credit_card_field.cc b/chrome/browser/autofill/credit_card_field.cc
index 7e0c3d0c..3a2bebc 100644
--- a/chrome/browser/autofill/credit_card_field.cc
+++ b/chrome/browser/autofill/credit_card_field.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -153,7 +153,8 @@ CreditCardField::CreditCardField()
}
CreditCardField::CreditCardField(const CreditCardField& field)
- : cardholder_(field.cardholder_),
+ : FormField(),
+ cardholder_(field.cardholder_),
cardholder_last_(field.cardholder_last_),
type_(field.type_),
number_(field.number_),
diff --git a/chrome/browser/autofill/name_field.cc b/chrome/browser/autofill/name_field.cc
index 83f5b16..3510e16 100644
--- a/chrome/browser/autofill/name_field.cc
+++ b/chrome/browser/autofill/name_field.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -152,7 +152,8 @@ FirstLastNameField::FirstLastNameField()
}
FirstLastNameField::FirstLastNameField(const FirstLastNameField& field)
- : first_name_(field.first_name_),
+ : NameField(),
+ first_name_(field.first_name_),
middle_name_(field.middle_name_),
last_name_(field.last_name_),
middle_initial_(field.middle_initial_) {
diff --git a/chrome/browser/autofill/phone_number.cc b/chrome/browser/autofill/phone_number.cc
index bdeee11..8c4de77 100644
--- a/chrome/browser/autofill/phone_number.cc
+++ b/chrome/browser/autofill/phone_number.cc
@@ -130,7 +130,8 @@ void PhoneNumber::set_number(const string16& number) {
}
PhoneNumber::PhoneNumber(const PhoneNumber& phone_number)
- : country_code_(phone_number.country_code_),
+ : FormGroup(),
+ country_code_(phone_number.country_code_),
city_code_(phone_number.city_code_),
number_(phone_number.number_),
extension_(phone_number.extension_) {
diff --git a/chrome/browser/browser_theme_pack.cc b/chrome/browser/browser_theme_pack.cc
index ea1474c..ed45ad0 100644
--- a/chrome/browser/browser_theme_pack.cc
+++ b/chrome/browser/browser_theme_pack.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -171,7 +171,7 @@ PersistingImagesTable kPersistingImages[] = {
{ 59, IDR_LOCATIONBG, NULL }
};
-const int GetPersistentIDByName(const std::string& key) {
+int GetPersistentIDByName(const std::string& key) {
for (size_t i = 0; i < arraysize(kPersistingImages); ++i) {
if (kPersistingImages[i].key != NULL &&
base::strcasecmp(key.c_str(), kPersistingImages[i].key) == 0) {
@@ -182,7 +182,7 @@ const int GetPersistentIDByName(const std::string& key) {
return -1;
}
-const int GetPersistentIDByIDR(int idr) {
+int GetPersistentIDByIDR(int idr) {
for (size_t i = 0; i < arraysize(kPersistingImages); ++i) {
if (kPersistingImages[i].idr_id == idr) {
return kPersistingImages[i].persistent_id;
diff --git a/chrome/browser/character_encoding.cc b/chrome/browser/character_encoding.cc
index a1afb4e..cd2693a 100644
--- a/chrome/browser/character_encoding.cc
+++ b/chrome/browser/character_encoding.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -112,12 +112,11 @@ class CanonicalEncodingMap {
const IdToCanonicalEncodingNameMapType* GetIdToCanonicalEncodingNameMapData();
const CanonicalEncodingNameToIdMapType* GetCanonicalEncodingNameToIdMapData();
const CanonicalNameDisplayNameMapType* GetCanonicalNameDisplayNameMapData();
- std::vector<int>* const locale_dependent_encoding_ids() {
+ std::vector<int>* locale_dependent_encoding_ids() {
return &locale_dependent_encoding_ids_;
}
- std::vector<CharacterEncoding::EncodingInfo>* const
- current_display_encodings() {
+ std::vector<CharacterEncoding::EncodingInfo>* current_display_encodings() {
return &current_display_encodings_;
}
diff --git a/chrome/browser/debugger/devtools_remote_message.h b/chrome/browser/debugger/devtools_remote_message.h
index fa37caa..0fa5e97 100644
--- a/chrome/browser/debugger/devtools_remote_message.h
+++ b/chrome/browser/debugger/devtools_remote_message.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -48,7 +48,7 @@ class DevToolsRemoteMessage {
return content_;
}
- const int content_length() const {
+ int content_length() const {
return content_.size();
}
diff --git a/chrome/browser/dom_ui/dom_ui.h b/chrome/browser/dom_ui/dom_ui.h
index 2156b30..5630597 100644
--- a/chrome/browser/dom_ui/dom_ui.h
+++ b/chrome/browser/dom_ui/dom_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -89,11 +89,11 @@ class DOMUI {
// Returns the transition type that should be used for link clicks on this
// DOM UI. This will default to LINK but may be overridden.
- const PageTransition::Type link_transition_type() const {
+ PageTransition::Type link_transition_type() const {
return link_transition_type_;
}
- const int bindings() const {
+ int bindings() const {
return bindings_;
}
diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc
index bf5a0f2..d145638 100644
--- a/chrome/browser/dom_ui/most_visited_handler.cc
+++ b/chrome/browser/dom_ui/most_visited_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -264,8 +264,8 @@ void MostVisitedHandler::RemovePinnedURL(const GURL& url) {
// Don't call HandleGetMostVisited. Let the client call this as needed.
}
-const bool MostVisitedHandler::GetPinnedURLAtIndex(const int index,
- MostVisitedPage* page) {
+bool MostVisitedHandler::GetPinnedURLAtIndex(int index,
+ MostVisitedPage* page) {
// This iterates over all the pinned URLs. It might seem like it is worth
// having a map from the index to the item but the number of items is limited
// to the number of items the most visited section is showing on the NTP so
diff --git a/chrome/browser/dom_ui/most_visited_handler.h b/chrome/browser/dom_ui/most_visited_handler.h
index 07be18c..9245cd9 100644
--- a/chrome/browser/dom_ui/most_visited_handler.h
+++ b/chrome/browser/dom_ui/most_visited_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -86,7 +86,7 @@ class MostVisitedHandler : public DOMMessageHandler,
// Gets the page data for a pinned URL at a given index. This returns
// true if found.
- const bool GetPinnedURLAtIndex(const int index, MostVisitedPage* page);
+ bool GetPinnedURLAtIndex(int index, MostVisitedPage* page);
void AddPinnedURL(const MostVisitedPage& page, int index);
void RemovePinnedURL(const GURL& url);
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index d612dd9..264300a 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -47,7 +47,7 @@ class NewTabUI : public DOMUI,
const GURL& gurl);
// The current preference version.
- static const int current_pref_version() { return current_pref_version_; }
+ static int current_pref_version() { return current_pref_version_; }
class NewTabHTMLSource : public ChromeURLDataManager::DataSource {
public:
diff --git a/chrome/browser/notifications/balloon_collection.cc b/chrome/browser/notifications/balloon_collection.cc
index e148911..224e7bb 100644
--- a/chrome/browser/notifications/balloon_collection.cc
+++ b/chrome/browser/notifications/balloon_collection.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -121,9 +121,8 @@ BalloonCollectionImpl::Layout::Layout() {
RefreshSystemMetrics();
}
-const void BalloonCollectionImpl::Layout::GetMaxLinearSize(
- int* max_balloon_size,
- int* total_size) const {
+void BalloonCollectionImpl::Layout::GetMaxLinearSize(int* max_balloon_size,
+ int* total_size) const {
DCHECK(max_balloon_size && total_size);
switch (placement_) {
diff --git a/chrome/browser/notifications/balloon_collection.h b/chrome/browser/notifications/balloon_collection.h
index 8810b18..14469d9 100644
--- a/chrome/browser/notifications/balloon_collection.h
+++ b/chrome/browser/notifications/balloon_collection.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -94,7 +94,7 @@ class BalloonCollectionImpl : public BalloonCollection {
//
// The size may be a height or length depending on the way that
// balloons are laid out.
- const void GetMaxLinearSize(int* max_balloon_size, int* total_size) const;
+ void GetMaxLinearSize(int* max_balloon_size, int* total_size) const;
// Refresh the cached values for work area and drawing metrics.
// The application should call this method to re-acquire metrics after
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.h b/chrome/browser/safe_browsing/safe_browsing_util.h
index cd39276..4e9104d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.h
+++ b/chrome/browser/safe_browsing/safe_browsing_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
//
@@ -249,7 +249,7 @@ class SBHostInfo {
// Used for serialization.
const void* data() const { return data_.get(); }
- const int size() const { return size_; }
+ int size() const { return size_; }
private:
// Checks data_ for internal consistency.
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.h b/chrome/browser/sync/glue/bookmark_model_associator.h
index 0a4fcb97..ddfc00e 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.h
+++ b/chrome/browser/sync/glue/bookmark_model_associator.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -34,7 +34,7 @@ class BookmarkChangeProcessor;
class BookmarkModelAssociator
: public PerDataTypeAssociatorInterface<BookmarkNode, int64> {
public:
- static const ModelType model_type() { return MODEL_TYPE_BOOKMARKS; }
+ static ModelType model_type() { return MODEL_TYPE_BOOKMARKS; }
explicit BookmarkModelAssociator(ProfileSyncService* sync_service);
virtual ~BookmarkModelAssociator() { }
diff --git a/chrome/browser/sync/notifier/base/async_dns_lookup.h b/chrome/browser/sync/notifier/base/async_dns_lookup.h
index c62aa1f..937db45 100644
--- a/chrome/browser/sync/notifier/base/async_dns_lookup.h
+++ b/chrome/browser/sync/notifier/base/async_dns_lookup.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -22,7 +22,7 @@ class AsyncDNSLookup : public talk_base::SignalThread {
explicit AsyncDNSLookup(const talk_base::SocketAddress& server);
virtual ~AsyncDNSLookup();
- const int error() const {
+ int error() const {
return error_;
}
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index 7c6a62e..e9ede55 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -260,7 +260,7 @@ std::pair<int, int> TaskManagerModel::GetGroupRangeForResource(int index)
if (group->size() == 1) {
return std::make_pair(index, 1);
} else {
- for (size_t i = index; i >= 0; --i) {
+ for (int i = index; i >= 0; --i) {
if (resources_[i] == (*group)[0])
return std::make_pair(i, group->size());
}
diff --git a/chrome/common/chrome_plugin_lib.h b/chrome/common/chrome_plugin_lib.h
index 0193708..5027cfc 100644
--- a/chrome/common/chrome_plugin_lib.h
+++ b/chrome/common/chrome_plugin_lib.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -43,7 +43,7 @@ class ChromePluginLib : public base::RefCounted<ChromePluginLib> {
static void UnloadAllPlugins();
// Returns true if the plugin is currently loaded.
- const bool is_loaded() const { return initialized_; }
+ bool is_loaded() const { return initialized_; }
// Get the Plugin's function pointer table.
const CPPluginFuncs& functions() const;
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 0e521c4..f1dbbfd 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -194,7 +194,7 @@ class Extension {
const FilePath& path() const { return path_; }
void set_path(const FilePath& path) { path_ = path; }
const GURL& url() const { return extension_url_; }
- const Location location() const { return location_; }
+ Location location() const { return location_; }
void set_location(Location location) { location_ = location; }
const std::string& id() const { return id_; }
const Version* version() const { return version_.get(); }
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h
index e2b3a96..9fbbe89 100644
--- a/chrome/common/extensions/user_script.h
+++ b/chrome/common/extensions/user_script.h
@@ -70,7 +70,7 @@ class UserScript {
void set_external_content(const base::StringPiece& content) {
external_content_ = content;
}
- const void set_content(const base::StringPiece& content) {
+ void set_content(const base::StringPiece& content) {
content_.assign(content.begin(), content.end());
}
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 0bffce9..e05c9c0 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -88,7 +88,7 @@ class MessageIterator {
NOTREACHED();
return val;
}
- const void NextData(const char** data, int* length) const {
+ void NextData(const char** data, int* length) const {
if (!msg_.ReadData(&iter_, data, length)) {
NOTREACHED();
}
diff --git a/media/base/filters.h b/media/base/filters.h
index 875c8c6..0ac83bb 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -157,7 +157,7 @@ class DataSource : public MediaFilter {
typedef Callback1<size_t>::Type ReadCallback;
static const size_t kReadError = static_cast<size_t>(-1);
- static const FilterType filter_type() {
+ static FilterType filter_type() {
return FILTER_DATA_SOURCE;
}
@@ -194,7 +194,7 @@ class DataSource : public MediaFilter {
class Demuxer : public MediaFilter {
public:
- static const FilterType filter_type() {
+ static FilterType filter_type() {
return FILTER_DEMUXER;
}
@@ -255,7 +255,7 @@ class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> {
class VideoDecoder : public MediaFilter {
public:
- static const FilterType filter_type() {
+ static FilterType filter_type() {
return FILTER_VIDEO_DECODER;
}
@@ -279,7 +279,7 @@ class VideoDecoder : public MediaFilter {
class AudioDecoder : public MediaFilter {
public:
- static const FilterType filter_type() {
+ static FilterType filter_type() {
return FILTER_AUDIO_DECODER;
}
@@ -303,7 +303,7 @@ class AudioDecoder : public MediaFilter {
class VideoRenderer : public MediaFilter {
public:
- static const FilterType filter_type() {
+ static FilterType filter_type() {
return FILTER_VIDEO_RENDERER;
}
@@ -323,7 +323,7 @@ class VideoRenderer : public MediaFilter {
class AudioRenderer : public MediaFilter {
public:
- static const FilterType filter_type() {
+ static FilterType filter_type() {
return FILTER_AUDIO_RENDERER;
}
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index 298f79a..a960805 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -45,7 +45,7 @@ class HostResolver : public base::RefCountedThreadSafe<HostResolver> {
is_speculative_(false),
priority_(MEDIUM) {}
- const int port() const { return port_; }
+ int port() const { return port_; }
const std::string& hostname() const { return hostname_; }
AddressFamily address_family() const { return address_family_; }
diff --git a/net/base/listen_socket_unittest.h b/net/base/listen_socket_unittest.h
index 81cbb95..87bb24b 100644
--- a/net/base/listen_socket_unittest.h
+++ b/net/base/listen_socket_unittest.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -52,7 +52,7 @@ class ListenSocketTestAction {
data_(data) {}
const std::string data() const { return data_; }
- const ActionType type() const { return action_; }
+ ActionType type() const { return action_; }
private:
ActionType action_;
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index b279749..6a8709b 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -122,7 +122,7 @@ void SdchManager::EnableSdchSupport(const std::string& domain) {
global_->sdch_enabled_ = true;
}
-const bool SdchManager::IsInSupportedDomain(const GURL& url) {
+bool SdchManager::IsInSupportedDomain(const GURL& url) {
if (!sdch_enabled_ )
return false;
if (!supported_domain_.empty() &&
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index 67ca5e5..23d100d 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -274,7 +274,7 @@ class SdchManager {
// supported domain (i.e., not blacklisted, and either the specific supported
// domain, or all domains were assumed supported). If it is blacklist, reduce
// by 1 the number of times it will be reported as blacklisted.
- const bool IsInSupportedDomain(const GURL& url);
+ bool IsInSupportedDomain(const GURL& url);
// Schedule the URL fetching to load a dictionary. This will always return
// before the dictionary is actually loaded and added.
diff --git a/printing/printed_document.h b/printing/printed_document.h
index 77364f9..ca5e663 100644
--- a/printing/printed_document.h
+++ b/printing/printed_document.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -96,7 +96,7 @@ class PrintedDocument : public base::RefCountedThreadSafe<PrintedDocument> {
const GURL& url() const { return immutable_.url_; }
const std::wstring& date() const { return immutable_.date_; }
const std::wstring& time() const { return immutable_.time_; }
- const int cookie() const { return immutable_.cookie_; }
+ int cookie() const { return immutable_.cookie_; }
// Sets a path where to dump printing output files for debugging. If never set
// no files are generated.
diff --git a/third_party/libjingle/files/talk/base/httpcommon.h b/third_party/libjingle/files/talk/base/httpcommon.h
index 2893933..fae39f9 100644
--- a/third_party/libjingle/files/talk/base/httpcommon.h
+++ b/third_party/libjingle/files/talk/base/httpcommon.h
@@ -169,7 +169,7 @@ bool HttpHasNthAttribute(HttpAttributeList& attributes,
// Convert RFC1123 date (DoW, DD Mon YYYY HH:MM:SS TZ) to unix timestamp
bool HttpDateToSeconds(const std::string& date, unsigned long* seconds);
-inline const uint16 UrlDefaultPort(bool secure) {
+inline uint16 UrlDefaultPort(bool secure) {
return secure ? HTTP_SECURE_PORT : HTTP_DEFAULT_PORT;
}
diff --git a/third_party/libjingle/files/talk/p2p/base/candidate.h b/third_party/libjingle/files/talk/p2p/base/candidate.h
index ac41311..bc88a42 100644
--- a/third_party/libjingle/files/talk/p2p/base/candidate.h
+++ b/third_party/libjingle/files/talk/p2p/base/candidate.h
@@ -49,7 +49,7 @@ public:
void set_address(const talk_base::SocketAddress & address)
{ address_ = address; }
- const float preference() const { return preference_; }
+ float preference() const { return preference_; }
void set_preference(const float preference) { preference_ = preference; }
const std::string preference_str() const {
std::ostringstream ost;
diff --git a/third_party/libjingle/files/talk/p2p/base/stunrequest.cc b/third_party/libjingle/files/talk/p2p/base/stunrequest.cc
index 66b8ef6..a4cbe7b 100644
--- a/third_party/libjingle/files/talk/p2p/base/stunrequest.cc
+++ b/third_party/libjingle/files/talk/p2p/base/stunrequest.cc
@@ -146,7 +146,7 @@ StunRequest::~StunRequest() {
delete msg_;
}
-const StunMessageType StunRequest::type() {
+StunMessageType StunRequest::type() {
assert(msg_);
return msg_->type();
}
diff --git a/third_party/libjingle/files/talk/p2p/base/stunrequest.h b/third_party/libjingle/files/talk/p2p/base/stunrequest.h
index b36861c..c3d79f9 100644
--- a/third_party/libjingle/files/talk/p2p/base/stunrequest.h
+++ b/third_party/libjingle/files/talk/p2p/base/stunrequest.h
@@ -88,7 +88,7 @@ public:
const std::string& id() { return id_; }
// Returns the STUN type of the request message.
- const StunMessageType type();
+ StunMessageType type();
// Handles messages for sending and timeout.
void OnMessage(talk_base::Message* pmsg);
diff --git a/views/controls/label.cc b/views/controls/label.cc
index dff4165..79f995a 100755
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -304,7 +304,7 @@ void Label::SetColor(const SkColor& color) {
color_ = color;
}
-const SkColor Label::GetColor() const {
+SkColor Label::GetColor() const {
return color_;
}
diff --git a/views/controls/label.h b/views/controls/label.h
index 76df4db..04e22ee 100644
--- a/views/controls/label.h
+++ b/views/controls/label.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -98,13 +98,13 @@ class Label : public View {
virtual void SetColor(const SkColor& color);
// Return a reference to the currently used color
- virtual const SkColor GetColor() const;
+ virtual SkColor GetColor() const;
// Set and Get the highlight color
virtual void SetHighlightColor(const SkColor& color) {
highlight_color_ = color;
}
- virtual const SkColor GetHighlightColor() const { return highlight_color_; }
+ virtual SkColor GetHighlightColor() const { return highlight_color_; }
// Whether to draw highlighted text.
virtual bool DrawHighlighted() const { return highlighted_; }
diff --git a/webkit/appcache/appcache_group.h b/webkit/appcache/appcache_group.h
index 8d620a8..1558b5a8 100644
--- a/webkit/appcache/appcache_group.h
+++ b/webkit/appcache/appcache_group.h
@@ -49,7 +49,7 @@ class AppCacheGroup : public base::RefCounted<AppCacheGroup> {
void AddUpdateObserver(UpdateObserver* observer);
void RemoveUpdateObserver(UpdateObserver* observer);
- const int64 group_id() const { return group_id_; }
+ int64 group_id() const { return group_id_; }
const GURL& manifest_url() const { return manifest_url_; }
bool is_obsolete() const { return is_obsolete_; }