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

Side by Side Diff: chrome/browser/plugins/plugin_installer.h

Issue 114193009: [Download] Return DownloadInterruptReason from OnStartedCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/plugins/plugin_installer.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 (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_PLUGINS_PLUGIN_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/version.h" 10 #include "base/version.h"
11 #include "chrome/browser/plugins/plugin_metadata.h" 11 #include "chrome/browser/plugins/plugin_metadata.h"
12 #include "content/public/browser/download_interrupt_reasons.h"
12 #include "content/public/browser/download_item.h" 13 #include "content/public/browser/download_item.h"
13 #include "net/base/net_errors.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 class PluginInstallerObserver; 16 class PluginInstallerObserver;
17 class WeakPluginInstallerObserver; 17 class WeakPluginInstallerObserver;
18 18
19 namespace content { 19 namespace content {
20 class WebContents; 20 class WebContents;
21 struct WebPluginInfo; 21 struct WebPluginInfo;
22 } 22 }
23 23
(...skipping 21 matching lines...) Expand all
45 // Opens the download URL in a new tab. 45 // Opens the download URL in a new tab.
46 void OpenDownloadURL(const GURL& plugin_url, 46 void OpenDownloadURL(const GURL& plugin_url,
47 content::WebContents* web_contents); 47 content::WebContents* web_contents);
48 48
49 // Starts downloading the download URL and opens the downloaded file 49 // Starts downloading the download URL and opens the downloaded file
50 // when finished. 50 // when finished.
51 void StartInstalling(const GURL& plugin_url, 51 void StartInstalling(const GURL& plugin_url,
52 content::WebContents* web_contents); 52 content::WebContents* web_contents);
53 53
54 private: 54 private:
55 void DownloadStarted(content::DownloadItem* item, net::Error error); 55 void DownloadStarted(content::DownloadItem* item,
56 content::DownloadInterruptReason interrupt_reason);
56 void DownloadError(const std::string& msg); 57 void DownloadError(const std::string& msg);
57 void DownloadCancelled(); 58 void DownloadCancelled();
58 59
59 InstallerState state_; 60 InstallerState state_;
60 ObserverList<PluginInstallerObserver> observers_; 61 ObserverList<PluginInstallerObserver> observers_;
61 int strong_observer_count_; 62 int strong_observer_count_;
62 ObserverList<WeakPluginInstallerObserver> weak_observers_; 63 ObserverList<WeakPluginInstallerObserver> weak_observers_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); 65 DISALLOW_COPY_AND_ASSIGN(PluginInstaller);
65 }; 66 };
66 67
67 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ 68 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/browser/plugins/plugin_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698