Skip to content

Commit

Permalink
Run clang-tidy modernize-use-equals-{delete,default} on //apps
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
Chris Watkins authored and Commit Bot committed Nov 27, 2017
1 parent c554433 commit ee8488b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/app_lifetime_monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ AppLifetimeMonitor::AppLifetimeMonitor(content::BrowserContext* context)
app_window_registry->AddObserver(this);
}

AppLifetimeMonitor::~AppLifetimeMonitor() {}
AppLifetimeMonitor::~AppLifetimeMonitor() = default;

void AppLifetimeMonitor::AddObserver(Observer* observer) {
observers_.AddObserver(observer);
Expand Down
2 changes: 1 addition & 1 deletion apps/app_lifetime_monitor_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ AppLifetimeMonitorFactory::AppLifetimeMonitorFactory()
DependsOn(extensions::AppWindowRegistry::Factory::GetInstance());
}

AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() {}
AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() = default;

KeyedService* AppLifetimeMonitorFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Expand Down
3 changes: 1 addition & 2 deletions apps/app_restore_service_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ AppRestoreServiceFactory::AppRestoreServiceFactory()
DependsOn(AppLifetimeMonitorFactory::GetInstance());
}

AppRestoreServiceFactory::~AppRestoreServiceFactory() {
}
AppRestoreServiceFactory::~AppRestoreServiceFactory() = default;

KeyedService* AppRestoreServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Expand Down
2 changes: 1 addition & 1 deletion apps/launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class PlatformAppPathLauncher
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();
Expand Down
4 changes: 2 additions & 2 deletions apps/saved_files_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ SavedFilesService::SavedFilesService(content::BrowserContext* context)
content::NotificationService::AllSources());
}

SavedFilesService::~SavedFilesService() {}
SavedFilesService::~SavedFilesService() = default;

void SavedFilesService::Observe(int type,
const content::NotificationSource& source,
Expand Down Expand Up @@ -287,7 +287,7 @@ SavedFilesService::SavedFiles::SavedFiles(content::BrowserContext* context,
LoadSavedFileEntriesFromPreferences();
}

SavedFilesService::SavedFiles::~SavedFiles() {}
SavedFilesService::SavedFiles::~SavedFiles() = default;

void SavedFilesService::SavedFiles::RegisterFileEntry(
const std::string& id,
Expand Down
2 changes: 1 addition & 1 deletion apps/saved_files_service_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SavedFilesServiceFactory::SavedFilesServiceFactory()
"SavedFilesService",
BrowserContextDependencyManager::GetInstance()) {}

SavedFilesServiceFactory::~SavedFilesServiceFactory() {}
SavedFilesServiceFactory::~SavedFilesServiceFactory() = default;

KeyedService* SavedFilesServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/views/app_window_frame_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ AppWindowFrameView::AppWindowFrameView(views::Widget* widget,
resize_area_corner_size_(kDefaultResizeAreaCornerSize) {
}

AppWindowFrameView::~AppWindowFrameView() {}
AppWindowFrameView::~AppWindowFrameView() = default;

void AppWindowFrameView::Init() {
if (draw_frame_) {
Expand Down

0 comments on commit ee8488b

Please sign in to comment.