Skip to content

Commit

Permalink
FBTF: Continue fixing nits found by my automated source scanner.
Browse files Browse the repository at this point in the history
(~1.3 megs off Debug linux .a files)

BUG=none
TEST=compiles

Review URL: http://codereview.chromium.org/3556013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61587 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
erg@google.com committed Oct 5, 2010
1 parent e22dddd commit 2858bbf
Show file tree
Hide file tree
Showing 47 changed files with 137 additions and 78 deletions.
2 changes: 2 additions & 0 deletions base/version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Version* Version::GetVersionFromString(const std::string& version_str) {

Version::Version() : is_valid_(false) {}

Version::~Version() {}

bool Version::Equals(const Version& that) const {
DCHECK(is_valid_);
DCHECK(that.is_valid_);
Expand Down
2 changes: 1 addition & 1 deletion base/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Version {
// will DCHECK.
Version();

~Version() {}
~Version();

bool Equals(const Version& other) const;

Expand Down
6 changes: 6 additions & 0 deletions chrome/browser/app_modal_dialog_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ void AppModalDialogQueue::ActivateModalDialog() {
active_dialog_->ActivateModalDialog();
}

AppModalDialogQueue::AppModalDialogQueue()
: active_dialog_(NULL), showing_modal_dialog_(false) {
}

AppModalDialogQueue::~AppModalDialogQueue() {}

void AppModalDialogQueue::ShowModalDialog(AppModalDialog* dialog) {
// Be sure and set the active_dialog_ field first, otherwise if
// ShowModalDialog triggers a call back to the queue they'll get the old
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/app_modal_dialog_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class AppModalDialogQueue {
private:
friend struct DefaultSingletonTraits<AppModalDialogQueue>;

AppModalDialogQueue() : active_dialog_(NULL), showing_modal_dialog_(false) {}
AppModalDialogQueue();
~AppModalDialogQueue();

// Shows |dialog| and notifies the BrowserList that a modal dialog is showing.
void ShowModalDialog(AppModalDialog* dialog);
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/autocomplete/autocomplete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,8 @@ AutocompleteResult::AutocompleteResult() {
default_match_ = end();
}

AutocompleteResult::~AutocompleteResult() {}

void AutocompleteResult::CopyFrom(const AutocompleteResult& rhs) {
if (this == &rhs)
return;
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/autocomplete/autocomplete.h
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ class AutocompleteResult {
};

AutocompleteResult();
~AutocompleteResult();

// operator=() by another name.
void CopyFrom(const AutocompleteResult& rhs);
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/autocomplete/keyword_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ void KeywordProvider::Stop() {
MaybeEndExtensionKeywordMode();
}

KeywordProvider::~KeywordProvider() {}

// static
bool KeywordProvider::ExtractKeywordFromInput(const AutocompleteInput& input,
std::wstring* keyword,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/keyword_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class KeywordProvider : public AutocompleteProvider,
class ScopedEndExtensionKeywordMode;
friend class ScopedEndExtensionKeywordMode;

~KeywordProvider() {}
virtual ~KeywordProvider();

// Extracts the keyword from |input| into |keyword|. Any remaining characters
// after the keyword are placed in |remaining_input|. Returns true if |input|
Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/autofill/address.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const int kAutoFillAddressLength = arraysize(kAutoFillAddressTypes);

} // namespace

Address::Address() {}

Address::~Address() {}

void Address::GetPossibleFieldTypes(const string16& text,
FieldTypeSet* possible_types) const {
DCHECK(possible_types);
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/autofill/address.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// A form group that stores address information.
class Address : public FormGroup {
public:
Address() {}
virtual ~Address() {}
Address();
virtual ~Address();

// FormGroup implementation:
virtual FormGroup* Clone() const = 0;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/autofill/autofill_field.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ AutoFillField::AutoFillField(const webkit_glue::FormField& field,
heuristic_type_(UNKNOWN_TYPE) {
}

AutoFillField::~AutoFillField() {}

void AutoFillField::set_heuristic_type(const AutoFillFieldType& type) {
DCHECK(type >= 0 && type < MAX_VALID_FIELD_TYPE);
if (type >= 0 && type < MAX_VALID_FIELD_TYPE)
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/autofill/autofill_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class AutoFillField : public webkit_glue::FormField {
AutoFillField();
AutoFillField(const webkit_glue::FormField& field,
const string16& unique_name);
virtual ~AutoFillField();

const string16& unique_name() const { return unique_name_; }

Expand Down
14 changes: 8 additions & 6 deletions chrome/browser/autofill/credit_card.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ std::string GetCreditCardType(const string16& number) {

} // namespace

CreditCard::CreditCard()
: expiration_month_(0),
expiration_year_(0),
billing_address_id_(0),
unique_id_(0) {
}

CreditCard::CreditCard(const string16& label, int unique_id)
: expiration_month_(0),
expiration_year_(0),
Expand All @@ -137,12 +144,7 @@ CreditCard::CreditCard(const CreditCard& card) : FormGroup() {
operator=(card);
}

CreditCard::CreditCard()
: expiration_month_(0),
expiration_year_(0),
billing_address_id_(0),
unique_id_(0) {
}
CreditCard::~CreditCard() {}

FormGroup* CreditCard::Clone() const {
return new CreditCard(*this);
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/autofill/credit_card.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
// A form group that stores credit card information.
class CreditCard : public FormGroup {
public:
CreditCard();
CreditCard(const string16& label, int unique_id);
// For use in STL containers.
CreditCard(const CreditCard& card);
CreditCard();
~CreditCard();

// FormGroup implementation:
FormGroup* Clone() const;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/autofill/form_structure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ FormStructure::FormStructure(const FormData& form)
}
}

FormStructure::~FormStructure() {}

bool FormStructure::EncodeUploadRequest(bool auto_fill_used,
std::string* encoded_xml) const {
bool auto_fillable = IsAutoFillable();
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/autofill/form_structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum UploadRequired {
class FormStructure {
public:
explicit FormStructure(const webkit_glue::FormData& form);
~FormStructure();

// Encodes the XML upload request from this FormStructure.
bool EncodeUploadRequest(bool auto_fill_used,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/browser_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
// On first run, we need to process the predictor preferences before the
// browser's profile_manager object is created, but after ResourceBundle
// is initialized.
FirstRun::MasterPrefs master_prefs = { 0 };
FirstRun::MasterPrefs master_prefs;
bool first_run_ui_bypass = false; // True to skip first run UI.
if (is_first_run) {
first_run_ui_bypass =
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/extension_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ ExtensionPrefs::ExtensionPrefs(PrefService* prefs, const FilePath& root_dir)
MakePathsRelative();
}

ExtensionPrefs::~ExtensionPrefs() {}

// static
const char ExtensionPrefs::kExtensionsPref[] = "extensions.settings";

Expand Down
1 change: 1 addition & 0 deletions chrome/browser/extensions/extension_prefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ExtensionPrefs {
};

explicit ExtensionPrefs(PrefService* prefs, const FilePath& root_dir_);
~ExtensionPrefs();

// Returns a copy of the Extensions prefs.
// TODO(erikkay) Remove this so that external consumers don't need to be
Expand Down
7 changes: 7 additions & 0 deletions chrome/browser/extensions/extensions_quota_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ void QuotaLimitHeuristic::Bucket::Reset(const Config& config,
expiration_ = start + config.refill_interval;
}

QuotaLimitHeuristic::QuotaLimitHeuristic(const Config& config,
BucketMapper* map)
: config_(config), bucket_mapper_(map) {
}

QuotaLimitHeuristic::~QuotaLimitHeuristic() {}

bool QuotaLimitHeuristic::ApplyToArgs(const ListValue* args,
const base::TimeTicks& event_time) {
BucketList buckets;
Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/extensions/extensions_quota_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ class QuotaLimitHeuristic {
};

// Ownership of |mapper| is given to the new QuotaLimitHeuristic.
explicit QuotaLimitHeuristic(const Config& config, BucketMapper* map)
: config_(config), bucket_mapper_(map) {}
virtual ~QuotaLimitHeuristic() {}
explicit QuotaLimitHeuristic(const Config& config, BucketMapper* map);
virtual ~QuotaLimitHeuristic();

// Determines if sufficient quota exists (according to the Apply
// implementation of a derived class) to perform an operation with |args|,
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/sandboxed_extension_unpacker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ void SandboxedExtensionUnpacker::Start() {
}
}

SandboxedExtensionUnpacker::~SandboxedExtensionUnpacker() {}

void SandboxedExtensionUnpacker::StartProcessOnIOThread(
const FilePath& temp_crx_path) {
UtilityProcessHost* host = new UtilityProcessHost(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/sandboxed_extension_unpacker.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SandboxedExtensionUnpacker : public UtilityProcessHost::Client {
friend class ProcessHostClient;
friend class SandboxedExtensionUnpackerTest;

~SandboxedExtensionUnpacker() {}
virtual ~SandboxedExtensionUnpacker();

// Validates the signature of the extension and extract the key to
// |public_key_|. Returns true if the signature validates, false otherwise.
Expand Down
8 changes: 8 additions & 0 deletions chrome/browser/first_run/first_run.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ FilePath GetDefaultPrefFilePath(bool create_profile_dir,

FirstRun::FirstRunState FirstRun::first_run_ = FIRST_RUN_UNKNOWN;

FirstRun::MasterPrefs::MasterPrefs() {}

FirstRun::MasterPrefs::~MasterPrefs() {}

// TODO(port): Import switches need to be ported to both Mac and Linux. Not all
// import switches here are implemented for Linux. None are implemented for Mac
// (as this function will not be called on Mac).
Expand Down Expand Up @@ -438,6 +442,10 @@ void Upgrade::RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
}
#endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)

FirstRunImportObserver::FirstRunImportObserver()
: loop_running_(false), import_result_(ResultCodes::NORMAL_EXIT) {
}

int FirstRunImportObserver::import_result() const {
return import_result_;
}
Expand Down
11 changes: 8 additions & 3 deletions chrome/browser/first_run/first_run.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ class FirstRun {
OEM_BUBBLE, // Smaller bubble for OEM builds
MINIMAL_BUBBLE // Minimal bubble shown after search engine dialog
} BubbleType;

// See ProcessMasterPreferences for more info about this structure.
struct MasterPrefs {
MasterPrefs();
~MasterPrefs();

int ping_delay;
bool homepage_defined;
int do_import_items;
Expand All @@ -49,6 +53,7 @@ class FirstRun {
std::vector<GURL> new_tabs;
std::vector<GURL> bookmarks;
};

#if defined(OS_WIN)
// Creates the desktop shortcut to chrome for the current user. Returns
// false if it fails. It will overwrite the shortcut if it exists.
Expand Down Expand Up @@ -292,13 +297,13 @@ class FirstRunBrowserProcess : public BrowserProcessImpl {
// The values that it handles are meant to be used as the process exit code.
class FirstRunImportObserver : public ImportObserver {
public:
FirstRunImportObserver()
: loop_running_(false), import_result_(ResultCodes::NORMAL_EXIT) {
}
FirstRunImportObserver();

int import_result() const;
virtual void ImportCanceled();
virtual void ImportComplete();
void RunLoop();

private:
void Finish();
bool loop_running_;
Expand Down
8 changes: 8 additions & 0 deletions chrome/browser/history/text_database_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ const int kExpirationSec = 20;

} // namespace

// TextDatabaseManager::ChangeSet ----------------------------------------------

TextDatabaseManager::ChangeSet::ChangeSet() {}

TextDatabaseManager::ChangeSet::~ChangeSet() {}

// TextDatabaseManager::PageInfo -----------------------------------------------

TextDatabaseManager::PageInfo::PageInfo(URLID url_id,
Expand All @@ -48,6 +54,8 @@ TextDatabaseManager::PageInfo::PageInfo(URLID url_id,
added_time_ = TimeTicks::Now();
}

TextDatabaseManager::PageInfo::~PageInfo() {}

void TextDatabaseManager::PageInfo::set_title(const string16& ttl) {
if (ttl.empty()) // Make the title nonempty when we set it for EverybodySet.
title_ = ASCIIToUTF16(" ");
Expand Down
4 changes: 3 additions & 1 deletion chrome/browser/history/text_database_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class TextDatabaseManager {
// our internals.
class ChangeSet {
public:
ChangeSet() {}
ChangeSet();
~ChangeSet();

private:
friend class TextDatabaseManager;
Expand Down Expand Up @@ -173,6 +174,7 @@ class TextDatabaseManager {
class PageInfo {
public:
PageInfo(URLID url_id, VisitID visit_id, base::Time visit_time);
~PageInfo();

// Getters.
URLID url_id() const { return url_id_; }
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/prefs/session_startup_pref.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,8 @@ bool SessionStartupPref::URLsAreManaged(PrefService* prefs) {
return pref_urls->IsManaged();
}

SessionStartupPref::SessionStartupPref() : type(DEFAULT) {}

SessionStartupPref::SessionStartupPref(Type type) : type(type) {}

SessionStartupPref::~SessionStartupPref() {}
6 changes: 4 additions & 2 deletions chrome/browser/prefs/session_startup_pref.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ struct SessionStartupPref {
static bool TypeIsManaged(PrefService* prefs);
static bool URLsAreManaged(PrefService* prefs);

SessionStartupPref() : type(DEFAULT) {}
SessionStartupPref();

explicit SessionStartupPref(Type type) : type(type) {}
explicit SessionStartupPref(Type type);

~SessionStartupPref();

// What to do on startup.
Type type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
using WebKit::WebNotification;
using WebKit::WebNotificationPermissionCallback;

ActiveNotificationTracker::ActiveNotificationTracker() {}

ActiveNotificationTracker::~ActiveNotificationTracker() {}

bool ActiveNotificationTracker::GetId(
const WebNotification& notification, int& id) {
ReverseTable::iterator iter = reverse_notification_table_.find(notification);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class WebNotificationPermissionCallback;
// the main thread.
class ActiveNotificationTracker {
public:
ActiveNotificationTracker() {}
ActiveNotificationTracker();
~ActiveNotificationTracker();

// Methods for tracking active notification objects.
int RegisterNotification(const WebKit::WebNotification& notification);
Expand Down
4 changes: 4 additions & 0 deletions chrome/common/extensions/update_manifest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ static const char* kExpectedGupdateProtocol = "2.0";
static const char* kExpectedGupdateXmlns =
"http://www.google.com/update2/response";

UpdateManifest::Results::Results() {}

UpdateManifest::Results::~Results() {}

UpdateManifest::UpdateManifest() {
results_.daystart_elapsed_seconds = kNoDaystart;
}
Expand Down
Loading

0 comments on commit 2858bbf

Please sign in to comment.