Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: content/shell/renderer/test_runner/WebTask.cpp

Issue 566833002: Update WebTask in chromium c++ style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolved build error Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/renderer/test_runner/WebTask.h ('k') | content/shell/renderer/test_runner/event_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/WebTask.cpp
diff --git a/content/shell/renderer/test_runner/WebTask.cpp b/content/shell/renderer/test_runner/WebTask.cpp
deleted file mode 100644
index 5c8ba267ff8130945bfb1d4f5ddee94a8e14883b..0000000000000000000000000000000000000000
--- a/content/shell/renderer/test_runner/WebTask.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2013 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.
-
-#include "content/shell/renderer/test_runner/WebTask.h"
-
-#include <algorithm>
-#include "third_party/WebKit/public/web/WebKit.h"
-
-namespace content {
-
-WebTask::WebTask(WebTaskList* list)
- : m_taskList(list)
-{
- m_taskList->registerTask(this);
-}
-
-WebTask::~WebTask()
-{
- if (m_taskList)
- m_taskList->unregisterTask(this);
-}
-
-WebTaskList::WebTaskList()
-{
-}
-
-WebTaskList::~WebTaskList()
-{
- revokeAll();
-}
-
-void WebTaskList::registerTask(WebTask* task)
-{
- m_tasks.push_back(task);
-}
-
-void WebTaskList::unregisterTask(WebTask* task)
-{
- std::vector<WebTask*>::iterator iter = std::find(m_tasks.begin(), m_tasks.end(), task);
- if (iter != m_tasks.end())
- m_tasks.erase(iter);
-}
-
-void WebTaskList::revokeAll()
-{
- while (!m_tasks.empty())
- m_tasks[0]->cancel();
-}
-
-} // namespace content
« no previous file with comments | « content/shell/renderer/test_runner/WebTask.h ('k') | content/shell/renderer/test_runner/event_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698