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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set>
12 #include <string> 13 #include <string>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/callback_forward.h" 16 #include "base/callback_forward.h"
16 #include "base/files/file_path.h" 17 #include "base/files/file_path.h"
17 #include "base/macros.h" 18 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
19 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
20 #include "base/synchronization/lock.h" 21 #include "base/synchronization/lock.h"
21 #include "build/build_config.h" 22 #include "build/build_config.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 198
198 bool use_system_key_slot() const { return use_system_key_slot_; } 199 bool use_system_key_slot() const { return use_system_key_slot_; }
199 #endif 200 #endif
200 201
201 Profile::ProfileType profile_type() const { 202 Profile::ProfileType profile_type() const {
202 return profile_type_; 203 return profile_type_;
203 } 204 }
204 205
205 bool IsOffTheRecord() const; 206 bool IsOffTheRecord() const;
206 207
208 // Used when deciding whether or not to record
209 // Navigation.SchemePerUniqueOrigin[OTR]. Inserts a copy of |origin| into the
210 // set |origins_seen_|, and returns whether or not |origin| was already in the
211 // set.
212 bool HaveAlreadySeenOrigin(const url::Origin& origin);
213
207 IntegerPrefMember* incognito_availibility() const { 214 IntegerPrefMember* incognito_availibility() const {
208 return &incognito_availibility_pref_; 215 return &incognito_availibility_pref_;
209 } 216 }
210 217
211 chrome_browser_net::ResourcePrefetchPredictorObserver* 218 chrome_browser_net::ResourcePrefetchPredictorObserver*
212 resource_prefetch_predictor_observer() const { 219 resource_prefetch_predictor_observer() const {
213 return resource_prefetch_predictor_observer_.get(); 220 return resource_prefetch_predictor_observer_.get();
214 } 221 }
215 222
216 policy::PolicyHeaderIOHelper* policy_header_helper() const { 223 policy::PolicyHeaderIOHelper* policy_header_helper() const {
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 extension_throttle_manager_; 598 extension_throttle_manager_;
592 #endif 599 #endif
593 600
594 mutable DevToolsNetworkControllerHandle network_controller_handle_; 601 mutable DevToolsNetworkControllerHandle network_controller_handle_;
595 602
596 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 603 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
597 bool initialized_on_UI_thread_; 604 bool initialized_on_UI_thread_;
598 605
599 const Profile::ProfileType profile_type_; 606 const Profile::ProfileType profile_type_;
600 607
608 // Used by |HaveAlreadySeenOrigin|.
609 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
610
601 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 611 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
602 }; 612 };
603 613
604 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 614 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW
« 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