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

Side by Side Diff: Source/core/inspector/InspectorTimelineAgent.cpp

Issue 800113002: Use C++11 range-based for loop in Source/core/inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase again and again! Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 return TimelineRecordFactory::createBackgroundRecord(timeestamp, String::num ber(event.threadIdentifier()), type, data); 1297 return TimelineRecordFactory::createBackgroundRecord(timeestamp, String::num ber(event.threadIdentifier()), type, data);
1298 } 1298 }
1299 1299
1300 void InspectorTimelineAgent::setLiveEvents(const String& liveEvents) 1300 void InspectorTimelineAgent::setLiveEvents(const String& liveEvents)
1301 { 1301 {
1302 m_liveEvents.clear(); 1302 m_liveEvents.clear();
1303 if (liveEvents.isNull() || liveEvents.isEmpty()) 1303 if (liveEvents.isNull() || liveEvents.isEmpty())
1304 return; 1304 return;
1305 Vector<String> eventList; 1305 Vector<String> eventList;
1306 liveEvents.split(',', eventList); 1306 liveEvents.split(',', eventList);
1307 for (Vector<String>::iterator it = eventList.begin(); it != eventList.end(); ++it) 1307 for (auto& event : eventList)
1308 m_liveEvents.add(*it); 1308 m_liveEvents.add(event);
1309 } 1309 }
1310 1310
1311 TimelineRecordStack::TimelineRecordStack(InspectorTimelineAgent* timelineAgent) 1311 TimelineRecordStack::TimelineRecordStack(InspectorTimelineAgent* timelineAgent)
1312 : m_timelineAgent(timelineAgent) 1312 : m_timelineAgent(timelineAgent)
1313 { 1313 {
1314 } 1314 }
1315 1315
1316 void TimelineRecordStack::addScopedRecord(PassRefPtr<TimelineEvent> record, cons t String& type) 1316 void TimelineRecordStack::addScopedRecord(PassRefPtr<TimelineEvent> record, cons t String& type)
1317 { 1317 {
1318 m_stack.append(Entry(record, type)); 1318 m_stack.append(Entry(record, type));
(...skipping 30 matching lines...) Expand all
1349 { 1349 {
1350 visitor->trace(m_timelineAgent); 1350 visitor->trace(m_timelineAgent);
1351 } 1351 }
1352 1352
1353 void TimelineThreadState::trace(Visitor* visitor) 1353 void TimelineThreadState::trace(Visitor* visitor)
1354 { 1354 {
1355 visitor->trace(recordStack); 1355 visitor->trace(recordStack);
1356 } 1356 }
1357 1357
1358 } // namespace blink 1358 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorStyleSheet.cpp ('k') | Source/core/inspector/InspectorWorkerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698