diff options
| author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:03:17 +0000 | 
|---|---|---|
| committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:03:17 +0000 | 
| commit | 5a3b9149085f033097663a63c90e152051fd6c56 (patch) | |
| tree | 4e0ed4ceabd2ce7b7fd7ed2c9168f7641c5ad8f3 | |
| parent | c5874079454b61b597de2258c4256d5008183b1a (diff) | |
| download | chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.zip chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.tar.gz chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.tar.bz2 | |
Revert "Fix a ton of compiler warnings."
This reverts commit r24792.
TBR=estade
Review URL: http://codereview.chromium.org/179028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
141 files changed, 277 insertions, 529 deletions
| diff --git a/app/animation.h b/app/animation.h index c37adde..811c038 100644 --- a/app/animation.h +++ b/app/animation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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.  // Inspired by NSAnimation @@ -32,9 +32,6 @@ class AnimationDelegate {    // Called when an animation has been canceled.    virtual void AnimationCanceled(const Animation* animation) {    } - - protected: -  ~AnimationDelegate() {}  };  // Animation diff --git a/app/table_model.h b/app/table_model.h index 5d4377a..c1e61b1 100644 --- a/app/table_model.h +++ b/app/table_model.h @@ -94,8 +94,6 @@ class TableModel {    void ClearCollator();   protected: -  ~TableModel() {} -    // Returns the collator used by CompareValues.    icu::Collator* GetCollator();  }; diff --git a/app/table_model_observer.h b/app/table_model_observer.h index 087ce28..fcd50f4 100644 --- a/app/table_model_observer.h +++ b/app/table_model_observer.h @@ -20,9 +20,6 @@ class TableModelObserver {    // Invoked when a range of items has been removed.    virtual void OnItemsRemoved(int start, int length) = 0; - - protected: -  ~TableModelObserver() {}  };  #endif  // APP_TABLE_MODEL_OBSERVER_H_ diff --git a/app/tree_model.h b/app/tree_model.h index f6e2c14..f6d8da3 100644 --- a/app/tree_model.h +++ b/app/tree_model.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 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. @@ -21,9 +21,6 @@ class TreeModelNode {   public:    // Returns the title for the node.    virtual const std::wstring& GetTitle() const = 0; - - protected: -  ~TreeModelNode() {}  };  // Observer for the TreeModel. Notified of significant events to the model. @@ -48,9 +45,6 @@ class TreeModelObserver {    // Notification that the contents of a node has changed.    virtual void TreeNodeChanged(TreeModel* model, TreeModelNode* node) = 0; - - protected: -  ~TreeModelObserver() {}  };  // TreeModel ------------------------------------------------------------------ @@ -89,9 +83,6 @@ class TreeModel {    // default icon. The index is relative to the list of icons returned from    // GetIcons.    virtual int GetIconIndex(TreeModelNode* node) { return -1; } - - protected: -  ~TreeModel() {}  };  #endif  // APP_TREE_TREE_MODEL_H_ diff --git a/base/field_trial_unittest.cc b/base/field_trial_unittest.cc index 1ab5669..430fd67 100644 --- a/base/field_trial_unittest.cc +++ b/base/field_trial_unittest.cc @@ -160,8 +160,8 @@ TEST_F(FieldTrialTest, Save) {  }  TEST_F(FieldTrialTest, Restore) { -  EXPECT_TRUE(NULL == FieldTrialList::Find("Some_name")); -  EXPECT_TRUE(NULL == FieldTrialList::Find("xxx")); +  EXPECT_EQ(NULL, FieldTrialList::Find("Some_name")); +  EXPECT_EQ(NULL, FieldTrialList::Find("xxx"));    FieldTrialList::StringAugmentsState("Some_name/Winner/xxx/yyyy/"); diff --git a/base/file_descriptor_shuffle.h b/base/file_descriptor_shuffle.h index 108a874..8ee77409 100644 --- a/base/file_descriptor_shuffle.h +++ b/base/file_descriptor_shuffle.h @@ -37,9 +37,6 @@ class InjectionDelegate {    virtual bool Move(int src, int dest) = 0;    // Delete an element of the domain.    virtual void Close(int fd) = 0; - - protected: -  ~InjectionDelegate() {}  };  // An implementation of the InjectionDelegate interface using the file diff --git a/base/multiprocess_test.h b/base/multiprocess_test.h index 75a8a3e..99c2c79 100644 --- a/base/multiprocess_test.h +++ b/base/multiprocess_test.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef BASE_MULTIPROCESS_TEST_H_ -#define BASE_MULTIPROCESS_TEST_H_ +#ifndef BASE_MULTIPROCESS_TEST_H__ +#define BASE_MULTIPROCESS_TEST_H__  #include "base/base_switches.h"  #include "base/command_line.h" @@ -106,7 +106,7 @@ class MultiProcessTest : public PlatformTest {        const base::file_handle_mapping_vector& fds_to_map,        bool debug_on_start) {      CommandLine cl(*CommandLine::ForCurrentProcess()); -    base::ProcessHandle handle = 0; +    base::ProcessHandle handle = static_cast<base::ProcessHandle>(NULL);      cl.AppendSwitchWithValue(kRunClientProcess, procname);      if (debug_on_start) @@ -118,4 +118,4 @@ class MultiProcessTest : public PlatformTest {  #endif  }; -#endif  // BASE_MULTIPROCESS_TEST_H_ +#endif  // BASE_MULTIPROCESS_TEST_H__ diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc index f93b359..a05e9bb 100644 --- a/base/process_util_linux.cc +++ b/base/process_util_linux.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 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. @@ -259,6 +259,7 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {    int private_kb = 0;    int pss_kb = 0;    bool have_pss = false; +  const int kPssAdjust = 0.5;    if (!file_util::ReadFileToString(stat_file, &smaps))      return false; @@ -277,12 +278,12 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {            return false;          }          if (StartsWithASCII(last_key_name, "Shared_", 1)) { -          shared_kb += StringToInt(tokenizer.token()); +            shared_kb += StringToInt(tokenizer.token());          } else if (StartsWithASCII(last_key_name, "Private_", 1)) { -          private_kb += StringToInt(tokenizer.token()); +            private_kb += StringToInt(tokenizer.token());          } else if (StartsWithASCII(last_key_name, "Pss", 1)) { -          have_pss = true; -          pss_kb += StringToInt(tokenizer.token()); +            have_pss = true; +            pss_kb += StringToInt(tokenizer.token()) + kPssAdjust;          }          state = KEY_NAME;          break; diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index 6f74daf..b75bdb8 100644 --- a/base/process_util_unittest.cc +++ b/base/process_util_unittest.cc @@ -41,7 +41,7 @@ MULTIPROCESS_TEST_MAIN(SimpleChildProcess) {  TEST_F(ProcessUtilTest, SpawnChild) {    ProcessHandle handle = this->SpawnChild(L"SimpleChildProcess"); -  ASSERT_NE(0, handle); +  ASSERT_NE(static_cast<ProcessHandle>(NULL), handle);    EXPECT_TRUE(WaitForSingleProcess(handle, 5000));    base::CloseProcessHandle(handle);  } @@ -62,7 +62,7 @@ MULTIPROCESS_TEST_MAIN(SlowChildProcess) {  TEST_F(ProcessUtilTest, KillSlowChild) {    remove("SlowChildProcess.die");    ProcessHandle handle = this->SpawnChild(L"SlowChildProcess"); -  ASSERT_NE(0, handle); +  ASSERT_NE(static_cast<ProcessHandle>(NULL), handle);    FILE *fp = fopen("SlowChildProcess.die", "w");    fclose(fp);    EXPECT_TRUE(base::WaitForSingleProcess(handle, 5000)); diff --git a/base/stats_table_unittest.cc b/base/stats_table_unittest.cc index f022b9b..d8535cb 100644 --- a/base/stats_table_unittest.cc +++ b/base/stats_table_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -208,7 +208,7 @@ TEST_F(StatsTableTest, MultipleProcesses) {    // Spawn the processes.    for (int16 index = 0; index < kMaxProcs; index++) {      procs[index] = this->SpawnChild(L"StatsTableMultipleProcessMain"); -    EXPECT_NE(0, procs[index]); +    EXPECT_NE(static_cast<ProcessHandle>(NULL), procs[index]);    }    // Wait for the processes to finish. diff --git a/base/system_monitor.h b/base/system_monitor.h index 6322be9..aeec42b 100644 --- a/base/system_monitor.h +++ b/base/system_monitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 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. @@ -72,9 +72,6 @@ class SystemMonitor {      // Notification that the system is resuming.      virtual void OnResume(SystemMonitor*) = 0; - -   protected: -    ~PowerObserver() {}    };    // Add a new observer. diff --git a/base/task.h b/base/task.h index 2b3b51c..447bfab 100644 --- a/base/task.h +++ b/base/task.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -678,7 +678,6 @@ template <typename ReturnValue>  struct CallbackWithReturnValue {    class Type {     public: -    virtual ~Type() {}      virtual ReturnValue Run() = 0;    };  }; @@ -694,9 +693,6 @@ class CallbackWithReturnValueImpl    virtual ReturnValue Run() {      return (this->obj_->*(this->meth_))();    } - - protected: -  ~CallbackWithReturnValueImpl() {}  };  template <class T, typename ReturnValue> diff --git a/base/third_party/dmg_fp/README.chromium b/base/third_party/dmg_fp/README.chromium index b857044..046f273 100644 --- a/base/third_party/dmg_fp/README.chromium +++ b/base/third_party/dmg_fp/README.chromium @@ -14,4 +14,3 @@ List of changes made to original code:    - made some minor changes to allow clean compilation under g++ -Wall, see      gcc_warnings.patch.    - made some minor changes to build on 64-bit, see gcc_64_bit.patch. -  - made some implicit type converisons explicit, see type_conversion.patch. diff --git a/base/third_party/dmg_fp/dtoa.cc b/base/third_party/dmg_fp/dtoa.cc index ffbc088..c1bc476 100644 --- a/base/third_party/dmg_fp/dtoa.cc +++ b/base/third_party/dmg_fp/dtoa.cc @@ -1559,7 +1559,7 @@ hexnan  	CONST char *s;  	int c1, havedig, udx0, xshift; -	if (!hexdig[static_cast<int>('0')]) +	if (!hexdig['0'])  		hexdig_init();  	x[0] = x[1] = 0;  	havedig = xshift = 0; @@ -3283,7 +3283,7 @@ strtod  #ifdef Avoid_Underflow  			if (bc.scale && y <= 2*P*Exp_msk1) {  				if (aadj <= 0x7fffffff) { -					if ((z = static_cast<ULong>(aadj)) <= 0) +					if ((z = aadj) <= 0)  						z = 1;  					aadj = z;  					aadj1 = bc.dsign ? aadj : -aadj; @@ -3837,7 +3837,7 @@ dtoa  			 */  			dval(&eps) = 0.5/tens[ilim-1] - dval(&eps);  			for(i = 0;;) { -				L = static_cast<long>(dval(&u)); +				L = dval(&u);  				dval(&u) -= L;  				*s++ = '0' + (int)L;  				if (dval(&u) < dval(&eps)) diff --git a/base/time.cc b/base/time.cc index 93b3311..992e256 100644 --- a/base/time.cc +++ b/base/time.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -51,7 +51,7 @@ int64 TimeDelta::InMicroseconds() const {  Time Time::FromTimeT(time_t tt) {    if (tt == 0)      return Time();  // Preserve 0 so we can tell it doesn't exist. -  return Time((tt * kMicrosecondsPerSecond) + kTimeTToMicrosecondsOffset); +  return (tt * kMicrosecondsPerSecond) + kTimeTToMicrosecondsOffset;  }  time_t Time::ToTimeT() const { @@ -62,9 +62,8 @@ time_t Time::ToTimeT() const {  // static  Time Time::FromDoubleT(double dt) { -  return Time(static_cast<int64>((dt * -      static_cast<double>(kMicrosecondsPerSecond)) + -      kTimeTToMicrosecondsOffset)); +  return (dt * static_cast<double>(kMicrosecondsPerSecond)) + +      kTimeTToMicrosecondsOffset;  }  double Time::ToDoubleT() const { diff --git a/base/time.h b/base/time.h index 6a181af..a57c04f 100644 --- a/base/time.h +++ b/base/time.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -313,10 +313,10 @@ class Time {    // Return a new time modified by some delta.    Time operator+(TimeDelta delta) const { -    return Time(us_ + delta.delta_); +    return us_ + delta.delta_;    }    Time operator-(TimeDelta delta) const { -    return Time(us_ - delta.delta_); +    return us_ - delta.delta_;    }    // Comparison operators @@ -350,7 +350,7 @@ class Time {    // |is_local = true| or UTC |is_local = false|.    static Time FromExploded(bool is_local, const Exploded& exploded); -  explicit Time(int64 us) : us_(us) { +  Time(int64 us) : us_(us) {    }    // The representation of Jan 1, 1970 UTC in microseconds since the diff --git a/base/time_posix.cc b/base/time_posix.cc index 66e0345..66f41d3 100644 --- a/base/time_posix.cc +++ b/base/time_posix.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. diff --git a/base/waitable_event.h b/base/waitable_event.h index 2b498497..31aa085 100644 --- a/base/waitable_event.h +++ b/base/waitable_event.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -121,9 +121,6 @@ class WaitableEvent {      // pointers match then this function is called as a final check. See the      // comments in ~Handle for why.      virtual bool Compare(void* tag) = 0; - -   protected: -    ~Waiter() {}    };   private: diff --git a/base/waitable_event_watcher_unittest.cc b/base/waitable_event_watcher_unittest.cc index 80e64b5..049de38 100644 --- a/base/waitable_event_watcher_unittest.cc +++ b/base/waitable_event_watcher_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -38,7 +38,7 @@ void RunTest_BasicSignal(MessageLoop::Type message_loop_type) {    WaitableEvent event(true, false);    WaitableEventWatcher watcher; -  EXPECT_TRUE(NULL == watcher.GetWatchedEvent()); +  EXPECT_EQ(NULL, watcher.GetWatchedEvent());    QuitDelegate delegate;    watcher.StartWatching(&event, &delegate); @@ -48,7 +48,7 @@ void RunTest_BasicSignal(MessageLoop::Type message_loop_type) {    MessageLoop::current()->Run(); -  EXPECT_TRUE(NULL == watcher.GetWatchedEvent()); +  EXPECT_EQ(NULL, watcher.GetWatchedEvent());  }  void RunTest_BasicCancel(MessageLoop::Type message_loop_type) { diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h index 4e96102..b3ed20b 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) 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. @@ -466,8 +466,6 @@ class AutocompleteProvider      // them all again when this is called anyway, so such a parameter wouldn't      // actually be useful.      virtual void OnProviderUpdate(bool updated_matches) = 0; -   protected: -    ~ACProviderListener() {}    };    AutocompleteProvider(ACProviderListener* listener, diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h index 8567c62..efe5c9a 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.h +++ b/chrome/browser/autocomplete/autocomplete_edit.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -51,8 +51,6 @@ class AutocompleteEditController {    // Returns the title of the current page.    virtual std::wstring GetTitle() const = 0; - protected: -  ~AutocompleteEditController() {}  };  class AutocompleteEditModel { diff --git a/chrome/browser/autocomplete/autocomplete_edit_view.h b/chrome/browser/autocomplete/autocomplete_edit_view.h index ea3988a..928d7e4 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -125,8 +125,6 @@ class AutocompleteEditView {    // Returns the gfx::NativeView of the edit view.    virtual gfx::NativeView GetNativeView() const = 0; - protected: -  ~AutocompleteEditView() {}  };  #endif  // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ diff --git a/chrome/browser/autocomplete/autocomplete_popup_view.h b/chrome/browser/autocomplete/autocomplete_popup_view.h index d1977ae..344ab9c 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -29,17 +29,17 @@ class Profile;  // bounds for the autocomplete popup view.  class AutocompletePopupPositioner {   public: +  virtual ~AutocompletePopupPositioner() { } +    // Returns the bounds at which the popup should be shown, in screen    // coordinates. The height is ignored, since the popup is sized to its    // contents automatically.    virtual gfx::Rect GetPopupBounds() const = 0; - protected: -  ~AutocompletePopupPositioner() {}  };  class AutocompletePopupView {   public: -  virtual ~AutocompletePopupView() {} +  virtual ~AutocompletePopupView() { }    // Returns true if the popup is currently open.    virtual bool IsOpen() const = 0; diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc index d657a62..dffc91a 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc @@ -364,7 +364,7 @@ void AutocompletePopupViewGtk::AcceptLine(size_t line,  gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget,                                                  GdkEventMotion* event) {    // TODO(deanm): Windows has a bunch of complicated logic here. -  size_t line = LineFromY(static_cast<int>(event->y)); +  size_t line = LineFromY(event->y);    // There is both a hovered and selected line, hovered just means your mouse    // is over it, but selected is what's showing in the location edit.    model_->SetHoveredLine(line); @@ -377,7 +377,7 @@ gboolean AutocompletePopupViewGtk::HandleMotion(GtkWidget* widget,  gboolean AutocompletePopupViewGtk::HandleButtonPress(GtkWidget* widget,                                                       GdkEventButton* event) {    // Very similar to HandleMotion. -  size_t line = LineFromY(static_cast<int>(event->y)); +  size_t line = LineFromY(event->y);    model_->SetHoveredLine(line);    if (event->button == 1)      model_->SetSelectedLine(line, false); @@ -386,7 +386,7 @@ gboolean AutocompletePopupViewGtk::HandleButtonPress(GtkWidget* widget,  gboolean AutocompletePopupViewGtk::HandleButtonRelease(GtkWidget* widget,                                                         GdkEventButton* event) { -  size_t line = LineFromY(static_cast<int>(event->y)); +  size_t line = LineFromY(event->y);    switch (event->button) {      case 1:  // Left click.        AcceptLine(line, CURRENT_TAB); @@ -465,7 +465,7 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget,      bool has_description = !match.description.empty();      int text_width = window_rect.width() - (kIconAreaWidth + kRightPadding);      int allocated_content_width = has_description ? -        static_cast<int>(text_width * kContentWidthPercentage) : text_width; +        text_width * kContentWidthPercentage : text_width;      pango_layout_set_width(layout_, allocated_content_width * PANGO_SCALE);      // Note: We force to URL to LTR for all text directions. diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 3b10911..93aad4d 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -940,7 +940,7 @@ void AutomationProvider::OnRedirectQueryComplete(    IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);    Send(reply_message_); -  redirect_query_ = 0; +  redirect_query_ = NULL;    reply_message_ = NULL;  } diff --git a/chrome/browser/blocked_popup_container.h b/chrome/browser/blocked_popup_container.h index 4d89a3f..d7e5d0e 100644 --- a/chrome/browser/blocked_popup_container.h +++ b/chrome/browser/blocked_popup_container.h @@ -52,8 +52,6 @@ class BlockedPopupContainerView {    // Called by the BlockedPopupContainer that owns us. Destroys the view or    // starts a delayed Task to destroy the View at some later time.    virtual void Destroy() = 0; - protected: -  ~BlockedPopupContainerView() {}  };  // Takes ownership of TabContents that are unrequested popup windows and @@ -148,7 +146,7 @@ class BlockedPopupContainer : public TabContentsDelegate,    // Ignored; BlockedPopupContainer doesn't display a throbber.    virtual void NavigationStateChanged(const TabContents* source, -                                      unsigned changed_flags) {} +                                      unsigned changed_flags) { }    // Forwards AddNewContents to our |owner_|.    virtual void AddNewContents(TabContents* source, @@ -158,10 +156,10 @@ class BlockedPopupContainer : public TabContentsDelegate,                                bool user_gesture);    // Ignore activation requests from the TabContents we're blocking. -  virtual void ActivateContents(TabContents* contents) {} +  virtual void ActivateContents(TabContents* contents) { }    // Ignored; BlockedPopupContainer doesn't display a throbber. -  virtual void LoadingStateChanged(TabContents* source) {} +  virtual void LoadingStateChanged(TabContents* source) { }    // Removes |source| from our internal list of blocked popups.    virtual void CloseContents(TabContents* source); @@ -176,13 +174,13 @@ class BlockedPopupContainer : public TabContentsDelegate,    virtual TabContents* GetConstrainingContents(TabContents* source);    // Ignored; BlockedPopupContainer doesn't display a toolbar. -  virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} +  virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) { }    // Ignored; BlockedPopupContainer doesn't display a bookmarking star. -  virtual void URLStarredChanged(TabContents* source, bool starred) {} +  virtual void URLStarredChanged(TabContents* source, bool starred) { }    // Ignored; BlockedPopupContainer doesn't display a URL bar. -  virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} +  virtual void UpdateTargetURL(TabContents* source, const GURL& url) { }    // A number larger than the internal popup count on the Renderer; meant for    // preventing a compromised renderer from exhausting GDI memory by spawning diff --git a/chrome/browser/bookmarks/bookmark_model_observer.h b/chrome/browser/bookmarks/bookmark_model_observer.h index 738fc09..1b85fe3 100644 --- a/chrome/browser/bookmarks/bookmark_model_observer.h +++ b/chrome/browser/bookmarks/bookmark_model_observer.h @@ -15,7 +15,7 @@ class BookmarkModelObserver {    virtual void Loaded(BookmarkModel* model) = 0;    // Invoked from the destructor of the BookmarkModel. -  virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {} +  virtual void BookmarkModelBeingDeleted(BookmarkModel* model) { }    // Invoked when a node has moved.    virtual void BookmarkNodeMoved(BookmarkModel* model, @@ -51,9 +51,6 @@ class BookmarkModelObserver {    // |node| have been reordered in some way, such as sorted.    virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,                                               const BookmarkNode* node) = 0; - - protected: -  ~BookmarkModelObserver() {}  };  #endif  // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_OBSERVER_H_ diff --git a/chrome/browser/bookmarks/bookmark_service.h b/chrome/browser/bookmarks/bookmark_service.h index 1816057..2de91cf 100644 --- a/chrome/browser/bookmarks/bookmark_service.h +++ b/chrome/browser/bookmarks/bookmark_service.h @@ -1,4 +1,4 @@ -// Copyright 2009, The Chromium Authors +// Copyright 2008, Google Inc.  // All rights reserved.  //  // Redistribution and use in source and binary forms, with or without @@ -56,9 +56,6 @@ class BookmarkService {    // Blocks until loaded. This is intended for usage on a thread other than    // the main thread.    virtual void BlockTillLoaded() = 0; - - protected: -  ~BookmarkService() {}  };  #endif  // CHROME_BROWSER_BOOKMARKS_BOOKMARK_SERVICE_H_ diff --git a/chrome/browser/browser_list.h b/chrome/browser/browser_list.h index 20c360d..fda1aa4 100644 --- a/chrome/browser/browser_list.h +++ b/chrome/browser/browser_list.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef CHROME_BROWSER_BROWSER_LIST_H_ -#define CHROME_BROWSER_BROWSER_LIST_H_ +#ifndef CHROME_BROWSER_BROWSER_LIST_H__ +#define CHROME_BROWSER_BROWSER_LIST_H__  #include <vector> @@ -28,10 +28,7 @@ class BrowserList {      virtual void OnBrowserRemoving(const Browser* browser) = 0;      // Called immediately after a browser is set active (SetLastActive) -    virtual void OnBrowserSetLastActive(const Browser* browser) {}; - -   protected: -    ~Observer() {}; +    virtual void OnBrowserSetLastActive(const Browser* browser) { };    };    // Adds and removes browsers from the global list. The browser object should @@ -194,4 +191,4 @@ class TabContentsIterator {    TabContents* cur_;  }; -#endif  // CHROME_BROWSER_BROWSER_LIST_H_ +#endif  // CHROME_BROWSER_BROWSER_LIST_H__ diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc index ee361e9..ec4054b 100644 --- a/chrome/browser/browser_theme_provider.cc +++ b/chrome/browser/browser_theme_provider.cc @@ -117,8 +117,8 @@ const SkColor BrowserThemeProvider::kDefaultColorNTPSectionText =      SkColorSetRGB(0, 0, 0);  const SkColor BrowserThemeProvider::kDefaultColorNTPSectionLink =      SkColorSetRGB(0, 0, 204); -const SkColor BrowserThemeProvider::kDefaultColorControlBackground = 0u; -const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = 0u; +const SkColor BrowserThemeProvider::kDefaultColorControlBackground = NULL; +const SkColor BrowserThemeProvider::kDefaultColorButtonBackground = NULL;  // Default tints.  const skia::HSL BrowserThemeProvider::kDefaultTintButtons = { -1, -1, -1 }; diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index fd41fc0..a1dbe76 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -244,7 +244,6 @@ class BrowserWindow {   protected:    friend class BrowserList;    friend class BrowserView; -  ~BrowserWindow() {}    virtual void DestroyBrowser() = 0;  }; diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 3f2bbbb..0425c6f 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -41,8 +41,6 @@ class BrowsingDataRemover : public NotificationObserver {    class Observer {     public:      virtual void OnBrowsingDataRemoverDone() = 0; -   protected: -    ~Observer() {}    };    // Creates a BrowsingDataRemover to remove browser data from the specified diff --git a/chrome/browser/cancelable_request.h b/chrome/browser/cancelable_request.h index 3840936..713440e 100644 --- a/chrome/browser/cancelable_request.h +++ b/chrome/browser/cancelable_request.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -80,8 +80,8 @@  //     }  //   }; -#ifndef CHROME_BROWSER_CANCELABLE_REQUEST_H_ -#define CHROME_BROWSER_CANCELABLE_REQUEST_H_ +#ifndef CHROME_BROWSER_CANCELABLE_REQUEST_H__ +#define CHROME_BROWSER_CANCELABLE_REQUEST_H__  #include <map>  #include <vector> @@ -274,7 +274,7 @@ class CancelableRequestConsumerTSimple : public CancelableRequestConsumerBase {    typedef std::map<PendingRequest, T> PendingRequestList;    virtual T get_initial_t() const { -    return 0; +    return NULL;    }    virtual void OnRequestAdded(CancelableRequestProvider* provider, @@ -543,4 +543,4 @@ class CancelableRequest1 : public CancelableRequest<CB> {    Type value;  }; -#endif  // CHROME_BROWSER_CANCELABLE_REQUEST_H_ +#endif  // CHROME_BROWSER_CANCELABLE_REQUEST_H__ diff --git a/chrome/browser/command_updater.h b/chrome/browser/command_updater.h index 9e2afcb..3a6b7ca 100644 --- a/chrome/browser/command_updater.h +++ b/chrome/browser/command_updater.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -24,8 +24,6 @@ class CommandUpdater {     public:      // Perform the action associated with the command with the specified ID.      virtual void ExecuteCommand(int id) = 0; -   protected: -    ~CommandUpdaterDelegate() {}    };    // Create a CommandUpdater with a CommandUpdaterDelegate to handle execution @@ -52,8 +50,6 @@ class CommandUpdater {      // Notifies the observer that the enabled state has changed for the      // specified command id.      virtual void EnabledStateChangedForCommand(int id, bool enabled) = 0; -   protected: -    ~CommandObserver() {}    };    // Adds an observer to the state of a particular command. If the command does diff --git a/chrome/browser/dock_info.h b/chrome/browser/dock_info.h index 76c900e..4f6d476 100644 --- a/chrome/browser/dock_info.h +++ b/chrome/browser/dock_info.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -32,9 +32,6 @@ class DockInfo {      virtual gfx::NativeWindow GetLocalProcessWindowAtPoint(          const gfx::Point& screen_point,          const std::set<gfx::NativeView>& ignore) = 0; - -   protected: -    ~Factory() {}    };    // Possible dock positions. diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h index b7d87c7..fec86ad 100644 --- a/chrome/browser/download/download_manager.h +++ b/chrome/browser/download/download_manager.h @@ -98,9 +98,6 @@ class DownloadItem {      // Called when a downloaded file has been opened.      virtual void OnDownloadOpened(DownloadItem* download) = 0; - -   protected: -    ~Observer() {}    };    // Constructing from persistent store: @@ -326,9 +323,6 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,      // downloads. The DownloadManagerObserver must copy the vector, but does not      // own the individual DownloadItems, when this call is made.      virtual void SetDownloads(std::vector<DownloadItem*>& downloads) = 0; - -   protected: -    ~Observer() {}    };    // Public API diff --git a/chrome/browser/download/download_request_manager.h b/chrome/browser/download/download_request_manager.h index 62c3caa..f9351c8 100644 --- a/chrome/browser/download/download_request_manager.h +++ b/chrome/browser/download/download_request_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -57,8 +57,6 @@ class DownloadRequestManager :     public:      virtual void ContinueDownload() = 0;      virtual void CancelDownload() = 0; -   protected: -    ~Callback() {}    };    // TabDownloadState maintains the download state for a particular tab. @@ -171,8 +169,6 @@ class DownloadRequestManager :    class TestingDelegate {     public:      virtual bool ShouldAllowDownload() = 0; -   protected: -    ~TestingDelegate() {}    };    static void SetTestingDelegate(TestingDelegate* delegate); diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h index a967c8f..7a47b3f 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.h +++ b/chrome/browser/extensions/extension_function_dispatcher.h @@ -31,8 +31,6 @@ class ExtensionFunctionDispatcher {     public:      virtual Browser* GetBrowser() = 0;      virtual ExtensionHost* GetExtensionHost() { return NULL; } -   protected: -    ~Delegate() {}    };    // The peer object allows us to notify ExtensionFunctions when we are diff --git a/chrome/browser/extensions/extension_shelf_model.h b/chrome/browser/extensions/extension_shelf_model.h index ba8b8b1d..29f6592 100644 --- a/chrome/browser/extensions/extension_shelf_model.h +++ b/chrome/browser/extensions/extension_shelf_model.h @@ -158,9 +158,6 @@ class ExtensionShelfModelObserver {    // The model is being destroyed.    virtual void ShelfModelDeleting() {} - - protected: -  ~ExtensionShelfModelObserver() {}  }; diff --git a/chrome/browser/extensions/external_extension_provider.h b/chrome/browser/extensions/external_extension_provider.h index 6c664c8..f431bfc 100644 --- a/chrome/browser/extensions/external_extension_provider.h +++ b/chrome/browser/extensions/external_extension_provider.h @@ -27,8 +27,6 @@ class ExternalExtensionProvider {                                             const Version* version,                                             const FilePath& path,                                             Extension::Location location) = 0; -   protected: -     ~Visitor() {}    };    virtual ~ExternalExtensionProvider() {} diff --git a/chrome/browser/gears_integration.cc b/chrome/browser/gears_integration.cc index a2a0e4f..6805175 100644 --- a/chrome/browser/gears_integration.cc +++ b/chrome/browser/gears_integration.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -254,7 +254,7 @@ void GearsCreateShortcut(        new CreateShortcutCommand(name_utf8, orig_name_utf8, url.spec(),                                  description_utf8,                                  app_info.icons, fallback_icon, callback); -  CPHandleCommand(GEARSPLUGINCOMMAND_CREATE_SHORTCUT, command, 0u); +  CPHandleCommand(GEARSPLUGINCOMMAND_CREATE_SHORTCUT, command, NULL);  }  // This class holds and manages the data passed to the @@ -311,5 +311,5 @@ void RunnableMethodTraits<QueryShortcutsCommand>::ReleaseCallee(  void GearsQueryShortcuts(GearsQueryShortcutsCallback* callback) {    CPHandleCommand(GEARSPLUGINCOMMAND_GET_SHORTCUT_LIST,        new QueryShortcutsCommand(callback), -      0u); +      NULL);  } diff --git a/chrome/browser/gtk/back_forward_button_gtk.cc b/chrome/browser/gtk/back_forward_button_gtk.cc index e5f6125..7f4bd69 100644 --- a/chrome/browser/gtk/back_forward_button_gtk.cc +++ b/chrome/browser/gtk/back_forward_button_gtk.cc @@ -110,7 +110,7 @@ gboolean BackForwardButtonGtk::OnButtonPress(GtkWidget* widget,    if (event->button != 1)      return FALSE; -  button->y_position_of_last_press_ = static_cast<int>(event->y); +  button->y_position_of_last_press_ = event->y;    MessageLoop::current()->PostDelayedTask(FROM_HERE,        button->show_menu_factory_.NewRunnableMethod(            &BackForwardButtonGtk::ShowBackForwardMenu), diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index 909243d..373ce0f 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -399,8 +399,8 @@ void BookmarkBarGtk::AnimationProgressed(const Animation* animation) {    DCHECK_EQ(animation, slide_animation_.get());    gtk_widget_set_size_request(event_box_.get(), -1, -                              static_cast<gint>(animation->GetCurrentValue() * -                                                kBookmarkBarHeight)); +                              animation->GetCurrentValue() * +                              kBookmarkBarHeight);  }  void BookmarkBarGtk::AnimationEnded(const Animation* animation) { diff --git a/chrome/browser/gtk/bookmark_manager_gtk.cc b/chrome/browser/gtk/bookmark_manager_gtk.cc index 0d005e9..f38512c 100644 --- a/chrome/browser/gtk/bookmark_manager_gtk.cc +++ b/chrome/browser/gtk/bookmark_manager_gtk.cc @@ -1183,9 +1183,7 @@ gboolean BookmarkManagerGtk::OnRightTreeViewButtonPress(    GtkTreePath* path;    gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), -                                static_cast<gint>(event->x), -                                static_cast<gint>(event->y), &path, -                                NULL, NULL, NULL); +                                event->x, event->y, &path, NULL, NULL, NULL);    if (path == NULL)      return TRUE; @@ -1209,10 +1207,10 @@ gboolean BookmarkManagerGtk::OnRightTreeViewMotion(      return FALSE;    if (gtk_drag_check_threshold(tree_view, -                               static_cast<gint>(bm->mousedown_event_.x), -                               static_cast<gint>(bm->mousedown_event_.y), -                               static_cast<gint>(event->x), -                               static_cast<gint>(event->y))) { +                               bm->mousedown_event_.x, +                               bm->mousedown_event_.y, +                               event->x, +                               event->y)) {      bm->delaying_mousedown_ = false;      GtkTargetList* targets = GtkDndUtil::GetTargetListFromCodeMask(          GtkDndUtil::CHROME_BOOKMARK_ITEM | diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index 278f973..9c295ac 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -603,7 +603,7 @@ gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget,          IDR_WINDOW_TOP_CENTER,          IDR_WINDOW_TOP_RIGHT_CORNER,          IDR_WINDOW_LEFT_SIDE, -        0, +        NULL,          IDR_WINDOW_RIGHT_SIDE,          IDR_WINDOW_BOTTOM_LEFT_CORNER,          IDR_WINDOW_BOTTOM_CENTER, @@ -1825,8 +1825,7 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget,    gdk_window_get_origin(GTK_WIDGET(browser->window_)->window, &win_x, &win_y);    GdkWindowEdge edge; -  gfx::Point point(static_cast<int>(event->x_root - win_x), -                   static_cast<int>( event->y_root - win_y)); +  gfx::Point point(event->x_root - win_x, event->y_root - win_y);    bool has_hit_edge = browser->GetWindowEdge(point.x(), point.y(), &edge);    // Ignore clicks that are in/below the browser toolbar. @@ -1845,8 +1844,7 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget,        guint32 last_click_time = browser->last_click_time_;        gfx::Point last_click_position = browser->last_click_position_;        browser->last_click_time_ = event->time; -      browser->last_click_position_ = gfx::Point(static_cast<int>(event->x), -                                                 static_cast<int>(event->y)); +      browser->last_click_position_ = gfx::Point(event->x, event->y);        if (has_hit_titlebar) {          // We want to start a move when the user single clicks, but not start a @@ -1866,23 +1864,19 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget,              NULL);          guint32 click_time = event->time - last_click_time; -        int click_move_x = static_cast<int>(event->x - last_click_position.x()); -        int click_move_y = static_cast<int>(event->y - last_click_position.y()); +        int click_move_x = event->x - last_click_position.x(); +        int click_move_y = event->y - last_click_position.y();          if (click_time > static_cast<guint32>(double_click_time) ||              click_move_x > double_click_distance ||              click_move_y > double_click_distance) {            gtk_window_begin_move_drag(browser->window_, event->button, -                                     static_cast<gint>(event->x_root), -                                     static_cast<gint>(event->y_root), -                                     event->time); +                                     event->x_root, event->y_root, event->time);            return TRUE;          }        } else if (has_hit_edge) {          gtk_window_begin_resize_drag(browser->window_, edge, event->button, -                                     static_cast<gint>(event->x_root), -                                     static_cast<gint>(event->y_root), -                                     event->time); +                                     event->x_root, event->y_root, event->time);          return TRUE;        }      } else if (GDK_2BUTTON_PRESS == event->type) { diff --git a/chrome/browser/gtk/constrained_window_gtk.h b/chrome/browser/gtk/constrained_window_gtk.h index d2003a9..91fa9ac 100644 --- a/chrome/browser/gtk/constrained_window_gtk.h +++ b/chrome/browser/gtk/constrained_window_gtk.h @@ -22,9 +22,6 @@ class ConstrainedWindowGtkDelegate {    // Tells the delegate to either delete itself or set up a task to delete    // itself later.    virtual void DeleteDelegate() = 0; - - protected: -  ~ConstrainedWindowGtkDelegate() {}  };  // Constrained window implementation for the GTK port. Unlike the Win32 system, diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc index 90bb019..815459a 100644 --- a/chrome/browser/gtk/download_item_gtk.cc +++ b/chrome/browser/gtk/download_item_gtk.cc @@ -428,9 +428,9 @@ void DownloadItemGtk::AnimationProgressed(const Animation* animation) {      gtk_widget_queue_draw(progress_area_.get());    } else {      if (IsDangerous()) { -      int progress = static_cast<int>((dangerous_hbox_full_width_ - -                                       dangerous_hbox_start_width_) * -                                      new_item_animation_->GetCurrentValue()); +      int progress = (dangerous_hbox_full_width_ - +                     dangerous_hbox_start_width_) * +                     new_item_animation_->GetCurrentValue();        int showing_width = dangerous_hbox_start_width_ + progress;        gtk_widget_set_size_request(dangerous_hbox_, showing_width, -1);      } else { diff --git a/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc b/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc index 7e499b1..8903ee2 100644 --- a/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc +++ b/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc @@ -29,7 +29,7 @@ DownloadRequestDialogDelegateGtk::DownloadRequestDialogDelegateGtk(      : DownloadRequestDialogDelegate(host),        responded_(false) {    // Create dialog. -  root_.Own(gtk_vbox_new(false, gtk_util::kContentAreaBorder)); +  root_.Own(gtk_vbox_new(NULL, gtk_util::kContentAreaBorder));    GtkWidget* label = gtk_label_new(        l10n_util::GetStringUTF8(IDS_MULTI_DOWNLOAD_WARNING).c_str());    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc index 231aa00..0bf856a 100644 --- a/chrome/browser/gtk/find_bar_gtk.cc +++ b/chrome/browser/gtk/find_bar_gtk.cc @@ -116,7 +116,7 @@ void SetDialogShape(GtkWidget* widget) {        IDR_FIND_DLG_LEFT_BACKGROUND,        IDR_FIND_DLG_MIDDLE_BACKGROUND,        IDR_FIND_DLG_RIGHT_BACKGROUND, -      0, 0, 0, 0, 0, 0); +      NULL, NULL, NULL, NULL, NULL, NULL);      dialog_shape->ChangeWhiteToTransparent();    } @@ -132,7 +132,7 @@ const NineBox* GetDialogBorder() {        IDR_FIND_DIALOG_LEFT,        IDR_FIND_DIALOG_MIDDLE,        IDR_FIND_DIALOG_RIGHT, -      0, 0, 0, 0, 0, 0); +      NULL, NULL, NULL, NULL, NULL, NULL);    }    return dialog_border; @@ -512,7 +512,7 @@ void FindBarGtk::Observe(NotificationType type,                           &kEntryBackgroundColor);      gtk_alignment_set_padding(GTK_ALIGNMENT(content_alignment_), -                              0, 0, 0, 0); +                              0.0, 0.0, 0.0, 0.0);      gtk_widget_modify_bg(border_bin_, GTK_STATE_NORMAL, &kTextBorderColor);      gtk_widget_modify_bg(border_bin_aa_, GTK_STATE_NORMAL, &kTextBorderColorAA); diff --git a/chrome/browser/gtk/gtk_floating_container.cc b/chrome/browser/gtk/gtk_floating_container.cc index 51f9632..b9d0e46 100644 --- a/chrome/browser/gtk/gtk_floating_container.cc +++ b/chrome/browser/gtk/gtk_floating_container.cc @@ -115,7 +115,7 @@ static void gtk_floating_container_class_init(                     G_OBJECT_CLASS_TYPE(object_class),                     static_cast<GSignalFlags>(G_SIGNAL_RUN_FIRST |                                               G_SIGNAL_ACTION), -                   0u, +                   NULL,                     NULL, NULL,                     gtk_marshal_VOID__BOXED,                     G_TYPE_NONE, 1, diff --git a/chrome/browser/gtk/info_bubble_gtk.h b/chrome/browser/gtk/info_bubble_gtk.h index eb88724..137b395 100644 --- a/chrome/browser/gtk/info_bubble_gtk.h +++ b/chrome/browser/gtk/info_bubble_gtk.h @@ -34,9 +34,6 @@ class InfoBubbleGtkDelegate {    // NOTE: The Views interface has CloseOnEscape, except I can't find a place    // where it ever returns false, so we always allow you to close via escape. - - protected: -  ~InfoBubbleGtkDelegate() {}  };  class InfoBubbleGtk : public NotificationObserver { diff --git a/chrome/browser/gtk/slide_animator_gtk.cc b/chrome/browser/gtk/slide_animator_gtk.cc index 519a58f..866aca5 100644 --- a/chrome/browser/gtk/slide_animator_gtk.cc +++ b/chrome/browser/gtk/slide_animator_gtk.cc @@ -107,8 +107,8 @@ bool SlideAnimatorGtk::IsClosing() {  }  void SlideAnimatorGtk::AnimationProgressed(const Animation* animation) { -  int showing_height = static_cast<int>(child_->allocation.height * -                                        animation_->GetCurrentValue()); +  int showing_height = child_->allocation.height * +                       animation_->GetCurrentValue();    if (direction_ == DOWN) {      gtk_fixed_move(GTK_FIXED(widget_.get()), child_, 0,                     showing_height - child_->allocation.height); diff --git a/chrome/browser/gtk/slide_animator_gtk.h b/chrome/browser/gtk/slide_animator_gtk.h index 547ae83..a4cf657 100644 --- a/chrome/browser/gtk/slide_animator_gtk.h +++ b/chrome/browser/gtk/slide_animator_gtk.h @@ -28,9 +28,6 @@ class SlideAnimatorGtk : public AnimationDelegate {     public:      // Called when a call to Close() finishes animating.      virtual void Closed() = 0; - -   protected: -    ~Delegate() {}    };    enum Direction { diff --git a/chrome/browser/gtk/tab_contents_drag_source.cc b/chrome/browser/gtk/tab_contents_drag_source.cc index 7953ba8..b27ef57 100644 --- a/chrome/browser/gtk/tab_contents_drag_source.cc +++ b/chrome/browser/gtk/tab_contents_drag_source.cc @@ -112,9 +112,7 @@ void TabContentsDragSource::DidProcessEvent(GdkEvent* event) {    if (tab_contents()->render_view_host()) {      tab_contents()->render_view_host()->DragSourceMovedTo( -        client.x(), client.y(), -        static_cast<int>(event_motion->x_root), -        static_cast<int>(event_motion->y_root)); +        client.x(), client.y(), event_motion->x_root, event_motion->y_root);    }  } diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc index 5809cd1..2ddb607 100644 --- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc +++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc @@ -263,9 +263,8 @@ void DraggedTabGtk::SetContainerShapeMask(GdkPixbuf* pixbuf) {      // border).      cairo_identity_matrix(cairo_context);      cairo_set_source_rgba(cairo_context, 1.0f, 1.0f, 1.0f, 1.0f); -    int tab_height = static_cast<int>(kScalingFactor * -                                      gdk_pixbuf_get_height(pixbuf) - -                                      kDragFrameBorderSize); +    int tab_height = kScalingFactor * gdk_pixbuf_get_height(pixbuf) - +                     kDragFrameBorderSize;      cairo_rectangle(cairo_context,                      0, tab_height,                      size.width(), size.height() - tab_height); @@ -296,10 +295,8 @@ gboolean DraggedTabGtk::OnExposeEvent(GtkWidget* widget,    }    // Only used when not attached. -  int tab_height = static_cast<int>(kScalingFactor * -                                    gdk_pixbuf_get_height(pixbuf)); -  int tab_width = static_cast<int>(kScalingFactor * -                                   gdk_pixbuf_get_width(pixbuf)); +  int tab_height = kScalingFactor * gdk_pixbuf_get_height(pixbuf); +  int tab_width = kScalingFactor * gdk_pixbuf_get_width(pixbuf);    // Draw the render area.    if (dragged_tab->backing_store_ && !dragged_tab->attached_) { diff --git a/chrome/browser/gtk/tabs/tab_gtk.h b/chrome/browser/gtk/tabs/tab_gtk.h index 2667b42..dd8547b 100644 --- a/chrome/browser/gtk/tabs/tab_gtk.h +++ b/chrome/browser/gtk/tabs/tab_gtk.h @@ -73,9 +73,6 @@ class TabGtk : public TabRendererGtk,      // Returns the theme provider for icons and colors.      virtual ThemeProvider* GetThemeProvider() = 0; - -   protected: -    ~TabDelegate() {}    };    explicit TabGtk(TabDelegate* delegate); diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 867d9245..6a60e2b 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -236,9 +236,7 @@ TabRendererGtk::TabRendererGtk(ThemeProvider* theme_provider)        fav_icon_hiding_offset_(0),        should_display_crashed_favicon_(false),        loading_animation_(theme_provider), -      // Zero is not a valid SkColor.  It'll be replaced by the -      // theme tab_text_color. -      close_button_color_(0u) { +      close_button_color_(NULL) {    InitResources();    data_.pinned = false; @@ -592,7 +590,7 @@ void TabRendererGtk::Layout() {      if (theme_provider_) {        SkColor tab_text_color =          theme_provider_->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT); -      if (close_button_color_ == 0u || tab_text_color != close_button_color_) { +      if (!close_button_color_ || tab_text_color != close_button_color_) {          close_button_color_ = tab_text_color;          ResourceBundle& rb = ResourceBundle::GetSharedInstance();          close_button_->SetBackground(close_button_color_, diff --git a/chrome/browser/gtk/view_id_util.h b/chrome/browser/gtk/view_id_util.h index 6c6f328..1ec65e8 100644 --- a/chrome/browser/gtk/view_id_util.h +++ b/chrome/browser/gtk/view_id_util.h @@ -15,8 +15,6 @@ class ViewIDUtil {    class Delegate {     public:      virtual GtkWidget* GetWidgetForViewID(ViewID id) = 0; -   protected: -    ~Delegate() {}    };    static void SetID(GtkWidget* widget, ViewID id); diff --git a/chrome/browser/history/expire_history_backend.h b/chrome/browser/history/expire_history_backend.h index 4c64acb..dc37044 100644 --- a/chrome/browser/history/expire_history_backend.h +++ b/chrome/browser/history/expire_history_backend.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ -#define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ +#ifndef CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ +#define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__  #include <queue>  #include <set> @@ -36,9 +36,6 @@ class BroadcastNotificationDelegate {    // thread. The details argument will have ownership taken by this function.    virtual void BroadcastNotifications(NotificationType type,                                        HistoryDetails* details_deleted) = 0; - - protected: -  ~BroadcastNotificationDelegate() {}  };  // Encapsulates visit expiration criteria and type of visits to expire. @@ -280,4 +277,4 @@ class ExpireHistoryBackend {  }  // namespace history -#endif  // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ +#endif  // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h index 846da67..36b5193 100644 --- a/chrome/browser/history/history_backend.h +++ b/chrome/browser/history/history_backend.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -95,7 +95,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,                   Delegate* delegate,                   BookmarkService* bookmark_service); -  virtual ~HistoryBackend(); +  ~HistoryBackend();    // Must be called after creation but before any objects are created. If this    // fails, all other functions will fail as well. (Since this runs on another diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h index 9a7f36d..c967374 100644 --- a/chrome/browser/history/history_types.h +++ b/chrome/browser/history/history_types.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ -#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ +#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__ +#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__  #include <map>  #include <set> @@ -73,7 +73,6 @@ class URLRow {      // Initialize will not set the URL, so our initialization above will stay.      Initialize();    } -  virtual ~URLRow() {}    URLID id() const { return id_; }    const GURL& url() const { return url_; } @@ -521,4 +520,4 @@ struct KeywordSearchTermVisit {  }  // history -#endif  // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ +#endif  // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H__ diff --git a/chrome/browser/history/starred_url_database.cc b/chrome/browser/history/starred_url_database.cc index 38124aa2..b56bcd9 100644 --- a/chrome/browser/history/starred_url_database.cc +++ b/chrome/browser/history/starred_url_database.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -545,10 +545,10 @@ bool StarredURLDatabase::MigrateBookmarksToFileImpl(const FilePath& path) {    // Create the bookmark bar and other folder nodes.    history::StarredEntry entry;    entry.type = history::StarredEntry::BOOKMARK_BAR; -  BookmarkNode bookmark_bar_node(0, GURL()); +  BookmarkNode bookmark_bar_node(NULL, GURL());    bookmark_bar_node.Reset(entry);    entry.type = history::StarredEntry::OTHER; -  BookmarkNode other_node(0, GURL()); +  BookmarkNode other_node(NULL, GURL());    other_node.Reset(entry);    std::map<history::UIStarID, history::StarID> group_id_to_id_map; @@ -597,7 +597,7 @@ bool StarredURLDatabase::MigrateBookmarksToFileImpl(const FilePath& path) {        // encountering the details.        // The created nodes are owned by the root node. -      node = new BookmarkNode(0, i->url); +      node = new BookmarkNode(NULL, i->url);        id_to_node_map[i->id] = node;      }      node->Reset(*i); @@ -608,7 +608,7 @@ bool StarredURLDatabase::MigrateBookmarksToFileImpl(const FilePath& path) {      BookmarkNode* parent = id_to_node_map[parent_id];      if (!parent) {        // Haven't encountered the parent yet, create it now. -      parent = new BookmarkNode(0, GURL()); +      parent = new BookmarkNode(NULL, GURL());        id_to_node_map[parent_id] = parent;      } diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h index 30788ad..af4a10a 100644 --- a/chrome/browser/icon_loader.h +++ b/chrome/browser/icon_loader.h @@ -43,8 +43,6 @@ class IconLoader : public base::RefCountedThreadSafe<IconLoader> {      // icon has been successfully loaded, result is non-null. This method must      // return true if it is taking ownership of the returned bitmap.      virtual bool OnBitmapLoaded(IconLoader* source, SkBitmap* result) = 0; -   protected: -    ~Delegate() {}    };    IconLoader(const IconGroupID& group, IconSize size, Delegate* delegate); diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc index 624a4e9..28a9365 100644 --- a/chrome/browser/importer/firefox_importer_utils.cc +++ b/chrome/browser/importer/firefox_importer_utils.cc @@ -21,8 +21,8 @@ namespace {  // the search URL when importing search engines.  class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter {   public: -  FirefoxURLParameterFilter() {} -  virtual ~FirefoxURLParameterFilter() {} +  FirefoxURLParameterFilter() { } +  ~FirefoxURLParameterFilter() { }    // TemplateURLParser::ParameterFilter method.    virtual bool KeepParameter(const std::string& key, diff --git a/chrome/browser/input_window_dialog.h b/chrome/browser/input_window_dialog.h index 0a93bcea..56bdfb9 100644 --- a/chrome/browser/input_window_dialog.h +++ b/chrome/browser/input_window_dialog.h @@ -15,7 +15,7 @@ class InputWindowDialog {   public:    class Delegate {     public: -    virtual ~Delegate() {} +    virtual ~Delegate() { }      // Checks whether |text| is a valid input string.      virtual bool IsValid(const std::wstring& text) = 0; @@ -42,8 +42,7 @@ class InputWindowDialog {    virtual void Close() = 0;   protected: -  InputWindowDialog() {} -  ~InputWindowDialog() {} +  InputWindowDialog() { }   private:    DISALLOW_COPY_AND_ASSIGN(InputWindowDialog); diff --git a/chrome/browser/location_bar.h b/chrome/browser/location_bar.h index f9d178f..c8e9293 100644 --- a/chrome/browser/location_bar.h +++ b/chrome/browser/location_bar.h @@ -64,17 +64,12 @@ class LocationBar {    // Returns a pointer to the testing interface.    virtual LocationBarTesting* GetLocationBarForTesting() = 0; - - protected: -  ~LocationBar() {}  };  class LocationBarTesting {   public:    // Returns the number of visible page actions in the Omnibox.    virtual int PageActionVisibleCount() = 0; - protected: -  ~LocationBarTesting() {}  };  #endif  // CHROME_BROWSER_LOCATION_BAR_H_ diff --git a/chrome/browser/login_model.h b/chrome/browser/login_model.h index 6d764be..cbd2fef 100644 --- a/chrome/browser/login_model.h +++ b/chrome/browser/login_model.h @@ -15,8 +15,6 @@ class LoginModelObserver {    // as a match for the pending login prompt.    virtual void OnAutofillDataAvailable(const std::wstring& username,                                         const std::wstring& password) = 0; - protected: -  ~LoginModelObserver() {}  };  class LoginModel { @@ -25,8 +23,6 @@ class LoginModel {    // observer can be null, signifying there is no longer any observer    // interested in the data.    virtual void SetObserver(LoginModelObserver* observer) = 0; - protected: -  ~LoginModel() {}  };  #endif  // CHROME_BROWSER_LOGIN_MODEL_H_ diff --git a/chrome/browser/login_prompt.h b/chrome/browser/login_prompt.h index 3ba1aad..6279c7a 100644 --- a/chrome/browser/login_prompt.h +++ b/chrome/browser/login_prompt.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -64,9 +64,6 @@ class LoginHandler {    // Notify the handler that the request was cancelled.    // This function can only be called from the IO thread.    virtual void OnRequestCancelled() = 0; - - protected: -  ~LoginHandler() {}  };  // Details to provide the NotificationObserver.  Used by the automation proxy diff --git a/chrome/browser/login_prompt_gtk.cc b/chrome/browser/login_prompt_gtk.cc index a8f4316..dda0e15 100644 --- a/chrome/browser/login_prompt_gtk.cc +++ b/chrome/browser/login_prompt_gtk.cc @@ -83,7 +83,7 @@ class LoginHandlerGtk : public LoginHandler,                                             std::wstring explanation) {      DCHECK(MessageLoop::current() == ui_loop_); -    root_.Own(gtk_vbox_new(false, gtk_util::kContentAreaBorder)); +    root_.Own(gtk_vbox_new(NULL, gtk_util::kContentAreaBorder));      GtkWidget* label = gtk_label_new(WideToUTF8(explanation).c_str());      gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);      gtk_box_pack_start(GTK_BOX(root_.get()), label, FALSE, FALSE, 0); diff --git a/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc b/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc index 492ddf8..9e79623 100644 --- a/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc +++ b/chrome/browser/net/resolve_proxy_msg_helper_unittest.cc @@ -225,7 +225,7 @@ TEST(ResolveProxyMsgHelperTest, CancelPendingRequests) {    EXPECT_EQ(0u, resolver->pending_requests().size()); -  EXPECT_TRUE(NULL == delegate.pending_result()); +  EXPECT_EQ(NULL, delegate.pending_result());    // It should also be the case that msg1, msg2, msg3 were deleted by the    // cancellation. (Else will show up as a leak in Purify/Valgrind). diff --git a/chrome/browser/net/url_fetcher.h b/chrome/browser/net/url_fetcher.h index 28ec2c5..6b1c87c 100644 --- a/chrome/browser/net/url_fetcher.h +++ b/chrome/browser/net/url_fetcher.h @@ -75,8 +75,6 @@ class URLFetcher {                                      int response_code,                                      const ResponseCookies& cookies,                                      const std::string& data) = 0; -   protected: -    ~Delegate() {}    };    // URLFetcher::Create uses the currently registered Factory to create the @@ -87,8 +85,6 @@ class URLFetcher {                                           const GURL& url,                                           RequestType request_type,                                           Delegate* d) = 0; -   protected: -    ~Factory() {}    };    // |url| is the URL to send the request to. diff --git a/chrome/browser/page_info_model.h b/chrome/browser/page_info_model.h index 994549e..526372e 100644 --- a/chrome/browser/page_info_model.h +++ b/chrome/browser/page_info_model.h @@ -23,8 +23,6 @@ class PageInfoModel {    class PageInfoModelObserver {      public:       virtual void ModelChanged() = 0; -    protected: -     ~PageInfoModelObserver() {}    };    // Because the UI on the Mac is statically laid-out, this enum provides the diff --git a/chrome/browser/parsers/metadata_parser.h b/chrome/browser/parsers/metadata_parser.h index 9a8d80d..97a4e85 100644 --- a/chrome/browser/parsers/metadata_parser.h +++ b/chrome/browser/parsers/metadata_parser.h @@ -13,7 +13,6 @@  class MetadataPropertyIterator {   public:    MetadataPropertyIterator() {} -  virtual ~MetadataPropertyIterator() {}    // Gets the next Property in the iterator.  Returns false if at the end    // of the list. @@ -30,7 +29,6 @@ class MetadataPropertyIterator {  class MetadataParser {   public:    MetadataParser(const FilePath& path) {} -  virtual ~MetadataParser() {}    static const char* kPropertyType;    static const char* kPropertyFilesize; diff --git a/chrome/browser/parsers/metadata_parser_factory.h b/chrome/browser/parsers/metadata_parser_factory.h index 9c291c4..c42e01d 100644 --- a/chrome/browser/parsers/metadata_parser_factory.h +++ b/chrome/browser/parsers/metadata_parser_factory.h @@ -12,7 +12,6 @@  class MetadataParserFactory {   public:    MetadataParserFactory() {} -  virtual ~MetadataParserFactory() {}    // Used to check to see if the parser can parse the given file. This    // should not do any additional reading of the file. diff --git a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc index e79d969..e49cbcb 100644 --- a/chrome/browser/parsers/metadata_parser_jpeg_factory.cc +++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.cc @@ -11,8 +11,6 @@  MetadataParserJpegFactory::MetadataParserJpegFactory()      : MetadataParserFactory(){} -MetadataParserJpegFactory::~MetadataParserJpegFactory() {} -  bool MetadataParserJpegFactory::CanParse(const FilePath& path,                                           char* bytes,                                           int bytes_size) { diff --git a/chrome/browser/parsers/metadata_parser_jpeg_factory.h b/chrome/browser/parsers/metadata_parser_jpeg_factory.h index 68399fe..48c059b 100644 --- a/chrome/browser/parsers/metadata_parser_jpeg_factory.h +++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.h @@ -15,9 +15,6 @@ class MetadataParserJpegFactory : public MetadataParserFactory {    virtual bool CanParse(const FilePath& path, char* bytes, int bytes_size);    virtual MetadataParser* CreateParser(const FilePath& path); - protected: -  ~MetadataParserJpegFactory(); -   private:    DISALLOW_COPY_AND_ASSIGN(MetadataParserJpegFactory);  }; diff --git a/chrome/browser/possible_url_model.h b/chrome/browser/possible_url_model.h index 45403a9..4a688fe 100644 --- a/chrome/browser/possible_url_model.h +++ b/chrome/browser/possible_url_model.h @@ -78,7 +78,7 @@ class PossibleURLModel : public TableModel {    TableModelObserver* observer_;    // Our consumer for favicon requests. -  CancelableRequestConsumerT<size_t, 0> consumer_; +  CancelableRequestConsumerT<size_t, NULL> consumer_;    // The results we're showing.    std::vector<Result> results_; diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 916ff9db..2727879 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -136,9 +136,6 @@ class RenderViewHostDelegate {      // The content's intrinsic width (prefWidth) changed.      virtual void UpdatePreferredWidth(int pref_width) = 0; - -   protected: -    ~View() {}    };    // RendererManagerment ------------------------------------------------------- @@ -164,9 +161,6 @@ class RenderViewHostDelegate {      // Called the ResourceDispatcherHost's associate CrossSiteRequestHandler      // when a cross-site navigation has been canceled.      virtual void OnCrossSiteNavigationCanceled() = 0; - -   protected: -    ~RendererManagement() {}    };    // BrowserIntegration -------------------------------------------------------- @@ -213,9 +207,6 @@ class RenderViewHostDelegate {      virtual void OnDidGetApplicationInfo(          int32 page_id,          const webkit_glue::WebApplicationInfo& app_info) = 0; - -   protected: -    ~BrowserIntegration() {}    };    // Resource ------------------------------------------------------------------ @@ -272,9 +263,6 @@ class RenderViewHostDelegate {      // Notification that a document has been loaded in a frame.      virtual void DocumentLoadedInFrame() = 0; - -   protected: -    ~Resource() {}    };    // Save ---------------------------------------------------------------------- @@ -300,9 +288,6 @@ class RenderViewHostDelegate {      virtual void OnReceivedSerializedHtmlData(const GURL& frame_url,                                                const std::string& data,                                                int32 status) = 0; - -   protected: -    ~Save() {}    };    // Printing ------------------------------------------------------------------ @@ -318,9 +303,6 @@ class RenderViewHostDelegate {      // EMF memory mapped data.      virtual void DidPrintPage(          const ViewHostMsg_DidPrintPage_Params& params) = 0; - -   protected: -    ~Printing() {}    };    // FavIcon ------------------------------------------------------------------- @@ -344,9 +326,6 @@ class RenderViewHostDelegate {      virtual void UpdateFavIconURL(RenderViewHost* render_view_host,                                    int32 page_id,                                    const GURL& icon_url) = 0; - -   protected: -    ~FavIcon() {}    };    // AutoFill ------------------------------------------------------------------ @@ -373,9 +352,6 @@ class RenderViewHostDelegate {      // autofill suggestion from the database.      virtual void RemoveAutofillEntry(const std::wstring& field_name,                                       const std::wstring& value) = 0; - -   protected: -    ~Autofill() {}    };    // --------------------------------------------------------------------------- @@ -421,7 +397,7 @@ class RenderViewHostDelegate {    // The RenderView is going to be deleted. This is called when each    // RenderView is going to be destroyed -  virtual void RenderViewDeleted(RenderViewHost* render_view_host) {} +  virtual void RenderViewDeleted(RenderViewHost* render_view_host) { }    // The RenderView was navigated to a different page.    virtual void DidNavigate(RenderViewHost* render_view_host, @@ -566,9 +542,6 @@ class RenderViewHostDelegate {    // The RenderView has inserted one css file into page.    virtual void DidInsertCSS() {} - - protected: -  ~RenderViewHostDelegate() {}  };  #endif  // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index 2397c79..40fba47 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -96,7 +96,7 @@ RenderWidgetHost::~RenderWidgetHost() {  gfx::NativeViewId RenderWidgetHost::GetNativeViewId() {    if (view_)      return gfx::IdFromNativeView(view_->GetNativeView()); -  return 0; +  return NULL;  }  void RenderWidgetHost::Init() { diff --git a/chrome/browser/renderer_host/render_widget_host_painting_observer.h b/chrome/browser/renderer_host/render_widget_host_painting_observer.h index 652ec47..d24b61a 100644 --- a/chrome/browser/renderer_host/render_widget_host_painting_observer.h +++ b/chrome/browser/renderer_host/render_widget_host_painting_observer.h @@ -19,9 +19,6 @@ class RenderWidgetHostPaintingObserver {    // Indicates that the RenderWidgetHost just updated the backing store.    virtual void WidgetDidUpdateBackingStore(RenderWidgetHost* widget) = 0; - - protected: -  ~RenderWidgetHostPaintingObserver() {}  };  #endif  // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 8df6c4c..c8183bb 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -735,7 +735,7 @@ void ResourceMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {    // Loads default settings. This is asynchronous, only the IPC message sender    // will hang until the settings are retrieved.    printer_query->GetSettings(printing::PrinterQuery::DEFAULTS, -                             0, +                             NULL,                               0,                               false,                               task); diff --git a/chrome/browser/safe_browsing/database_perftest.cc b/chrome/browser/safe_browsing/database_perftest.cc index b25f419..bbf4839 100644 --- a/chrome/browser/safe_browsing/database_perftest.cc +++ b/chrome/browser/safe_browsing/database_perftest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -33,7 +33,7 @@ class Database {    Database() : db_(NULL) {    } -  virtual ~Database() { +  ~Database() {      if (db_) {        sqlite3_close(db_);        db_ = NULL; diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h index c3c6ec7..280ffbb 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.h +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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.  // @@ -136,12 +136,12 @@ class SafeBrowsingBlockingPage : public InterstitialPage {  // Factory for creating SafeBrowsingBlockingPage.  Useful for tests.  class SafeBrowsingBlockingPageFactory {   public: +  ~SafeBrowsingBlockingPageFactory() { } +    virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage(        SafeBrowsingService* service,        TabContents* tab_contents,        const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; - protected: -  ~SafeBrowsingBlockingPageFactory() {}  };  #endif  // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ diff --git a/chrome/browser/search_engines/edit_search_engine_controller.h b/chrome/browser/search_engines/edit_search_engine_controller.h index 40bba57..6333dbf 100644 --- a/chrome/browser/search_engines/edit_search_engine_controller.h +++ b/chrome/browser/search_engines/edit_search_engine_controller.h @@ -23,8 +23,6 @@ class EditSearchEngineControllerDelegate {                                 const std::wstring& title,                                 const std::wstring& keyword,                                 const std::wstring& url) = 0; - protected: -  ~EditSearchEngineControllerDelegate() {}  };  // EditSearchEngineController provides the core platform independent logic diff --git a/chrome/browser/search_engines/template_url_model.h b/chrome/browser/search_engines/template_url_model.h index f584580..c0e169b 100644 --- a/chrome/browser/search_engines/template_url_model.h +++ b/chrome/browser/search_engines/template_url_model.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef CHROME_BROWSER_TEMPLATE_URL_MODEL_H_ -#define CHROME_BROWSER_TEMPLATE_URL_MODEL_H_ +#ifndef CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ +#define CHROME_BROWSER_TEMPLATE_URL_MODEL_H__  #include <map>  #include <string> @@ -48,8 +48,6 @@ class TemplateURLModelObserver {   public:    // Notification that the template url model has changed in some way.    virtual void OnTemplateURLModelChanged() = 0; - protected: -  ~TemplateURLModelObserver() {}  };  class TemplateURLModel : public WebDataServiceConsumer, @@ -353,4 +351,4 @@ class TemplateURLModel : public WebDataServiceConsumer,    DISALLOW_EVIL_CONSTRUCTORS(TemplateURLModel);  }; -#endif  // CHROME_BROWSER_TEMPLATE_URL_MODEL_H_ +#endif  // CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ diff --git a/chrome/browser/search_engines/template_url_parser.h b/chrome/browser/search_engines/template_url_parser.h index dfb139c..65a4881 100644 --- a/chrome/browser/search_engines/template_url_parser.h +++ b/chrome/browser/search_engines/template_url_parser.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef CHROME_BROWSER_TEMPLATE_URL_PARSER_H_ -#define CHROME_BROWSER_TEMPLATE_URL_PARSER_H_ +#ifndef CHROME_BROWSER_TEMPLATE_URL_PARSER_H__ +#define CHROME_BROWSER_TEMPLATE_URL_PARSER_H__  #include <string> @@ -21,8 +21,6 @@ class TemplateURLParser {      // methods returns false, the parameter is not included.      virtual bool KeepParameter(const std::string& key,                                 const std::string& value) = 0; -   protected: -    ~ParameterFilter() {}    };    // Decodes the chunk of data representing a TemplateURL. If data does    // not describe a valid TemplateURL false is returned. Additionally, if the @@ -46,4 +44,4 @@ class TemplateURLParser {    DISALLOW_EVIL_CONSTRUCTORS(TemplateURLParser);  }; -#endif // CHROME_BROWSER_TEMPLATE_URL_PARSER_H_ +#endif // CHROME_BROWSER_TEMPLATE_URL_PARSER_H__ diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h index 5e980e4..a3e611c 100644 --- a/chrome/browser/sessions/tab_restore_service.h +++ b/chrome/browser/sessions/tab_restore_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -41,9 +41,6 @@ class TabRestoreService : public BaseSessionService {      // Sent to all remaining Observers when TabRestoreService's      // destructor is run.      virtual void TabRestoreServiceDestroyed(TabRestoreService* service) = 0; - -   protected: -    ~Observer() {}    };    // Interface used to allow the test to provide a custom time. diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h index 5098fb4..f9a3baa 100644 --- a/chrome/browser/shell_dialogs.h +++ b/chrome/browser/shell_dialogs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -27,9 +27,6 @@ class BaseShellDialog {    // Notifies the dialog box that the listener has been destroyed and it should    // no longer be sent notifications.    virtual void ListenerDestroyed() = 0; - - protected: -  ~BaseShellDialog() {}  };  // Shows a dialog box for selecting a file or a folder. @@ -67,9 +64,6 @@ class SelectFileDialog      // the  user canceling or closing the selection dialog box, for example).      // |params| is contextual passed to SelectFile.      virtual void FileSelectionCanceled(void* params) {}; - -   protected: -    ~Listener() {};    };    // Creates a dialog box helper. This object is ref-counted, but the returned @@ -146,8 +140,6 @@ class SelectFontDialog      // canceling or closing the selection dialog box, for example). |params| is      // contextual passed to SelectFile.      virtual void FontSelectionCanceled(void* params) {}; -   protected: -    ~Listener() {};    };    // Creates a dialog box helper. This object is ref-counted, but the returned diff --git a/chrome/browser/spellchecker.cc b/chrome/browser/spellchecker.cc index b6a990b..b8bcc7f 100644 --- a/chrome/browser/spellchecker.cc +++ b/chrome/browser/spellchecker.cc @@ -547,7 +547,7 @@ void SpellChecker::GetAutoCorrectionWord(const std::wstring& word,    const wchar_t* word_char = word.c_str();    for (int i = 0; i <= kMaxAutoCorrectWordSize; i++) {      if (i >= word_length) -      misspelled_word[i] = 0; +      misspelled_word[i] = NULL;      else        misspelled_word[i] = word_char[i];    } diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h index 3156bfc..b83e16a 100644 --- a/chrome/browser/ssl/ssl_blocking_page.h +++ b/chrome/browser/ssl/ssl_blocking_page.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -31,9 +31,6 @@ class SSLBlockingPage : public InterstitialPage {      // Notification that the user chose to accept the certificate.      virtual void OnAllowCertificate(SSLCertErrorHandler* handler) = 0; - -   protected: -    ~Delegate() {}    };    SSLBlockingPage(SSLCertErrorHandler* handler, Delegate* delegate); diff --git a/chrome/browser/ssl/ssl_policy.h b/chrome/browser/ssl/ssl_policy.h index ebabd3b..48a5f0d 100644 --- a/chrome/browser/ssl/ssl_policy.h +++ b/chrome/browser/ssl/ssl_policy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -26,7 +26,6 @@ class SSLRequestInfo;  class SSLPolicy : public SSLBlockingPage::Delegate {   public:    explicit SSLPolicy(SSLPolicyBackend* backend); -  virtual ~SSLPolicy() {}    // An error occurred with the certificate in an SSL connection.    void OnCertError(SSLCertErrorHandler* handler); diff --git a/chrome/browser/tab_contents/constrained_window.h b/chrome/browser/tab_contents/constrained_window.h index 8719e65..a1b8c2a 100644 --- a/chrome/browser/tab_contents/constrained_window.h +++ b/chrome/browser/tab_contents/constrained_window.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -42,8 +42,6 @@ class ConstrainedWindow {    // Closes the Constrained Window.    virtual void CloseConstrainedWindow() = 0; - protected: -  ~ConstrainedWindow() {}  };  #endif  // CHROME_BROWSER_TAB_CONTENTS_CONSTRAINED_WINDOW_H_ diff --git a/chrome/browser/tab_contents/page_navigator.h b/chrome/browser/tab_contents/page_navigator.h index 328971a..7d203e3 100644 --- a/chrome/browser/tab_contents/page_navigator.h +++ b/chrome/browser/tab_contents/page_navigator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -21,8 +21,6 @@ class PageNavigator {    virtual void OpenURL(const GURL& url, const GURL& referrer,                         WindowOpenDisposition disposition,                         PageTransition::Type transition) = 0; - protected: -  ~PageNavigator() {}  };  #endif  // CHROME_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_ diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h index 641ca5e..4f9e600 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h @@ -28,7 +28,6 @@ class TabContents;  class RenderViewHostDelegateViewHelper {   public:    RenderViewHostDelegateViewHelper() {} -  virtual ~RenderViewHostDelegateViewHelper() {}    virtual void CreateNewWindow(int route_id,                                 base::WaitableEvent* modal_dialog_event, diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h index 874febd..8c8dde2 100644 --- a/chrome/browser/tab_contents/render_view_host_manager.h +++ b/chrome/browser/tab_contents/render_view_host_manager.h @@ -59,9 +59,6 @@ class RenderViewHostManager      // is none.      virtual NavigationEntry*          GetLastCommittedNavigationEntryForRenderManager() = 0; - -   protected: -    ~Delegate() {}    };    // Both delegate pointers must be non-NULL and are not owned by this class. diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc index fac89e0..47426c4 100644 --- a/chrome/browser/tab_contents/web_contents_unittest.cc +++ b/chrome/browser/tab_contents/web_contents_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -41,7 +41,7 @@ static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params,  // Subclass the TestingProfile so that it can return certain services we need.  class TabContentsTestingProfile : public TestingProfile {   public: -  TabContentsTestingProfile() : TestingProfile() {} +  TabContentsTestingProfile() : TestingProfile() { }    virtual PrefService* GetPrefs() {      if (!prefs_.get()) { @@ -70,8 +70,6 @@ class TestInterstitialPage : public InterstitialPage {     public:      virtual void TestInterstitialPageDeleted(          TestInterstitialPage* interstitial) = 0; -   protected: -    ~Delegate() {}    };    // IMPORTANT NOTE: if you pass stack allocated values for |state| and diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h index e776d6c..4f1d44b 100644 --- a/chrome/browser/tabs/tab_strip_model.h +++ b/chrome/browser/tabs/tab_strip_model.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -47,21 +47,21 @@ class TabStripModelObserver {    // (selected).    virtual void TabInsertedAt(TabContents* contents,                               int index, -                             bool foreground) {} +                             bool foreground) { }    // The specified TabContents at |index| is being closed (and eventually    // destroyed). -  virtual void TabClosingAt(TabContents* contents, int index) {} +  virtual void TabClosingAt(TabContents* contents, int index) { }    // The specified TabContents at |index| is being detached, perhaps to be    // inserted in another TabStripModel. The implementer should take whatever    // action is necessary to deal with the TabContents no longer being present. -  virtual void TabDetachedAt(TabContents* contents, int index) {} +  virtual void TabDetachedAt(TabContents* contents, int index) { }    // The selected TabContents is about to change from |old_contents| at |index|.    // This gives observers a chance to prepare for an impending switch before it    // happens. -  virtual void TabDeselectedAt(TabContents* contents, int index) {} +  virtual void TabDeselectedAt(TabContents* contents, int index) { }    // The selected TabContents changed from |old_contents| to |new_contents| at    // |index|. |user_gesture| specifies whether or not this was done by a user @@ -70,14 +70,14 @@ class TabStripModelObserver {    virtual void TabSelectedAt(TabContents* old_contents,                               TabContents* new_contents,                               int index, -                             bool user_gesture) {} +                             bool user_gesture) { }    // The specified TabContents at |from_index| was moved to |to_index|. If    // the pinned state of the tab is changing |pinned_state_changed| is true.    virtual void TabMoved(TabContents* contents,                          int from_index,                          int to_index, -                        bool pinned_state_changed) {} +                        bool pinned_state_changed) { }    // The specified TabContents at |index| changed in some way. |contents| may    // be an entirely different object and the old value is no longer available @@ -92,21 +92,18 @@ class TabStripModelObserver {    // without updating the title (which may be an ugly URL if the real title    // hasn't come in yet).    virtual void TabChangedAt(TabContents* contents, int index, -                            bool loading_only) {} +                            bool loading_only) { }    // Invoked when the pinned state of a tab changes.    // NOTE: this is only invoked if the tab doesn't move as a result of its    // pinned state changing. If the tab moves as a result, the observer is    // notified by way of the TabMoved method with |pinned_state_changed| true. -  virtual void TabPinnedStateChanged(TabContents* contents, int index) {} +  virtual void TabPinnedStateChanged(TabContents* contents, int index) { }    // The TabStripModel now no longer has any "significant" (user created or    // user manipulated) tabs. The implementer may use this as a trigger to try    // and close the window containing the TabStripModel, for example... -  virtual void TabStripEmpty() {} - - protected: -  ~TabStripModelObserver() {} +  virtual void TabStripEmpty() { }  };  /////////////////////////////////////////////////////////////////////////////// @@ -202,9 +199,6 @@ class TabStripModelDelegate {    // Returns whether some contents can be closed.    virtual bool CanCloseContentsAt(int index) = 0; - - protected: -  ~TabStripModelDelegate() {}  };  //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h index 2c008c3..f15911b 100644 --- a/chrome/browser/webdata/web_data_service.h +++ b/chrome/browser/webdata/web_data_service.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ -#define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ +#ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ +#define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__  #include <map>  #include <vector> @@ -240,7 +240,7 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> {            arg2_(arg2) {      } -    virtual ~GenericRequest2() {} +    virtual ~GenericRequest2() { }      T GetArgument1() {        return arg1_; @@ -539,9 +539,6 @@ class WebDataServiceConsumer {    // not be opened. The result object is destroyed after this call.    virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,                                             const WDTypedResult* result) = 0; - - protected: -  ~WebDataServiceConsumer() {}  }; -#endif  // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H_ +#endif  // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc index 0cc76fa..cf67d15 100644 --- a/chrome/common/child_process_host.cc +++ b/chrome/common/child_process_host.cc @@ -206,7 +206,7 @@ void ChildProcessHost::OnChildDied() {    // On POSIX, once we've called DidProcessCrash, handle() is no longer    // valid.  Ensure the destructor doesn't try to use it. -  set_handle(0); +  set_handle(NULL);    delete this;  } diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc index 09b320b..fb40330 100644 --- a/chrome/common/extensions/extension_unittest.cc +++ b/chrome/common/extensions/extension_unittest.cc @@ -293,7 +293,7 @@ TEST(ExtensionTest, LoadPageActionHelper) {    DictionaryValue input;    // First try with an empty dictionary. We should get nothing back. -  ASSERT_TRUE(NULL == extension.LoadPageActionHelper(&input, 0, &error_msg)); +  ASSERT_EQ(NULL, extension.LoadPageActionHelper(&input, 0, &error_msg));    ASSERT_STRNE("", error_msg.c_str());    error_msg = ""; diff --git a/chrome/common/gtk_tree.h b/chrome/common/gtk_tree.h index 4e74efa..8caa64c 100644 --- a/chrome/common/gtk_tree.h +++ b/chrome/common/gtk_tree.h @@ -43,9 +43,6 @@ class ModelAdapter : public TableModelObserver {      // after clearing the list store.  Can be overriden by the delegate if it      // needs to do extra initialization before the list store is populated.      virtual void OnModelChanged() {} - -   protected: -    ~Delegate() {}    };    // |table_model| may be NULL. diff --git a/chrome/common/property_bag_unittest.cc b/chrome/common/property_bag_unittest.cc index 6dca90c..51db07c 100644 --- a/chrome/common/property_bag_unittest.cc +++ b/chrome/common/property_bag_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -10,7 +10,7 @@ TEST(PropertyBagTest, AddQueryRemove) {    PropertyAccessor<int> adaptor;    // Should be no match initially. -  EXPECT_TRUE(NULL == adaptor.GetProperty(&bag)); +  EXPECT_EQ(NULL, adaptor.GetProperty(&bag));    // Add the value and make sure we get it back.    const int kFirstValue = 1; @@ -26,7 +26,7 @@ TEST(PropertyBagTest, AddQueryRemove) {    // Remove the value and make sure it's gone.    adaptor.DeleteProperty(&bag); -  EXPECT_TRUE(NULL == adaptor.GetProperty(&bag)); +  EXPECT_EQ(NULL, adaptor.GetProperty(&bag));  }  TEST(PropertyBagTest, Copy) { @@ -57,6 +57,6 @@ TEST(PropertyBagTest, Copy) {    // Clear it out, neither property should be left.    copy = PropertyBag(); -  EXPECT_TRUE(NULL == adaptor1.GetProperty(©)); -  EXPECT_TRUE(NULL == adaptor2.GetProperty(©)); +  EXPECT_EQ(NULL, adaptor1.GetProperty(©)); +  EXPECT_EQ(NULL, adaptor2.GetProperty(©));  } diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 0506afc..47e0e86 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -64,9 +64,9 @@ namespace printing {  class PrintViewManager : public RenderViewHostDelegate::Printing {   public: -  PrintViewManager(TabContents&) {} +  PrintViewManager(TabContents&) { }    void Stop() { NOTIMPLEMENTED(); } -  void Destroy() {} +  void Destroy() { }    bool OnRenderViewGone(RenderViewHost*) {      NOTIMPLEMENTED();      return true;  // Assume for now that all renderer crashes are important. @@ -115,7 +115,7 @@ class PrinterQuery : public base::RefCountedThreadSafe<PrinterQuery> {  class PrintJobManager {   public: -  void OnQuit() {} +  void OnQuit() { }    void PopPrinterQuery(int document_cookie, scoped_refptr<PrinterQuery>* job) {      NOTIMPLEMENTED();    } @@ -150,9 +150,8 @@ class DockInfo {  class RepostFormWarningDialog {   public: -  static void RunRepostFormWarningDialog(NavigationController*) {} - protected: -  ~RepostFormWarningDialog() {} +  static void RunRepostFormWarningDialog(NavigationController*) { } +  virtual ~RepostFormWarningDialog() { }  };  class BaseDragSource { diff --git a/chrome/common/worker_thread_ticker.h b/chrome/common/worker_thread_ticker.h index ceb2903..bbc5380 100644 --- a/chrome/common/worker_thread_ticker.h +++ b/chrome/common/worker_thread_ticker.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef CHROME_COMMON_WORKER_THREAD_TICKER_H_ -#define CHROME_COMMON_WORKER_THREAD_TICKER_H_ +#ifndef CHROME_COMMON_WORKER_THREAD_TICKER_H__ +#define CHROME_COMMON_WORKER_THREAD_TICKER_H__  #include <vector> @@ -24,9 +24,6 @@ class WorkerThreadTicker {     public:      // Gets invoked when the timer period is up      virtual void OnTick() = 0; - -   protected: -    ~Callback() {}    };    // tick_interval is the periodic interval in which to invoke the @@ -87,4 +84,4 @@ class WorkerThreadTicker {    DISALLOW_COPY_AND_ASSIGN(WorkerThreadTicker);  }; -#endif  // CHROME_COMMON_WORKER_THREAD_TICKER_H_ +#endif  // CHROME_COMMON_WORKER_THREAD_TICKER_H__ diff --git a/chrome/common/x11_util.h b/chrome/common/x11_util.h index abe9f32e..09b1c2b 100644 --- a/chrome/common/x11_util.h +++ b/chrome/common/x11_util.h @@ -74,9 +74,6 @@ class EnumerateWindowsDelegate {    // |xid| is the X Window ID of the enumerated window.  Return true to stop    // further iteration.    virtual bool ShouldStopIterating(XID xid) = 0; - - protected: -  ~EnumerateWindowsDelegate() {}  };  // Enumerates all windows in the current display.  Will recurse into child diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index b659a5c..9b33329 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -141,7 +141,7 @@ void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params,        command_line.GetSwitchValue(switches::kPluginPath)); -  gfx::PluginWindowHandle parent = 0; +  gfx::PluginWindowHandle parent = NULL;  #if defined(OS_WIN)    parent = gfx::NativeViewFromId(params.containing_window);  #elif defined(OS_LINUX) diff --git a/chrome/renderer/audio_message_filter.h b/chrome/renderer/audio_message_filter.h index 3052330..04ff699 100644 --- a/chrome/renderer/audio_message_filter.h +++ b/chrome/renderer/audio_message_filter.h @@ -32,9 +32,6 @@ class AudioMessageFilter : public IPC::ChannelProxy::MessageFilter {      // Called when notification of stream volume is received from the browser      // process.      virtual void OnVolume(double left, double right) = 0; - -   protected: -    ~Delegate() {}    };    AudioMessageFilter(int32 route_id); diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc index fef1eb6..0fb7ffc 100644 --- a/chrome/renderer/print_web_view_helper_linux.cc +++ b/chrome/renderer/print_web_view_helper_linux.cc @@ -26,15 +26,15 @@ void PrintWebViewHelper::Print(WebFrame* frame, bool script_initiated) {    //   Top = 0.25 in.    //   Bottom = 0.56 in.    const int kDPI = 72; -  const int kWidth = static_cast<int>((8.5-0.25-0.25) * kDPI); -  const int kHeight = static_cast<int>((11-0.25-0.56) * kDPI); +  const int kWidth = (8.5-0.25-0.25) * kDPI; +  const int kHeight = (11-0.25-0.56) * kDPI;    ViewMsg_Print_Params default_settings;    default_settings.printable_size = gfx::Size(kWidth, kHeight);    default_settings.dpi = kDPI;    default_settings.min_shrink = 1.25;    default_settings.max_shrink = 2.0;    default_settings.desired_dpi = kDPI; -  default_settings.document_cookie = 0; +  default_settings.document_cookie = NULL;    default_settings.selection_only = false;    // Calculate the estimated page count. diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index b7e17b6..48caa47 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1884,7 +1884,7 @@ WebView* RenderView::CreateWebView(WebView* webview,        (true, false);  #endif    RenderView* view = RenderView::Create(render_thread_, -                                        0, waitable_event, routing_id_, +                                        NULL, waitable_event, routing_id_,                                          renderer_preferences_,                                          webkit_preferences_,                                          shared_popup_counter_, routing_id); diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 1212e07..6a6c0a4 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -46,7 +46,7 @@ RenderWidget::RenderWidget(RenderThreadBase* render_thread, bool activatable)        webwidget_(NULL),        opener_id_(MSG_ROUTING_NONE),        render_thread_(render_thread), -      host_window_(0), +      host_window_(NULL),        current_paint_buf_(NULL),        current_scroll_buf_(NULL),        next_paint_flags_(0), diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index e180328..c72c654 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -63,7 +63,7 @@ class ResourceClientProxy : public WebPluginResourceClient {   public:    ResourceClientProxy(PluginChannelHost* channel, int instance_id)      : channel_(channel), instance_id_(instance_id), resource_id_(0), -      notify_needed_(false), notify_data_(0), +      notify_needed_(false), notify_data_(NULL),        multibyte_response_expected_(false) {    } @@ -172,7 +172,7 @@ WebPluginDelegateProxy::WebPluginDelegateProxy(const std::string& mime_type,      : render_view_(render_view),        plugin_(NULL),        windowless_(false), -      window_(0), +      window_(NULL),        mime_type_(mime_type),        clsid_(clsid),        npobject_(NULL), @@ -666,8 +666,8 @@ bool WebPluginDelegateProxy::BackgroundChanged(  #else    const unsigned char* page_bytes = cairo_image_surface_get_data(page_surface);    int page_stride = cairo_image_surface_get_stride(page_surface); -  int page_start_x = static_cast<int>(page_x_double); -  int page_start_y = static_cast<int>(page_y_double); +  int page_start_x = page_x_double; +  int page_start_y = page_y_double;    skia::PlatformDevice& device =        background_store_canvas_->getTopPlatformDevice(); @@ -797,7 +797,7 @@ void WebPluginDelegateProxy::OnSetWindow(gfx::PluginWindowHandle window) {  void WebPluginDelegateProxy::WillDestroyWindow() {    DCHECK(window_);    plugin_->WillDestroyWindow(window_); -  window_ = 0; +  window_ = NULL;  }  #if defined(OS_WIN) diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index b3beee3..c8bb83e 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -35,8 +35,6 @@ class TabProxy : public AutomationResourceProxy {    class TabProxyDelegate {     public:      virtual void OnMessageReceived(TabProxy* tab, const IPC::Message& msg) {} -   protected: -    ~TabProxyDelegate() {}    };    TabProxy(AutomationMessageSender* sender, diff --git a/chrome/test/browser/browser_test_runner.h b/chrome/test/browser/browser_test_runner.h index 0127f99..cbc0ddf 100644 --- a/chrome/test/browser/browser_test_runner.h +++ b/chrome/test/browser/browser_test_runner.h @@ -44,8 +44,6 @@ class BrowserTestRunner {  class BrowserTestRunnerFactory {   public:    virtual BrowserTestRunner* CreateBrowserTestRunner() const = 0; - protected: -  ~BrowserTestRunnerFactory() {}  };  }  // namespace diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc index 11de14c3..cf3a90b 100644 --- a/chrome/test/render_view_test.cc +++ b/chrome/test/render_view_test.cc @@ -91,7 +91,7 @@ void RenderViewTest::SetUp() {    render_thread_.set_routing_id(kRouteId);    // This needs to pass the mock render thread to the view. -  view_ = RenderView::Create(&render_thread_, 0, NULL, kOpenerId, +  view_ = RenderView::Create(&render_thread_, NULL, NULL, kOpenerId,                               RendererPreferences(), WebPreferences(),                               new SharedRenderViewCounter(0), kRouteId); diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index b5e66c6..51eb703 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -523,7 +523,7 @@ void UITest::QuitBrowser() {    // Don't forget to close the handle    base::CloseProcessHandle(process_); -  process_ = 0; +  process_ = NULL;  }  void UITest::AssertAppNotRunning(const std::wstring& error_message) { diff --git a/ipc/ipc_logging.h b/ipc/ipc_logging.h index 7bbf18c..364ad79 100644 --- a/ipc/ipc_logging.h +++ b/ipc/ipc_logging.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -30,8 +30,6 @@ class Logging : public base::WaitableEventWatcher::Delegate,    class Consumer {     public:      virtual void Log(const LogData& data) = 0; -   protected: -    ~Consumer() {}    };    void SetConsumer(Consumer* consumer); diff --git a/ipc/ipc_sync_channel.h b/ipc/ipc_sync_channel.h index 741959f..bfc9eac 100644 --- a/ipc/ipc_sync_channel.h +++ b/ipc/ipc_sync_channel.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef IPC_IPC_SYNC_SENDER_H_ -#define IPC_IPC_SYNC_SENDER_H_ +#ifndef IPC_IPC_SYNC_SENDER_H__ +#define IPC_IPC_SYNC_SENDER_H__  #include <string>  #include <deque> @@ -154,9 +154,9 @@ class SyncChannel : public ChannelProxy,    base::WaitableEventWatcher send_done_watcher_;    base::WaitableEventWatcher dispatch_watcher_; -  DISALLOW_COPY_AND_ASSIGN(SyncChannel); +  DISALLOW_EVIL_CONSTRUCTORS(SyncChannel);  };  }  // namespace IPC -#endif  // IPC_IPC_SYNC_SENDER_H_ +#endif  // IPC_IPC_SYNC_SENDER_H__ diff --git a/ipc/ipc_sync_message.h b/ipc/ipc_sync_message.h index 092fda2..5d072a7 100644 --- a/ipc/ipc_sync_message.h +++ b/ipc/ipc_sync_message.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef IPC_IPC_SYNC_MESSAGE_H_ -#define IPC_IPC_SYNC_MESSAGE_H_ +#ifndef IPC_IPC_SYNC_MESSAGE_H__ +#define IPC_IPC_SYNC_MESSAGE_H__  #if defined(OS_WIN)  #include <windows.h> @@ -84,7 +84,6 @@ class SyncMessage : public Message {  // Used to deserialize parameters from a reply to a synchronous message  class MessageReplyDeserializer {   public: -  virtual ~MessageReplyDeserializer() {}    bool SerializeOutputParameters(const Message& msg);   private:    // Derived classes need to implement this, using the given iterator (which @@ -94,4 +93,4 @@ class MessageReplyDeserializer {  }  // namespace IPC -#endif  // IPC_IPC_SYNC_MESSAGE_H_ +#endif  // IPC_IPC_SYNC_MESSAGE_H__ diff --git a/media/audio/linux/alsa_output_unittest.cc b/media/audio/linux/alsa_output_unittest.cc index 343344b..d13da89 100644 --- a/media/audio/linux/alsa_output_unittest.cc +++ b/media/audio/linux/alsa_output_unittest.cc @@ -215,7 +215,7 @@ TEST_F(AlsaPcmOutputStreamTest, OpenClose) {    test_stream_->Close();    message_loop_.RunAllPending(); -  EXPECT_TRUE(NULL == test_stream_->playback_handle_); +  EXPECT_EQ(NULL, test_stream_->playback_handle_);    EXPECT_FALSE(test_stream_->packet_.get());    EXPECT_TRUE(test_stream_->stop_stream_);  } diff --git a/media/base/clock.h b/media/base/clock.h index 40b0b81..93af4a9 100644 --- a/media/base/clock.h +++ b/media/base/clock.h @@ -40,9 +40,6 @@ class Clock {    // Returns the current elapsed media time.    virtual base::TimeDelta Elapsed() const = 0; - - protected: -  ~Clock() {}  };  }  // namespace media diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc index a31f9ab..078f54b 100644 --- a/media/filters/ffmpeg_demuxer_unittest.cc +++ b/media/filters/ffmpeg_demuxer_unittest.cc @@ -396,7 +396,7 @@ TEST_F(FFmpegDemuxerTest, Read) {    EXPECT_TRUE(reader->called());    ASSERT_TRUE(reader->buffer());    EXPECT_TRUE(reader->buffer()->IsEndOfStream()); -  EXPECT_TRUE(NULL == reader->buffer()->GetData()); +  EXPECT_EQ(NULL, reader->buffer()->GetData());    EXPECT_EQ(0u, reader->buffer()->GetDataSize());    // Manually release buffer, which should release any remaining AVPackets. @@ -410,7 +410,7 @@ TEST_F(FFmpegDemuxerTest, Read) {    EXPECT_TRUE(reader->called());    ASSERT_TRUE(reader->buffer());    EXPECT_TRUE(reader->buffer()->IsEndOfStream()); -  EXPECT_TRUE(NULL == reader->buffer()->GetData()); +  EXPECT_EQ(NULL, reader->buffer()->GetData());    EXPECT_EQ(0u, reader->buffer()->GetDataSize());    // Manually release buffer, which should release any remaining AVPackets. diff --git a/media/filters/null_audio_renderer.cc b/media/filters/null_audio_renderer.cc index 43d5b29..d977b08 100644 --- a/media/filters/null_audio_renderer.cc +++ b/media/filters/null_audio_renderer.cc @@ -18,7 +18,7 @@ NullAudioRenderer::NullAudioRenderer()      : AudioRendererBase(),        bytes_per_millisecond_(0),        buffer_size_(0), -      thread_(0), +      thread_(NULL),        shutdown_(false) {  } @@ -89,7 +89,7 @@ void NullAudioRenderer::OnStop() {    shutdown_ = true;    if (thread_) {      PlatformThread::Join(thread_); -    thread_ = 0; +    thread_ = NULL;    }  } diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc index 1539490..5a320c9 100644 --- a/media/filters/video_renderer_base.cc +++ b/media/filters/video_renderer_base.cc @@ -39,7 +39,7 @@ VideoRendererBase::VideoRendererBase()        height_(0),        frame_available_(&lock_),        state_(kUninitialized), -      thread_(0), +      thread_(NULL),        pending_reads_(0),        playback_rate_(0) {  } @@ -105,7 +105,7 @@ void VideoRendererBase::Stop() {        AutoUnlock auto_unlock(lock_);        PlatformThread::Join(thread_);      } -    thread_ = 0; +    thread_ = NULL;    }  } diff --git a/net/base/directory_lister.cc b/net/base/directory_lister.cc index 69e301e..616fc82 100644 --- a/net/base/directory_lister.cc +++ b/net/base/directory_lister.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -37,7 +37,7 @@ DirectoryLister::DirectoryLister(const FilePath& dir,      : dir_(dir),        delegate_(delegate),        message_loop_(NULL), -      thread_(0), +      thread_(NULL),        canceled_(false) {    DCHECK(!dir.value().empty());  } @@ -70,7 +70,7 @@ void DirectoryLister::Cancel() {    if (thread_) {      PlatformThread::Join(thread_); -    thread_ = 0; +    thread_ = NULL;    }  } diff --git a/net/base/directory_lister.h b/net/base/directory_lister.h index 58c2cd3..cb98da6 100644 --- a/net/base/directory_lister.h +++ b/net/base/directory_lister.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 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. -#ifndef NET_BASE_DIRECTORY_LISTER_H_ -#define NET_BASE_DIRECTORY_LISTER_H_ +#ifndef NET_BASE_DIRECTORY_LISTER_H__ +#define NET_BASE_DIRECTORY_LISTER_H__  #include <string> @@ -32,9 +32,6 @@ class DirectoryLister : public base::RefCountedThreadSafe<DirectoryLister>,      virtual void OnListFile(          const file_util::FileEnumerator::FindInfo& data) = 0;      virtual void OnListDone(int error) = 0; - -   protected: -    ~DirectoryListerDelegate() {}    };    DirectoryLister(const FilePath& dir, DirectoryListerDelegate* delegate); @@ -71,4 +68,4 @@ class DirectoryLister : public base::RefCountedThreadSafe<DirectoryLister>,  }  // namespace net -#endif  // NET_BASE_DIRECTORY_LISTER_H_ +#endif  // NET_BASE_DIRECTORY_LISTER_H__ diff --git a/net/base/host_cache_unittest.cc b/net/base/host_cache_unittest.cc index bfb1860..fe01e20 100644 --- a/net/base/host_cache_unittest.cc +++ b/net/base/host_cache_unittest.cc @@ -28,7 +28,7 @@ TEST(HostCacheTest, Basic) {    EXPECT_EQ(0U, cache.size());    // Add an entry for "foobar.com" at t=0. -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks()));    cache.Set("foobar.com", OK, AddressList(), now);    entry1 = cache.Lookup("foobar.com", base::TimeTicks());    EXPECT_FALSE(NULL == entry1); @@ -38,7 +38,7 @@ TEST(HostCacheTest, Basic) {    now += base::TimeDelta::FromSeconds(5);    // Add an entry for "foobar2.com" at t=5. -  EXPECT_TRUE(NULL == cache.Lookup("foobar2.com", base::TimeTicks())); +  EXPECT_EQ(NULL, cache.Lookup("foobar2.com", base::TimeTicks()));    cache.Set("foobar2.com", OK, AddressList(), now);    entry2 = cache.Lookup("foobar2.com", base::TimeTicks());    EXPECT_FALSE(NULL == entry1); @@ -54,7 +54,7 @@ TEST(HostCacheTest, Basic) {    // Advance to t=10; entry1 is now expired.    now += base::TimeDelta::FromSeconds(1); -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", now));    EXPECT_EQ(entry2, cache.Lookup("foobar2.com", now));    // Update entry1, so it is no longer expired. @@ -70,8 +70,8 @@ TEST(HostCacheTest, Basic) {    // Advance to t=20; both entries are now expired.    now += base::TimeDelta::FromSeconds(10); -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); -  EXPECT_TRUE(NULL == cache.Lookup("foobar2.com", now)); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", now)); +  EXPECT_EQ(NULL, cache.Lookup("foobar2.com", now));  }  // Try caching entries for a failed resolve attempt. @@ -81,19 +81,19 @@ TEST(HostCacheTest, NegativeEntry) {    // Set t=0.    base::TimeTicks now; -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks()));    cache.Set("foobar.com", ERR_NAME_NOT_RESOLVED, AddressList(), now);    EXPECT_EQ(1U, cache.size());    // We disallow use of negative entries. -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", now));    // Now overwrite with a valid entry, and then overwrite with negative entry    // again -- the valid entry should be kicked out.    cache.Set("foobar.com", OK, AddressList(), now);    EXPECT_FALSE(NULL == cache.Lookup("foobar.com", now));    cache.Set("foobar.com", ERR_NAME_NOT_RESOLVED, AddressList(), now); -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", now));  }  TEST(HostCacheTest, Compact) { @@ -185,7 +185,7 @@ TEST(HostCacheTest, SetWithCompact) {    // Adding the fourth entry will cause "expired" to be evicted.    cache.Set("host3", OK, AddressList(), now);    EXPECT_EQ(3U, cache.size()); -  EXPECT_TRUE(NULL == cache.Lookup("expired", now)); +  EXPECT_EQ(NULL, cache.Lookup("expired", now));    EXPECT_FALSE(NULL == cache.Lookup("host1", now));    EXPECT_FALSE(NULL == cache.Lookup("host2", now));    EXPECT_FALSE(NULL == cache.Lookup("host3", now)); @@ -208,9 +208,9 @@ TEST(HostCacheTest, NoCache) {    base::TimeTicks now;    // Lookup and Set should have no effect. -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks()));    cache.Set("foobar.com", OK, AddressList(), now); -  EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); +  EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks()));    EXPECT_EQ(0U, cache.size());  } diff --git a/net/base/ssl_client_auth_cache_unittest.cc b/net/base/ssl_client_auth_cache_unittest.cc index c0697fc..33eb25f 100644 --- a/net/base/ssl_client_auth_cache_unittest.cc +++ b/net/base/ssl_client_auth_cache_unittest.cc @@ -28,7 +28,7 @@ TEST(SSLClientAuthCacheTest, LookupAddRemove) {      new X509Certificate("foo3", "CA", start_date, expiration_date));    // Lookup non-existent client certificate. -  EXPECT_TRUE(NULL == cache.Lookup(server1)); +  EXPECT_EQ(NULL, cache.Lookup(server1));    // Add client certificate for server1.    cache.Add(server1, cert1.get()); @@ -46,12 +46,12 @@ TEST(SSLClientAuthCacheTest, LookupAddRemove) {    // Remove client certificate of server1.    cache.Remove(server1); -  EXPECT_TRUE(NULL == cache.Lookup(server1)); +  EXPECT_EQ(NULL, cache.Lookup(server1));    EXPECT_EQ(cert2.get(), cache.Lookup(server2));    // Remove non-existent client certificate.    cache.Remove(server1); -  EXPECT_TRUE(NULL == cache.Lookup(server1)); +  EXPECT_EQ(NULL, cache.Lookup(server1));    EXPECT_EQ(cert2.get(), cache.Lookup(server2));  } diff --git a/net/ftp/ftp_auth_cache_unittest.cc b/net/ftp/ftp_auth_cache_unittest.cc index a4d8ef4..f74762b 100644 --- a/net/ftp/ftp_auth_cache_unittest.cc +++ b/net/ftp/ftp_auth_cache_unittest.cc @@ -24,7 +24,7 @@ TEST(FtpAuthCacheTest, LookupAddRemove) {    scoped_refptr<AuthData> data3(new AuthData());    // Lookup non-existent entry. -  EXPECT_TRUE(NULL == cache.Lookup(origin1)); +  EXPECT_EQ(NULL, cache.Lookup(origin1));    // Add entry for origin1.    cache.Add(origin1, data1.get()); @@ -42,12 +42,12 @@ TEST(FtpAuthCacheTest, LookupAddRemove) {    // Remove entry of origin1.    cache.Remove(origin1); -  EXPECT_TRUE(NULL == cache.Lookup(origin1)); +  EXPECT_EQ(NULL, cache.Lookup(origin1));    EXPECT_EQ(data2.get(), cache.Lookup(origin2));    // Remove non-existent entry    cache.Remove(origin1); -  EXPECT_TRUE(NULL == cache.Lookup(origin1)); +  EXPECT_EQ(NULL, cache.Lookup(origin1));    EXPECT_EQ(data2.get(), cache.Lookup(origin2));  } @@ -93,7 +93,7 @@ TEST(FtpAuthCacheTest, NormalizedKey) {    // Remove    cache.Remove(GURL("ftp://HOsT")); -  EXPECT_TRUE(NULL == cache.Lookup(GURL("ftp://host"))); +  EXPECT_EQ(NULL, cache.Lookup(GURL("ftp://host")));  }  TEST(FtpAuthCacheTest, EvictOldEntries) { @@ -112,7 +112,7 @@ TEST(FtpAuthCacheTest, EvictOldEntries) {    // Adding one entry should cause eviction of the first entry.    cache.Add(GURL("ftp://last_host"), auth_data.get()); -  EXPECT_TRUE(NULL == cache.Lookup(GURL("ftp://host0"))); +  EXPECT_EQ(NULL, cache.Lookup(GURL("ftp://host0")));    // Remaining entries should not get evicted.    for (size_t i = 1; i < FtpAuthCache::kMaxEntries; i++) { diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index b4d99d6..d63546d 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -2639,19 +2639,19 @@ TEST_F(HttpNetworkTransactionTest, ResetStateForRestart) {    trans->ResetStateForRestart();    // Verify that the state that needed to be reset, has been reset. -  EXPECT_TRUE(NULL == trans->header_buf_->headers()); +  EXPECT_EQ(NULL, trans->header_buf_->headers());    EXPECT_EQ(0, trans->header_buf_capacity_);    EXPECT_EQ(0, trans->header_buf_len_);    EXPECT_EQ(-1, trans->header_buf_body_offset_);    EXPECT_EQ(-1, trans->header_buf_http_offset_);    EXPECT_EQ(-1, trans->response_body_length_);    EXPECT_EQ(0, trans->response_body_read_); -  EXPECT_TRUE(NULL == trans->read_buf_.get()); +  EXPECT_EQ(NULL, trans->read_buf_.get());    EXPECT_EQ(0, trans->read_buf_len_);    EXPECT_EQ("", trans->request_headers_->headers_);    EXPECT_EQ(0U, trans->request_headers_bytes_sent_); -  EXPECT_TRUE(NULL == trans->response_.auth_challenge.get()); -  EXPECT_TRUE(NULL == trans->response_.headers.get()); +  EXPECT_EQ(NULL, trans->response_.auth_challenge.get()); +  EXPECT_EQ(NULL, trans->response_.headers.get());    EXPECT_EQ(false, trans->response_.was_cached);    EXPECT_EQ(0, trans->response_.ssl_info.cert_status);    EXPECT_FALSE(trans->response_.vary_data.is_valid()); diff --git a/net/proxy/single_threaded_proxy_resolver_unittest.cc b/net/proxy/single_threaded_proxy_resolver_unittest.cc index 0503a01..da21ff1 100644 --- a/net/proxy/single_threaded_proxy_resolver_unittest.cc +++ b/net/proxy/single_threaded_proxy_resolver_unittest.cc @@ -34,8 +34,8 @@ class MockProxyResolver : public ProxyResolver {      CheckIsOnWorkerThread(); -    EXPECT_TRUE(NULL == callback); -    EXPECT_TRUE(NULL == request); +    EXPECT_EQ(NULL, callback); +    EXPECT_EQ(NULL, request);      results->UseNamedProxy(query_url.host()); diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h index 9beac0a..e6368ca 100644 --- a/net/socket/client_socket_pool_base.h +++ b/net/socket/client_socket_pool_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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.  // @@ -426,7 +426,7 @@ class ClientSocketPoolBase {            max_sockets, max_sockets_per_group,            new ConnectJobFactoryAdaptor(connect_job_factory))) {} -  virtual ~ClientSocketPoolBase() {} +  ~ClientSocketPoolBase() {}    // These member functions simply forward to ClientSocketPoolBaseHelper. diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc index 5f33197..fff6869 100644 --- a/net/socket/client_socket_pool_base_unittest.cc +++ b/net/socket/client_socket_pool_base_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -327,9 +327,9 @@ class TestConnectJobDelegate : public ConnectJob::Delegate {      result_ = result;      scoped_ptr<ClientSocket> socket(job->ReleaseSocket());      if (result == OK) { -      EXPECT_FALSE(socket.get() == NULL); +      EXPECT_TRUE(socket.get() != NULL);      } else { -      EXPECT_TRUE(socket.get() == NULL); +      EXPECT_EQ(NULL, socket.get());      }      delete job;      have_result_ = true; diff --git a/net/socket/ssl_test_util.cc b/net/socket/ssl_test_util.cc index e60cab9..7e73f1e 100644 --- a/net/socket/ssl_test_util.cc +++ b/net/socket/ssl_test_util.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -136,7 +136,7 @@ const int TestServerLauncher::kBadHTTPSPort = 9666;  // The issuer name of the cert that should be trusted for the test to work.  const wchar_t TestServerLauncher::kCertIssuerName[] = L"Test CA"; -TestServerLauncher::TestServerLauncher() : process_handle_(0), +TestServerLauncher::TestServerLauncher() : process_handle_(NULL),                                             forking_(false),                                             connection_attempts_(10),                                             connection_timeout_(1000) @@ -149,7 +149,7 @@ TestServerLauncher::TestServerLauncher() : process_handle_(0),  TestServerLauncher::TestServerLauncher(int connection_attempts,                                         int connection_timeout) -                        : process_handle_(0), +                        : process_handle_(NULL),                            forking_(false),                            connection_attempts_(connection_attempts),                            connection_timeout_(connection_timeout) @@ -331,7 +331,7 @@ bool TestServerLauncher::WaitToFinish(int timeout_ms) {    bool ret = base::WaitForSingleProcess(process_handle_, timeout_ms);    if (ret) {      base::CloseProcessHandle(process_handle_); -    process_handle_ = 0; +    process_handle_ = NULL;      LOG(INFO) << "Finished.";    } else {      LOG(INFO) << "Timed out."; @@ -346,7 +346,7 @@ bool TestServerLauncher::Stop() {    bool ret = base::KillProcess(process_handle_, 1, true);    if (ret) {      base::CloseProcessHandle(process_handle_); -    process_handle_ = 0; +    process_handle_ = NULL;      LOG(INFO) << "Stopped.";    } else {      LOG(INFO) << "Kill failed?"; diff --git a/net/tools/fetch/http_listen_socket.h b/net/tools/fetch/http_listen_socket.h index 81f0de0..f31df20 100644 --- a/net/tools/fetch/http_listen_socket.h +++ b/net/tools/fetch/http_listen_socket.h @@ -17,11 +17,8 @@ class HttpListenSocket : public ListenSocket,  public:    class Delegate {     public: -    virtual void OnRequest(HttpListenSocket* connection, +    virtual void OnRequest(HttpListenSocket* connection,                              HttpServerRequestInfo* info) = 0; - -   protected: -    ~Delegate() {}    };    static HttpListenSocket* Listen(const std::string& ip, int port, diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h index 3c51571..e058957 100644 --- a/net/url_request/url_request_unittest.h +++ b/net/url_request/url_request_unittest.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -239,13 +239,11 @@ class TestDelegate : public URLRequest::Delegate {  // that can provide various responses useful for testing.  class BaseTestServer : public base::RefCounted<BaseTestServer> {   protected: -  BaseTestServer() {} +  BaseTestServer() { }    BaseTestServer(int connection_attempts, int connection_timeout) -      : launcher_(connection_attempts, connection_timeout) {} +      : launcher_(connection_attempts, connection_timeout) { }   public: -  virtual ~BaseTestServer() {} -    void set_forking(bool forking) {      launcher_.set_forking(forking);    } diff --git a/views/accelerator.h b/views/accelerator.h index 2b62193..bb8f91f 100644 --- a/views/accelerator.h +++ b/views/accelerator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -36,7 +36,7 @@ class Accelerator {      modifiers_ = accelerator.modifiers_;    } -  ~Accelerator() {}; +  ~Accelerator() { };    Accelerator& operator=(const Accelerator& accelerator) {      if (this != &accelerator) { @@ -95,8 +95,6 @@ class AcceleratorTarget {   public:    // This method should return true if the accelerator was processed.    virtual bool AcceleratorPressed(const Accelerator& accelerator) = 0; - protected: -  ~AcceleratorTarget() {}  };  } diff --git a/views/controls/menu/simple_menu_model.h b/views/controls/menu/simple_menu_model.h index 4671f3e..2be2cbc 100644 --- a/views/controls/menu/simple_menu_model.h +++ b/views/controls/menu/simple_menu_model.h @@ -44,9 +44,6 @@ class SimpleMenuModel : public Menu2Model {      // Performs the action associated with the specified command id.      virtual void ExecuteCommand(int command_id) = 0; - -   protected: -    ~Delegate() {}    };    // The Delegate can be NULL, though if it is items can't be checked or diff --git a/views/view.h b/views/view.h index 7742d03..66ef76f 100644 --- a/views/view.h +++ b/views/view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -68,9 +68,6 @@ class ContextMenuController {                                 int x,                                 int y,                                 bool is_mouse_gesture) = 0; - - protected: -  ~ContextMenuController() {}  };  // DragController is responsible for writing drag data for a view, as well as @@ -88,9 +85,6 @@ class DragController {    // Returns the supported drag operations (see DragDropTypes for possible    // values). A drag is only started if this returns a non-zero value.    virtual int GetDragOperations(View* sender, int x, int y) = 0; - - protected: -  ~DragController() {}  }; diff --git a/webkit/api/public/linux/WebSandboxSupport.h b/webkit/api/public/linux/WebSandboxSupport.h index a8a5eaf..4e20387 100644 --- a/webkit/api/public/linux/WebSandboxSupport.h +++ b/webkit/api/public/linux/WebSandboxSupport.h @@ -49,9 +49,6 @@ namespace WebKit {          // Returns a string with the font family on an empty string if the          // request cannot be satisfied.          virtual WebString getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters) = 0; - -    protected: -        ~WebSandboxSupport() { }      };  } // namespace WebKit diff --git a/webkit/glue/devtools/devtools_rpc.h b/webkit/glue/devtools/devtools_rpc.h index 84a2a7e..072116e 100644 --- a/webkit/glue/devtools/devtools_rpc.h +++ b/webkit/glue/devtools/devtools_rpc.h @@ -225,7 +225,7 @@ class Class {\    Class() { \      class_name = #Class; \    } \ -  virtual ~Class() {} \ +  ~Class() {} \    \    STRUCT( \        TOOLS_RPC_API_METHOD0, \ diff --git a/webkit/glue/webcursor_unittest.cc b/webkit/glue/webcursor_unittest.cc index 51fd433..1a15bf8 100644 --- a/webkit/glue/webcursor_unittest.cc +++ b/webkit/glue/webcursor_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -22,7 +22,7 @@ TEST(WebCursorTest, CursorSerialization) {    ok_custom_pickle.WriteInt(4);    ok_custom_pickle.WriteUInt32(0);    // Custom Windows message. -  ok_custom_pickle.WriteIntPtr(0); +  ok_custom_pickle.WriteIntPtr(NULL);    void* iter = NULL;    EXPECT_TRUE(custom_cursor.Deserialize(&ok_custom_pickle, &iter)); @@ -39,7 +39,7 @@ TEST(WebCursorTest, CursorSerialization) {    short_custom_pickle.WriteInt(3);    short_custom_pickle.WriteUInt32(0);    // Custom Windows message. -  ok_custom_pickle.WriteIntPtr(0); +  ok_custom_pickle.WriteIntPtr(NULL);    iter = NULL;    EXPECT_FALSE(custom_cursor.Deserialize(&short_custom_pickle, &iter)); @@ -58,7 +58,7 @@ TEST(WebCursorTest, CursorSerialization) {    for (int i = 0; i < kTooBigSize; ++i)      large_custom_pickle.WriteUInt32(0);    // Custom Windows message. -  ok_custom_pickle.WriteIntPtr(0); +  ok_custom_pickle.WriteIntPtr(NULL);    iter = NULL;    EXPECT_FALSE(custom_cursor.Deserialize(&large_custom_pickle, &iter)); @@ -75,7 +75,7 @@ TEST(WebCursorTest, CursorSerialization) {    neg_custom_pickle.WriteInt(4);    neg_custom_pickle.WriteUInt32(0);    // Custom Windows message. -  neg_custom_pickle.WriteIntPtr(0); +  neg_custom_pickle.WriteIntPtr(NULL);    iter = NULL;    EXPECT_FALSE(custom_cursor.Deserialize(&neg_custom_pickle, &iter));  } | 
