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

Unified Diff: chrome/browser/profiles/profile_io_data.h

Issue 1844753002: Histogram the scheme of an origin on the 1st navigation to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Describe |HaveAlreadySeen|'s side-effect. 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: chrome/browser/profiles/profile_io_data.h
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
index de32c6e55625485ddd56d647c6b6293c67844bb3..85a023c8914a9c2e35f9603b5d9a029ff97357f3 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
+#include <set>
#include <string>
#include <vector>
@@ -204,6 +205,12 @@ class ProfileIOData {
bool IsOffTheRecord() const;
+ // Used when deciding whether or not to record
+ // Navigation.SchemePerUniqueOrigin[OTR]. Inserts a copy of |origin| into the
+ // set |origins_seen_|, and returns whether or not |origin| was already in the
+ // set.
+ bool HaveAlreadySeenOrigin(const url::Origin& origin);
+
IntegerPrefMember* incognito_availibility() const {
return &incognito_availibility_pref_;
}
@@ -598,6 +605,9 @@ class ProfileIOData {
const Profile::ProfileType profile_type_;
+ // Used by |HaveAlreadySeenOrigin|.
+ std::set<url::Origin> origins_seen_;
mmenke 2016/04/08 20:42:29 Not a huge fan of unbounded memory use - yes, it s
mmenke 2016/04/08 20:45:06 Also wondering, is this really want you want? I'm
palmer 2016/04/08 21:52:02 Yes, it is. Our goal is to show a verbose security
palmer 2016/04/08 21:52:02 I feel that unbounded memory concern, but it's cor
mmenke 2016/04/08 22:56:29 Are we thinking the feature itself would work simi
cbentzel 2016/04/09 23:29:15 Would base/containers/mru_cache.h suffice (not a s
+
DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
};
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.cc » ('j') | chrome/browser/tab_contents/navigation_metrics_recorder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698