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 27 matching lines...) Expand all Loading... |
38 #include "googleurl/src/gurl.h" | 38 #include "googleurl/src/gurl.h" |
39 #include "net/base/escape.h" | 39 #include "net/base/escape.h" |
40 | 40 |
41 using content::BrowserContext; | 41 using content::BrowserContext; |
42 using content::BrowserThread; | 42 using content::BrowserThread; |
43 using content::DownloadId; | 43 using content::DownloadId; |
44 using content::DownloadItem; | 44 using content::DownloadItem; |
45 using content::DownloadManager; | 45 using content::DownloadManager; |
46 using content::NavigationController; | 46 using content::NavigationController; |
47 using content::DownloadUrlParameters; | 47 using content::DownloadUrlParameters; |
| 48 using extensions::CrxInstaller; |
48 | 49 |
49 namespace { | 50 namespace { |
50 | 51 |
51 using extensions::Extension; | 52 using extensions::Extension; |
52 | 53 |
53 // Key used to attach the Approval to the DownloadItem. | 54 // Key used to attach the Approval to the DownloadItem. |
54 const char kApprovalKey[] = "extensions.webstore_installer"; | 55 const char kApprovalKey[] = "extensions.webstore_installer"; |
55 | 56 |
56 const char kInvalidIdError[] = "Invalid id"; | 57 const char kInvalidIdError[] = "Invalid id"; |
57 const char kNoBrowserError[] = "No browser found"; | 58 const char kNoBrowserError[] = "No browser found"; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 342 } |
342 | 343 |
343 void WebstoreInstaller::ReportSuccess() { | 344 void WebstoreInstaller::ReportSuccess() { |
344 if (delegate_) { | 345 if (delegate_) { |
345 delegate_->OnExtensionInstallSuccess(id_); | 346 delegate_->OnExtensionInstallSuccess(id_); |
346 delegate_ = NULL; | 347 delegate_ = NULL; |
347 } | 348 } |
348 | 349 |
349 Release(); // Balanced in Start(). | 350 Release(); // Balanced in Start(). |
350 } | 351 } |
OLD | NEW |