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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api.h

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 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 | Annotate | Revision Log
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_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 DOWNLOADS_FUNCTION_SET_DESTINATION = 6, 59 DOWNLOADS_FUNCTION_SET_DESTINATION = 6,
60 DOWNLOADS_FUNCTION_ACCEPT_DANGER = 7, 60 DOWNLOADS_FUNCTION_ACCEPT_DANGER = 7,
61 DOWNLOADS_FUNCTION_SHOW = 8, 61 DOWNLOADS_FUNCTION_SHOW = 8,
62 DOWNLOADS_FUNCTION_DRAG = 9, 62 DOWNLOADS_FUNCTION_DRAG = 9,
63 DOWNLOADS_FUNCTION_GET_FILE_ICON = 10, 63 DOWNLOADS_FUNCTION_GET_FILE_ICON = 10,
64 // Insert new values here, not at the beginning. 64 // Insert new values here, not at the beginning.
65 DOWNLOADS_FUNCTION_LAST 65 DOWNLOADS_FUNCTION_LAST
66 }; 66 };
67 67
68 protected: 68 protected:
69 virtual ~DownloadsFunctionInterface() {}
70
69 // Return true if args_ is well-formed, otherwise set error_ and return false. 71 // Return true if args_ is well-formed, otherwise set error_ and return false.
70 virtual bool ParseArgs() = 0; 72 virtual bool ParseArgs() = 0;
71 73
72 // Implementation-specific logic. "Do the thing that you do." Should return 74 // Implementation-specific logic. "Do the thing that you do." Should return
73 // true if the call succeeded and false otherwise. 75 // true if the call succeeded and false otherwise.
74 virtual bool RunInternal() = 0; 76 virtual bool RunInternal() = 0;
75 77
76 // Which subclass is this. 78 // Which subclass is this.
77 virtual DownloadsFunctionName function() const = 0; 79 virtual DownloadsFunctionName function() const = 0;
78 80
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 Profile* profile_; 376 Profile* profile_;
375 content::DownloadManager* manager_; 377 content::DownloadManager* manager_;
376 ItemMap downloads_; 378 ItemMap downloads_;
377 ItemJsonMap item_jsons_; 379 ItemJsonMap item_jsons_;
378 OnChangedStatMap on_changed_stats_; 380 OnChangedStatMap on_changed_stats_;
379 381
380 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); 382 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter);
381 }; 383 };
382 384
383 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_ 385 #endif // CHROME_BROWSER_EXTENSIONS_API_DOWNLOADS_DOWNLOADS_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/content_settings_observer.h ('k') | chrome/browser/extensions/app_notify_channel_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698