<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -62,7 +62,6 @@ function TLoggerGlobals() {
 	var nextWindowId = 0;
 	var log;
 	var focusLog;
-	var stringTable;
 	
 	const FORMAT_HEX = 16;
 
@@ -216,7 +215,7 @@ function TLoggerGlobals() {
 		
 		// Return the public functions
 		return { &quot;obfuscateString&quot;:obfuscateString, &quot;search&quot;:search };
-	}
+	}	
 	
 	/*
 	 * Log Class
@@ -371,7 +370,17 @@ function TLoggerGlobals() {
 		.getService(Ci.nsIObserverService);
 	service.addObserver(globalObserver, &quot;quit-application&quot;, false);
 
-	stringTable = new StringTable();
+	// For now, always create the string table...
+	var stringTable = new StringTable();
+
+	// ...but set the obfuscation function based on the pref
+	var obfuscateString;
+	var prefManager = Cc[&quot;@mozilla.org/preferences-service;1&quot;].getService(Ci.nsIPrefBranch);
+	if (prefManager.getBoolPref(&quot;extensions.tlogger.obfuscateURLs&quot;)) {
+		obfuscateString = stringTable.obfuscateString;
+	} else {
+		obfuscateString = function(str) { return str; }; // no-op
+	}	
 
 	// Public members
 	this.QueryInterface = QueryInterface;
@@ -380,10 +389,12 @@ function TLoggerGlobals() {
 	this.getDataDirFile = getDataDirFile;
 	this.getLog = getLog;
 	this.getFocusLog = getFocusLog;
-	this.stringTable = stringTable;
 	this.lastQuestionTimeMillis = lastQuestionTimeMillis;
 	this.firefoxMajorVersion = firefoxMajorVersion;
 	this.showLogFile = showLogFile;
+
+	this.obfuscateString = obfuscateString;
+	this.searchStringTable = stringTable.search;
 };
 
 </diff>
      <filename>extension/components/tlogger-globals.js</filename>
    </modified>
    <modified>
      <diff>@@ -332,7 +332,7 @@ function window_onload() {
 		log_write = globals.buildLogFunction({&quot;win&quot;:getWindowId()});
 
 		// A succinctly-named convenience function
-		obf = globals.stringTable.obfuscateString;	
+		obf = globals.obfuscateString;
 
 		log_write(&quot;window_onload&quot;);
 	} catch (ex) {
@@ -1418,7 +1418,7 @@ function searchForSite(exact)
 	try {
 		var str = prompt(&quot;Enter string to search for:&quot;);
 		if (str) {
-			var matches = globals.stringTable.search(str);
+			var matches = globals.searchStringTable(str);
 			var hostnames = [];
 			for each (var hit in matches) {
 				// Check if the hit looks like a hostname</diff>
      <filename>extension/content/tlogger.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,4 @@
 pref(&quot;extensions.tlogger.questionSamplingPercentage&quot;, 0);
 pref(&quot;extensions.tlogger.captureScreenshots&quot;, false);
+pref(&quot;extensions.tlogger.obfuscateURLs&quot;, true);
+</diff>
      <filename>extension/defaults/preferences/tlogger-prefs.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fcab8e17a6b7221b6480f5b9175992cc4fc3aa5a</id>
    </parent>
  </parents>
  <author>
    <name>Patrick Dubroy</name>
    <email>pdubroy@gmail.com</email>
  </author>
  <url>http://github.com/pdubroy/tlogger/commit/80c4f17c0924eeedabb0d3175fc8739a9b05bc6c</url>
  <id>80c4f17c0924eeedabb0d3175fc8739a9b05bc6c</id>
  <committed-date>2009-02-13T09:42:38-08:00</committed-date>
  <authored-date>2009-02-13T09:42:38-08:00</authored-date>
  <message>Make string obfuscation a preference</message>
  <tree>7a5d1299370b39190270472d358b98763ee39476</tree>
  <committer>
    <name>Patrick Dubroy</name>
    <email>pdubroy@gmail.com</email>
  </committer>
</commit>
