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

Side by Side Diff: chrome/browser/download/download_extension_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: Created 8 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 | 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_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 DOWNLOADS_FUNCTION_SET_DESTINATION = 6, 60 DOWNLOADS_FUNCTION_SET_DESTINATION = 6,
61 DOWNLOADS_FUNCTION_ACCEPT_DANGER = 7, 61 DOWNLOADS_FUNCTION_ACCEPT_DANGER = 7,
62 DOWNLOADS_FUNCTION_SHOW = 8, 62 DOWNLOADS_FUNCTION_SHOW = 8,
63 DOWNLOADS_FUNCTION_DRAG = 9, 63 DOWNLOADS_FUNCTION_DRAG = 9,
64 DOWNLOADS_FUNCTION_GET_FILE_ICON = 10, 64 DOWNLOADS_FUNCTION_GET_FILE_ICON = 10,
65 // Insert new values here, not at the beginning. 65 // Insert new values here, not at the beginning.
66 DOWNLOADS_FUNCTION_LAST 66 DOWNLOADS_FUNCTION_LAST
67 }; 67 };
68 68
69 protected: 69 protected:
70 virtual ~DownloadsFunctionInterface() {}
71
70 // Return true if args_ is well-formed, otherwise set error_ and return false. 72 // Return true if args_ is well-formed, otherwise set error_ and return false.
71 virtual bool ParseArgs() = 0; 73 virtual bool ParseArgs() = 0;
72 74
73 // Implementation-specific logic. "Do the thing that you do." Should return 75 // Implementation-specific logic. "Do the thing that you do." Should return
74 // true if the call succeeded and false otherwise. 76 // true if the call succeeded and false otherwise.
75 virtual bool RunInternal() = 0; 77 virtual bool RunInternal() = 0;
76 78
77 // Which subclass is this. 79 // Which subclass is this.
78 virtual DownloadsFunctionName function() const = 0; 80 virtual DownloadsFunctionName function() const = 0;
79 81
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 content::DownloadManager* manager_; 378 content::DownloadManager* manager_;
377 ItemMap downloads_; 379 ItemMap downloads_;
378 ItemJsonMap item_jsons_; 380 ItemJsonMap item_jsons_;
379 STLValueDeleter<ItemJsonMap> delete_item_jsons_; 381 STLValueDeleter<ItemJsonMap> delete_item_jsons_;
380 OnChangedStatMap on_changed_stats_; 382 OnChangedStatMap on_changed_stats_;
381 STLValueDeleter<OnChangedStatMap> delete_on_changed_stats_; 383 STLValueDeleter<OnChangedStatMap> delete_on_changed_stats_;
382 384
383 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter); 385 DISALLOW_COPY_AND_ASSIGN(ExtensionDownloadsEventRouter);
384 }; 386 };
385 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_ 387 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698