[go: nahoru, domu]

Run clang-tidy modernize-use-equals-{delete,default} on //apps

See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8

This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md

In some cases the the tool leaves behind a string of commas where it
replaced a member initializer list
(https://bugs.llvm.org/show_bug.cgi?id=35051). They were cleaned up with:
  git diff --name-only | \
    xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/'

BUG=778959,778957

Change-Id: I0085476ed1fd901c9de97c91d2e12cc1d3faa1af
Reviewed-on: https://chromium-review.googlesource.com/789738
Commit-Queue: Chris Watkins <watk@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519211}
diff --git a/apps/app_lifetime_monitor.cc b/apps/app_lifetime_monitor.cc
index 0e2169e..0e63be8b 100644
--- a/apps/app_lifetime_monitor.cc
+++ b/apps/app_lifetime_monitor.cc
@@ -35,7 +35,7 @@
   app_window_registry->AddObserver(this);
 }
 
-AppLifetimeMonitor::~AppLifetimeMonitor() {}
+AppLifetimeMonitor::~AppLifetimeMonitor() = default;
 
 void AppLifetimeMonitor::AddObserver(Observer* observer) {
   observers_.AddObserver(observer);
diff --git a/apps/app_lifetime_monitor_factory.cc b/apps/app_lifetime_monitor_factory.cc
index cd5c240e..41be097 100644
--- a/apps/app_lifetime_monitor_factory.cc
+++ b/apps/app_lifetime_monitor_factory.cc
@@ -30,7 +30,7 @@
   DependsOn(extensions::AppWindowRegistry::Factory::GetInstance());
 }
 
-AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() {}
+AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() = default;
 
 KeyedService* AppLifetimeMonitorFactory::BuildServiceInstanceFor(
     content::BrowserContext* context) const {
diff --git a/apps/app_restore_service_factory.cc b/apps/app_restore_service_factory.cc
index de04e444..2267b248 100644
--- a/apps/app_restore_service_factory.cc
+++ b/apps/app_restore_service_factory.cc
@@ -29,8 +29,7 @@
   DependsOn(AppLifetimeMonitorFactory::GetInstance());
 }
 
-AppRestoreServiceFactory::~AppRestoreServiceFactory() {
-}
+AppRestoreServiceFactory::~AppRestoreServiceFactory() = default;
 
 KeyedService* AppRestoreServiceFactory::BuildServiceInstanceFor(
     content::BrowserContext* context) const {
diff --git a/apps/launcher.cc b/apps/launcher.cc
index a0f747c..6623473 100644
--- a/apps/launcher.cc
+++ b/apps/launcher.cc
@@ -165,7 +165,7 @@
  private:
   friend class base::RefCountedThreadSafe<PlatformAppPathLauncher>;
 
-  virtual ~PlatformAppPathLauncher() {}
+  virtual ~PlatformAppPathLauncher() = default;
 
   void MakePathAbsolute(const base::FilePath& current_directory) {
     for (std::vector<base::FilePath>::iterator it = entry_paths_.begin();
diff --git a/apps/saved_files_service.cc b/apps/saved_files_service.cc
index c2f01d7..20c9052f 100644
--- a/apps/saved_files_service.cc
+++ b/apps/saved_files_service.cc
@@ -190,7 +190,7 @@
                  content::NotificationService::AllSources());
 }
 
-SavedFilesService::~SavedFilesService() {}
+SavedFilesService::~SavedFilesService() = default;
 
 void SavedFilesService::Observe(int type,
                                 const content::NotificationSource& source,
@@ -287,7 +287,7 @@
   LoadSavedFileEntriesFromPreferences();
 }
 
-SavedFilesService::SavedFiles::~SavedFiles() {}
+SavedFilesService::SavedFiles::~SavedFiles() = default;
 
 void SavedFilesService::SavedFiles::RegisterFileEntry(
     const std::string& id,
diff --git a/apps/saved_files_service_factory.cc b/apps/saved_files_service_factory.cc
index f85b315..00e9e00a 100644
--- a/apps/saved_files_service_factory.cc
+++ b/apps/saved_files_service_factory.cc
@@ -34,7 +34,7 @@
           "SavedFilesService",
           BrowserContextDependencyManager::GetInstance()) {}
 
-SavedFilesServiceFactory::~SavedFilesServiceFactory() {}
+SavedFilesServiceFactory::~SavedFilesServiceFactory() = default;
 
 KeyedService* SavedFilesServiceFactory::BuildServiceInstanceFor(
     content::BrowserContext* context) const {
diff --git a/apps/ui/views/app_window_frame_view.cc b/apps/ui/views/app_window_frame_view.cc
index 0dc86b7..e24781c 100644
--- a/apps/ui/views/app_window_frame_view.cc
+++ b/apps/ui/views/app_window_frame_view.cc
@@ -55,7 +55,7 @@
       resize_area_corner_size_(kDefaultResizeAreaCornerSize) {
 }
 
-AppWindowFrameView::~AppWindowFrameView() {}
+AppWindowFrameView::~AppWindowFrameView() = default;
 
 void AppWindowFrameView::Init() {
   if (draw_frame_) {