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

Side by Side Diff: Source/core/inspector/InspectorDOMDebuggerAgent.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! 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 m_state->setObject(DOMDebuggerAgentState::xhrBreakpoints, xhrBreakpoints.rel ease()); 556 m_state->setObject(DOMDebuggerAgentState::xhrBreakpoints, xhrBreakpoints.rel ease());
557 } 557 }
558 558
559 void InspectorDOMDebuggerAgent::willSendXMLHttpRequest(const String& url) 559 void InspectorDOMDebuggerAgent::willSendXMLHttpRequest(const String& url)
560 { 560 {
561 String breakpointURL; 561 String breakpointURL;
562 if (m_state->getBoolean(DOMDebuggerAgentState::pauseOnAllXHRs)) 562 if (m_state->getBoolean(DOMDebuggerAgentState::pauseOnAllXHRs))
563 breakpointURL = ""; 563 breakpointURL = "";
564 else { 564 else {
565 RefPtr<JSONObject> xhrBreakpoints = m_state->getObject(DOMDebuggerAgentS tate::xhrBreakpoints); 565 RefPtr<JSONObject> xhrBreakpoints = m_state->getObject(DOMDebuggerAgentS tate::xhrBreakpoints);
566 for (JSONObject::iterator it = xhrBreakpoints->begin(); it != xhrBreakpo ints->end(); ++it) { 566 for (auto it : *xhrBreakpoints) {
567 if (url.contains(it->key)) { 567 if (url.contains(it.key)) {
568 breakpointURL = it->key; 568 breakpointURL = it.key;
569 break; 569 break;
570 } 570 }
571 } 571 }
572 } 572 }
573 573
574 if (breakpointURL.isNull()) 574 if (breakpointURL.isNull())
575 return; 575 return;
576 576
577 RefPtr<JSONObject> eventData = JSONObject::create(); 577 RefPtr<JSONObject> eventData = JSONObject::create();
578 eventData->setString("breakpointURL", breakpointURL); 578 eventData->setString("breakpointURL", breakpointURL);
579 eventData->setString("url", url); 579 eventData->setString("url", url);
580 m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::XHR, even tData.release()); 580 m_debuggerAgent->breakProgram(InspectorFrontend::Debugger::Reason::XHR, even tData.release());
581 } 581 }
582 582
583 void InspectorDOMDebuggerAgent::clear() 583 void InspectorDOMDebuggerAgent::clear()
584 { 584 {
585 m_domBreakpoints.clear(); 585 m_domBreakpoints.clear();
586 } 586 }
587 587
588 } // namespace blink 588 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698