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

Unified Diff: webkit/browser/fileapi/obfuscated_file_util.cc

Issue 24029004: Add UMA to see how many times HasIsolatedOrigin origin has more than one origin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/obfuscated_file_util.cc
diff --git a/webkit/browser/fileapi/obfuscated_file_util.cc b/webkit/browser/fileapi/obfuscated_file_util.cc
index 7e2f7df12a8c9da425258191ce8bce308fd8bfe5..b2ad3b7b8a35ffba4471f47953b797c5eed42099 100644
--- a/webkit/browser/fileapi/obfuscated_file_util.cc
+++ b/webkit/browser/fileapi/obfuscated_file_util.cc
@@ -12,6 +12,7 @@
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -99,6 +100,12 @@ const base::FilePath::CharType kTemporaryDirectoryName[] = FILE_PATH_LITERAL("t"
const base::FilePath::CharType kPersistentDirectoryName[] = FILE_PATH_LITERAL("p");
const base::FilePath::CharType kSyncableDirectoryName[] = FILE_PATH_LITERAL("s");
+enum IsolatedOriginStatus {
+ kIsolatedOriginMatch,
+ kIsolatedOriginDontMatch,
+ kIsolatedOriginStatusMax,
+};
+
} // namespace
using base::PlatformFile;
@@ -1436,6 +1443,15 @@ bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) {
isolated_origin_ = origin;
// Record isolated_origin_, but always disable for now.
// crbug.com/264429
+ if (isolated_origin_ != origin) {
+ UMA_HISTOGRAM_ENUMERATION("FileSystem.IsolatedOriginStatus",
+ kIsolatedOriginDontMatch,
+ kIsolatedOriginStatusMax);
+ } else {
+ UMA_HISTOGRAM_ENUMERATION("FileSystem.IsolatedOriginStatus",
+ kIsolatedOriginMatch,
+ kIsolatedOriginStatusMax);
+ }
return false;
}
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698