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

Unified Diff: tools/android/loading/loading_trace_database.py

Issue 1908483002: tools/android/loading Loading trace database improvements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor cleanup Created 4 years, 8 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/android/loading/loading_trace_database.py
diff --git a/tools/android/loading/loading_trace_database.py b/tools/android/loading/loading_trace_database.py
index 2ef33b081800e59cebd41fc34855a85e061cc94d..dad6153ac3e2e3fea9f88b424ed79866b2459277 100644
--- a/tools/android/loading/loading_trace_database.py
+++ b/tools/android/loading/loading_trace_database.py
@@ -14,9 +14,10 @@ class LoadingTraceDatabase(object):
about those traces."""
self._traces_dict = traces_dict
- def AddTrace(self, filename, trace_dict):
- """Adds a mapping from |filename| to |trace_dict| into the database."""
- assert filename not in self._traces_dict
+ def SetTrace(self, filename, trace_dict):
+ """Sets a mapping from |filename| to |trace_dict| into the database.
+ If there is an existing mapping for filename, it is replaced.
+ """
self._traces_dict[filename] = trace_dict
def GetTraceFilesForURL(self, url):
« no previous file with comments | « tools/android/loading/cloud/backend/worker.py ('k') | tools/android/loading/loading_trace_database_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698