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

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
« no previous file with comments | « tools/deep_memory_profiler/lib/exceptions.py ('k') | tools/deep_memory_profiler/lib/pageframe.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f7d053bd34929c9b359a3ec13f2a7f7f46f7fef9
--- /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 file once Python 2.7 is required.
+
+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
« no previous file with comments | « tools/deep_memory_profiler/lib/exceptions.py ('k') | tools/deep_memory_profiler/lib/pageframe.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698