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

Side by Side Diff: content/shell/renderer/test_runner/WebTask.cpp

Issue 373443002: Remove all uses of "using namespace std" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding myself in AUTHORS Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « content/shell/renderer/test_runner/TestPlugin.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/renderer/test_runner/WebTask.h" 5 #include "content/shell/renderer/test_runner/WebTask.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "third_party/WebKit/public/web/WebKit.h" 8 #include "third_party/WebKit/public/web/WebKit.h"
9 9
10 using namespace std;
11
12 namespace content { 10 namespace content {
13 11
14 WebTask::WebTask(WebTaskList* list) 12 WebTask::WebTask(WebTaskList* list)
15 : m_taskList(list) 13 : m_taskList(list)
16 { 14 {
17 m_taskList->registerTask(this); 15 m_taskList->registerTask(this);
18 } 16 }
19 17
20 WebTask::~WebTask() 18 WebTask::~WebTask()
21 { 19 {
(...skipping 10 matching lines...) Expand all
32 revokeAll(); 30 revokeAll();
33 } 31 }
34 32
35 void WebTaskList::registerTask(WebTask* task) 33 void WebTaskList::registerTask(WebTask* task)
36 { 34 {
37 m_tasks.push_back(task); 35 m_tasks.push_back(task);
38 } 36 }
39 37
40 void WebTaskList::unregisterTask(WebTask* task) 38 void WebTaskList::unregisterTask(WebTask* task)
41 { 39 {
42 vector<WebTask*>::iterator iter = find(m_tasks.begin(), m_tasks.end(), task) ; 40 std::vector<WebTask*>::iterator iter = std::find(m_tasks.begin(), m_tasks.en d(), task);
43 if (iter != m_tasks.end()) 41 if (iter != m_tasks.end())
44 m_tasks.erase(iter); 42 m_tasks.erase(iter);
45 } 43 }
46 44
47 void WebTaskList::revokeAll() 45 void WebTaskList::revokeAll()
48 { 46 {
49 while (!m_tasks.empty()) 47 while (!m_tasks.empty())
50 m_tasks[0]->cancel(); 48 m_tasks[0]->cancel();
51 } 49 }
52 50
53 } // namespace content 51 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/TestPlugin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698