58 void |
58 void |
59 DataStruct::SetData ( nsISupports* aData, uint32_t aDataLen, bool aIsPrivBrowsing ) |
59 DataStruct::SetData ( nsISupports* aData, uint32_t aDataLen, bool aIsPrivBrowsing ) |
60 { |
60 { |
61 // Now, check to see if we consider the data to be "too large" |
61 // Now, check to see if we consider the data to be "too large" |
62 // as well as ensuring that private browsing mode is disabled |
62 // as well as ensuring that private browsing mode is disabled |
63 if (aDataLen > kLargeDatasetSize && aIsPrivBrowsing == false) { |
63 if (aDataLen > kLargeDatasetSize && !aIsPrivBrowsing) { |
64 // if so, cache it to disk instead of memory |
64 // if so, cache it to disk instead of memory |
65 if ( NS_SUCCEEDED(WriteCache(aData, aDataLen)) ) |
65 if ( NS_SUCCEEDED(WriteCache(aData, aDataLen)) ) |
66 return; |
66 return; |
67 else |
67 else |
68 NS_WARNING("Oh no, couldn't write data to the cache file"); |
68 NS_WARNING("Oh no, couldn't write data to the cache file"); |