1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef WebTraceLocation_h 6#define WebTraceLocation_h 7 8namespace blink { 9 10// This class is used to keep track of where posted tasks originate. See base/location.h in Chromium. 11class WebTraceLocation { 12public: 13 // The strings passed in are not copied and must live for the duration of the program. 14 WebTraceLocation(const char* functionName, const char* fileName) 15 : m_functionName(functionName) 16 , m_fileName(fileName) 17 { } 18 19 const char* functionName() const { return m_functionName; } 20 const char* fileName() const { return m_fileName; } 21 22private: 23 const char* m_functionName; 24 const char* m_fileName; 25}; 26 27} 28 29#endif // WebTraceLocation_h 30