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

Unified Diff: base/tracked.cc

Issue 3012001: Move implementation from header to source. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: blank line Created 10 years, 5 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
« base/tracked.h ('K') | « base/tracked.h ('k') | base/values.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked.cc
diff --git a/base/tracked.cc b/base/tracked.cc
index fdac6d3ad7e4b0645d00e035d455e5cc9a7b0c92..f07f5bf9a02a11123513b8ffc88874333e2983c4 100644
--- a/base/tracked.cc
+++ b/base/tracked.cc
@@ -12,6 +12,28 @@ using base::TimeTicks;
namespace tracked_objects {
//------------------------------------------------------------------------------
+
+Location::Location(const char* function_name, const char* file_name,
+ int line_number)
+ : function_name_(function_name),
+ file_name_(file_name),
+ line_number_(line_number) {
+}
+
+Location::Location()
+ : function_name_("Unknown"),
+ file_name_("Unknown"),
+ line_number_(-1) {
+}
+
+bool Location::operator < (const Location& other) const {
+ if (line_number_ != other.line_number_)
+ return line_number_ < other.line_number_;
+ if (file_name_ != other.file_name_)
+ return file_name_ < other.file_name_;
+ return function_name_ < other.function_name_;
+}
+
void Location::Write(bool display_filename, bool display_function_name,
std::string* output) const {
StringAppendF(output, "%s[%d] ",
« base/tracked.h ('K') | « base/tracked.h ('k') | base/values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698