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

Unified Diff: tools/deep_memory_profiler/lib/ordered_dict.py

Issue 19346002: Refactor dmprof: Split dmprof.py into modules. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: tools/deep_memory_profiler/lib/ordered_dict.py
diff --git a/tools/deep_memory_profiler/lib/ordered_dict.py b/tools/deep_memory_profiler/lib/ordered_dict.py
new file mode 100644
index 0000000000000000000000000000000000000000..11be63c1766fd297c9ab74305a905bae15a50eac
--- /dev/null
+++ b/tools/deep_memory_profiler/lib/ordered_dict.py
@@ -0,0 +1,19 @@
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# TODO(dmikurube): Remove this once Python 2.7 is required.
peria 2013/07/16 10:30:11 Remove this *file*?
Dai Mikurube (NOT FULLTIME) 2013/07/16 10:42:39 Done.
+
+import os
+import sys
+
+try:
+ from collections import OrderedDict # pylint: disable=E0611,W0611
+except ImportError:
+ _BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ _SIMPLEJSON_PATH = os.path.join(_BASE_PATH,
+ os.pardir,
+ os.pardir,
+ 'third_party')
+ sys.path.insert(0, _SIMPLEJSON_PATH)
+ from simplejson import OrderedDict # pylint: disable=W0611

Powered by Google App Engine
This is Rietveld 408576698