Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / common / stack_frame.h
blobdf66180d4f16d7371e72be73bdd501acb0a48dc7
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_COMMON_STACK_FRAME_H_
6 #define EXTENSIONS_COMMON_STACK_FRAME_H_
8 #include <vector>
10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h"
13 namespace extensions {
15 struct StackFrame {
16 StackFrame();
17 StackFrame(const StackFrame& frame);
18 StackFrame(size_t line_number,
19 size_t column_number,
20 const base::string16& source,
21 const base::string16& function);
22 ~StackFrame();
24 // Construct a stack frame from a reported plain-text frame.
25 static scoped_ptr<StackFrame> CreateFromText(
26 const base::string16& frame_text);
28 bool operator==(const StackFrame& rhs) const;
30 size_t line_number;
31 size_t column_number;
32 base::string16 source;
33 base::string16 function; // optional
36 typedef std::vector<StackFrame> StackTrace;
38 } // namespace extensions
40 #endif // EXTENSIONS_COMMON_STACK_FRAME_H_