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

Side by Side Diff: chrome/browser/download/download_request_limiter.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 TabDownloadState() 124 TabDownloadState()
125 : host_(NULL), 125 : host_(NULL),
126 controller_(NULL), 126 controller_(NULL),
127 status_(DownloadRequestLimiter::ALLOW_ONE_DOWNLOAD), 127 status_(DownloadRequestLimiter::ALLOW_ONE_DOWNLOAD),
128 download_count_(0), 128 download_count_(0),
129 infobar_(NULL) { 129 infobar_(NULL) {
130 } 130 }
131 131
132 private: 132 private:
133 // NotificationObserver method. 133 // NotificationObserver method.
134 virtual void Observe(NotificationType type, 134 virtual void Observe(int type,
135 const NotificationSource& source, 135 const NotificationSource& source,
136 const NotificationDetails& details); 136 const NotificationDetails& details);
137 137
138 // Notifies the callbacks as to whether the download is allowed or not. 138 // Notifies the callbacks as to whether the download is allowed or not.
139 // Updates status_ appropriately. 139 // Updates status_ appropriately.
140 void NotifyCallbacks(bool allow); 140 void NotifyCallbacks(bool allow);
141 141
142 DownloadRequestLimiter* host_; 142 DownloadRequestLimiter* host_;
143 143
144 NavigationController* controller_; 144 NavigationController* controller_;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // the TabDownloadState is removed and deleted (by way of Remove). 246 // the TabDownloadState is removed and deleted (by way of Remove).
247 typedef std::map<NavigationController*, TabDownloadState*> StateMap; 247 typedef std::map<NavigationController*, TabDownloadState*> StateMap;
248 StateMap state_map_; 248 StateMap state_map_;
249 249
250 static TestingDelegate* delegate_; 250 static TestingDelegate* delegate_;
251 251
252 DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter); 252 DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter);
253 }; 253 };
254 254
255 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_ 255 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_request_limiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698