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

Unified Diff: chrome/browser/ui/webui/task_manager_handler.cc

Issue 9565041: Cleanup: Typedef std::pairs in TaskManager code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « chrome/browser/ui/views/task_manager_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/task_manager_handler.cc
===================================================================
--- chrome/browser/ui/webui/task_manager_handler.cc (revision 124488)
+++ chrome/browser/ui/webui/task_manager_handler.cc (working copy)
@@ -6,6 +6,7 @@
#include <algorithm>
#include <functional>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/string_number_conversions.h"
@@ -26,7 +27,7 @@
namespace {
Value* CreateColumnValue(const TaskManagerModel* tm,
- const std::string column_name,
+ const std::string& column_name,
const int i) {
if (column_name == "uniqueId")
return Value::CreateIntegerValue(tm->GetResourceUniqueId(i));
@@ -134,7 +135,7 @@
const int index,
const int length,
DictionaryValue* val) {
- ListValue *list = new ListValue();
+ ListValue* list = new ListValue();
for (int i = index; i < (index + length); ++i) {
list->Append(CreateColumnValue(tm, column_name, i));
}
@@ -184,9 +185,7 @@
return val;
int index = tm->GetResourceIndexForGroup(group_index, 0);
- std::pair<int, int> group_range;
- group_range = tm->GetGroupRangeForResource(index);
- int length = group_range.second;
+ int length = tm->GetGroupRangeForResource(index).second;
// Forces to set following 3 columns regardless of |enable_columns|.
val->SetInteger("index", index);
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698