OLD | NEW |
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 #include "chrome/browser/extensions/webstore_installer.h" | 5 #include "chrome/browser/extensions/webstore_installer.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 using content::DownloadManager; | 55 using content::DownloadManager; |
56 using content::NavigationController; | 56 using content::NavigationController; |
57 using content::DownloadUrlParameters; | 57 using content::DownloadUrlParameters; |
58 | 58 |
59 namespace { | 59 namespace { |
60 | 60 |
61 // Key used to attach the Approval to the DownloadItem. | 61 // Key used to attach the Approval to the DownloadItem. |
62 const char kApprovalKey[] = "extensions.webstore_installer"; | 62 const char kApprovalKey[] = "extensions.webstore_installer"; |
63 | 63 |
64 const char kInvalidIdError[] = "Invalid id"; | 64 const char kInvalidIdError[] = "Invalid id"; |
65 const char kNoBrowserError[] = "No browser found"; | |
66 const char kDownloadDirectoryError[] = "Could not create download directory"; | 65 const char kDownloadDirectoryError[] = "Could not create download directory"; |
67 const char kDownloadCanceledError[] = "Download canceled"; | 66 const char kDownloadCanceledError[] = "Download canceled"; |
68 const char kInstallCanceledError[] = "Install canceled"; | 67 const char kInstallCanceledError[] = "Install canceled"; |
69 const char kDownloadInterruptedError[] = "Download interrupted"; | 68 const char kDownloadInterruptedError[] = "Download interrupted"; |
70 const char kInvalidDownloadError[] = | 69 const char kInvalidDownloadError[] = |
71 "Download was not a valid extension or user script"; | 70 "Download was not a valid extension or user script"; |
72 const char kInlineInstallSource[] = "inline"; | 71 const char kInlineInstallSource[] = "inline"; |
73 const char kDefaultInstallSource[] = "ondemand"; | 72 const char kDefaultInstallSource[] = "ondemand"; |
74 const char kAppLauncherInstallSource[] = "applauncher"; | 73 const char kAppLauncherInstallSource[] = "applauncher"; |
75 | 74 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 void WebstoreInstaller::ReportSuccess() { | 473 void WebstoreInstaller::ReportSuccess() { |
475 if (delegate_) { | 474 if (delegate_) { |
476 delegate_->OnExtensionInstallSuccess(id_); | 475 delegate_->OnExtensionInstallSuccess(id_); |
477 delegate_ = NULL; | 476 delegate_ = NULL; |
478 } | 477 } |
479 | 478 |
480 Release(); // Balanced in Start(). | 479 Release(); // Balanced in Start(). |
481 } | 480 } |
482 | 481 |
483 } // namespace extensions | 482 } // namespace extensions |
OLD | NEW |