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

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

Issue 1016003004: [BitmapFetcher] Added reference to OnFetchComplete url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chaging OnFetchComplete for bitmap fetcher Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/banners/app_banner_data_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 const base::string16& title); 116 const base::string16& title);
117 117
118 // Records that a banner was shown. The |event_name| corresponds to the RAPPOR 118 // Records that a banner was shown. The |event_name| corresponds to the RAPPOR
119 // metric being recorded. 119 // metric being recorded.
120 void RecordDidShowBanner(const std::string& event_name); 120 void RecordDidShowBanner(const std::string& event_name);
121 121
122 private: 122 private:
123 // Callbacks for data retrieval. 123 // Callbacks for data retrieval.
124 void OnDidGetManifest(const content::Manifest& manifest); 124 void OnDidGetManifest(const content::Manifest& manifest);
125 void OnDidCheckHasServiceWorker(bool has_service_worker); 125 void OnDidCheckHasServiceWorker(bool has_service_worker);
126 void OnFetchComplete(const GURL url, const SkBitmap* icon) override; 126 void OnFetchComplete(const GURL& url, const SkBitmap* icon) override;
127 127
128 // Shows a banner for the app, if the given |icon| is valid. 128 // Shows a banner for the app, if the given |icon| is valid.
129 virtual void ShowBanner(const SkBitmap* icon); 129 virtual void ShowBanner(const SkBitmap* icon);
130 130
131 // Record that the banner could be shown at this point, if the triggering 131 // Record that the banner could be shown at this point, if the triggering
132 // heuristic allowed. 132 // heuristic allowed.
133 void RecordCouldShowBanner(); 133 void RecordCouldShowBanner();
134 134
135 // Returns whether the banner should be shown. 135 // Returns whether the banner should be shown.
136 bool CheckIfShouldShowBanner(); 136 bool CheckIfShouldShowBanner();
(...skipping 14 matching lines...) Expand all
151 content::Manifest web_app_data_; 151 content::Manifest web_app_data_;
152 152
153 friend class AppBannerDataFetcherUnitTest; 153 friend class AppBannerDataFetcherUnitTest;
154 friend class base::RefCounted<AppBannerDataFetcher>; 154 friend class base::RefCounted<AppBannerDataFetcher>;
155 DISALLOW_COPY_AND_ASSIGN(AppBannerDataFetcher); 155 DISALLOW_COPY_AND_ASSIGN(AppBannerDataFetcher);
156 }; 156 };
157 157
158 } // namespace banners 158 } // namespace banners
159 159
160 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_ 160 #endif // CHROME_BROWSER_BANNERS_APP_BANNER_DATA_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/banners/app_banner_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698