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

Side by Side Diff: chrome/browser/banners/app_banner_settings_helper.h

Issue 1161233005: Implement app banner info bars on desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stop-icon-overgeneration
Patch Set: Fixing display bug on Android Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BANNERS_APP_BANNER_SETTINGS_HELPER_H_ 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_SETTINGS_HELPER_H_
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_SETTINGS_HELPER_H_ 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_SETTINGS_HELPER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 APP_BANNER_EVENT_NUM_EVENTS, 46 APP_BANNER_EVENT_NUM_EVENTS,
47 }; 47 };
48 48
49 // The content setting basically records a simplified subset of history. 49 // The content setting basically records a simplified subset of history.
50 // For privacy reasons this needs to be cleared. The ClearHistoryForURLs 50 // For privacy reasons this needs to be cleared. The ClearHistoryForURLs
51 // function removes any information from the banner content settings for the 51 // function removes any information from the banner content settings for the
52 // given URls. 52 // given URls.
53 static void ClearHistoryForURLs(Profile* profile, 53 static void ClearHistoryForURLs(Profile* profile,
54 const std::set<GURL>& origin_urls); 54 const std::set<GURL>& origin_urls);
55 55
56 static void RecordBannerWebInstallEvent(
57 content::WebContents* web_contents,
58 const std::string& package_name_or_start_url,
59 const std::string& rappor_metric,
60 int event_request_id_);
61
62 static void RecordBannerDismissEvent(
63 content::WebContents* web_contents,
64 const std::string& package_name_or_start_url,
65 const std::string& rappor_metric,
66 int event_request_id_);
67
56 static void RecordBannerEvent(content::WebContents* web_contents, 68 static void RecordBannerEvent(content::WebContents* web_contents,
57 const GURL& origin_url, 69 const GURL& origin_url,
58 const std::string& package_name_or_start_url, 70 const std::string& package_name_or_start_url,
59 AppBannerEvent event, 71 AppBannerEvent event,
60 base::Time time); 72 base::Time time);
61 73
62 // Determine if the banner should be shown, given the recorded events for the 74 // Determine if the banner should be shown, given the recorded events for the
63 // supplied app. 75 // supplied app.
64 static bool ShouldShowBanner(content::WebContents* web_contents, 76 static bool ShouldShowBanner(content::WebContents* web_contents,
65 const GURL& origin_url, 77 const GURL& origin_url,
(...skipping 14 matching lines...) Expand all
80 content::WebContents* web_contents, 92 content::WebContents* web_contents,
81 const GURL& origin_url, 93 const GURL& origin_url,
82 const std::string& package_name_or_start_url, 94 const std::string& package_name_or_start_url,
83 AppBannerEvent event); 95 AppBannerEvent event);
84 96
85 private: 97 private:
86 DISALLOW_IMPLICIT_CONSTRUCTORS(AppBannerSettingsHelper); 98 DISALLOW_IMPLICIT_CONSTRUCTORS(AppBannerSettingsHelper);
87 }; 99 };
88 100
89 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_SETTINGS_HELPER_H_ 101 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_SETTINGS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698