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

Unified Diff: content/browser/dom_storage/dom_storage_context_impl.cc

Issue 896733002: Revert of offset namespace ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « content/browser/dom_storage/dom_storage_context_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_context_impl.cc
diff --git a/content/browser/dom_storage/dom_storage_context_impl.cc b/content/browser/dom_storage/dom_storage_context_impl.cc
index 7e9d16e65be54c6866f9ffea82f068bb5a322808..db9681cfe72208acbdc22d1d61366e12fbfaad82 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl.cc
@@ -3,8 +3,6 @@
// found in the LICENSE file.
#include "content/browser/dom_storage/dom_storage_context_impl.h"
-
-#include <stdlib.h>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -28,10 +26,6 @@
static const int kSessionStoraceScavengingSeconds = 60;
-// Offset the session storage namespace ids generated by different contexts
-// to help identify when an id from one is mistakenly used in another.
-static int g_session_id_offset_sequence = 0;
-
DOMStorageContextImpl::DOMStorageContextImpl(
const base::FilePath& localstorage_directory,
const base::FilePath& sessionstorage_directory,
@@ -40,7 +34,6 @@
: localstorage_directory_(localstorage_directory),
sessionstorage_directory_(sessionstorage_directory),
task_runner_(task_runner),
- session_id_offset_(abs((g_session_id_offset_sequence++ % 10)) * 1000),
is_shutdown_(false),
force_keep_session_state_(false),
special_storage_policy_(special_storage_policy),
@@ -234,10 +227,6 @@
OnDOMStorageAreaCleared(area, page_url));
}
-int64 DOMStorageContextImpl::AllocateSessionId() {
- return session_id_sequence_.GetNext() + session_id_offset_;
-}
-
std::string DOMStorageContextImpl::AllocatePersistentSessionId() {
std::string guid = base::GenerateGUID();
std::replace(guid.begin(), guid.end(), '-', '_');
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698