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

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

Issue 1129103003: Log messages regarding why app banners aren't displayed to the console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Factoring out debug log message function Created 5 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_DATA_FETCHER_H_ 5 #ifndef CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
6 #define CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_ 6 #define CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Shows a banner for the app, if the given |icon| is valid. 131 // Shows a banner for the app, if the given |icon| is valid.
132 virtual void ShowBanner(const SkBitmap* icon); 132 virtual void ShowBanner(const SkBitmap* icon);
133 133
134 // Record that the banner could be shown at this point, if the triggering 134 // Record that the banner could be shown at this point, if the triggering
135 // heuristic allowed. 135 // heuristic allowed.
136 void RecordCouldShowBanner(); 136 void RecordCouldShowBanner();
137 137
138 // Returns whether the banner should be shown. 138 // Returns whether the banner should be shown.
139 bool CheckIfShouldShowBanner(); 139 bool CheckIfShouldShowBanner();
140 140
141 // Returns whether the fetcher is active and web contents have not been
142 // closed
143 bool CheckFetcherIsStillAlive(content::WebContents* web_contents,
144 const std::string& section);
145
141 // Returns whether the given Manifest is following the requirements to show 146 // Returns whether the given Manifest is following the requirements to show
142 // a web app banner. 147 // a web app banner.
143 static bool IsManifestValidForWebApp(const content::Manifest& manifest); 148 static bool IsManifestValidForWebApp(const content::Manifest& manifest,
149 content::WebContents* web_contents);
144 150
145 const int ideal_icon_size_; 151 const int ideal_icon_size_;
146 const base::WeakPtr<Delegate> weak_delegate_; 152 const base::WeakPtr<Delegate> weak_delegate_;
147 ObserverList<Observer> observer_list_; 153 ObserverList<Observer> observer_list_;
148 bool is_active_; 154 bool is_active_;
155 bool log_err_;
benwells 2015/05/11 08:08:40 Is this needed?
dominickn (DO NOT USE) 2015/05/12 07:41:31 Done.
149 int event_request_id_; 156 int event_request_id_;
150 scoped_ptr<chrome::BitmapFetcher> bitmap_fetcher_; 157 scoped_ptr<chrome::BitmapFetcher> bitmap_fetcher_;
151 scoped_ptr<SkBitmap> app_icon_; 158 scoped_ptr<SkBitmap> app_icon_;
152 159
153 GURL validated_url_; 160 GURL validated_url_;
154 base::string16 app_title_; 161 base::string16 app_title_;
155 content::Manifest web_app_data_; 162 content::Manifest web_app_data_;
156 163
157 friend class AppBannerDataFetcherUnitTest; 164 friend class AppBannerDataFetcherUnitTest;
158 friend class base::RefCounted<AppBannerDataFetcher>; 165 friend class base::RefCounted<AppBannerDataFetcher>;
159 DISALLOW_COPY_AND_ASSIGN(AppBannerDataFetcher); 166 DISALLOW_COPY_AND_ASSIGN(AppBannerDataFetcher);
160 }; 167 };
161 168
162 } // namespace banners 169 } // namespace banners
163 170
164 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_ 171 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698