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

Side by Side Diff: chrome/browser/extensions/webstore_installer.cc

Issue 8983012: Get rid of content::NavigationController in cc file and use "using" instead. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 16 matching lines...) Expand all
27 #include "content/public/browser/download_manager.h" 27 #include "content/public/browser/download_manager.h"
28 #include "content/public/browser/navigation_controller.h" 28 #include "content/public/browser/navigation_controller.h"
29 #include "content/public/browser/navigation_entry.h" 29 #include "content/public/browser/navigation_entry.h"
30 #include "content/public/browser/notification_details.h" 30 #include "content/public/browser/notification_details.h"
31 #include "content/public/browser/notification_source.h" 31 #include "content/public/browser/notification_source.h"
32 #include "googleurl/src/gurl.h" 32 #include "googleurl/src/gurl.h"
33 #include "net/base/escape.h" 33 #include "net/base/escape.h"
34 34
35 using content::BrowserThread; 35 using content::BrowserThread;
36 using content::DownloadFile; 36 using content::DownloadFile;
37 using content::NavigationController;
37 38
38 namespace { 39 namespace {
39 40
40 const char kInvalidIdError[] = "Invalid id"; 41 const char kInvalidIdError[] = "Invalid id";
41 const char kNoBrowserError[] = "No browser found"; 42 const char kNoBrowserError[] = "No browser found";
42 const char kDownloadDirectoryError[] = "Could not create download directory"; 43 const char kDownloadDirectoryError[] = "Could not create download directory";
43 44
44 const char kInlineInstallSource[] = "inline"; 45 const char kInlineInstallSource[] = "inline";
45 const char kDefaultInstallSource[] = ""; 46 const char kDefaultInstallSource[] = "";
46 47
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 98
98 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 99 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
99 base::Bind(callback, file)); 100 base::Bind(callback, file));
100 } 101 }
101 102
102 } // namespace 103 } // namespace
103 104
104 105
105 WebstoreInstaller::WebstoreInstaller(Profile* profile, 106 WebstoreInstaller::WebstoreInstaller(Profile* profile,
106 Delegate* delegate, 107 Delegate* delegate,
107 content::NavigationController* controller, 108 NavigationController* controller,
108 const std::string& id, 109 const std::string& id,
109 int flags) 110 int flags)
110 : profile_(profile), 111 : profile_(profile),
111 delegate_(delegate), 112 delegate_(delegate),
112 controller_(controller), 113 controller_(controller),
113 id_(id), 114 id_(id),
114 flags_(flags) { 115 flags_(flags) {
115 download_url_ = GetWebstoreInstallURL(id, flags & FLAG_INLINE_INSTALL ? 116 download_url_ = GetWebstoreInstallURL(id, flags & FLAG_INLINE_INSTALL ?
116 kInlineInstallSource : kDefaultInstallSource); 117 kInlineInstallSource : kDefaultInstallSource);
117 118
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 211
211 Release(); // Balanced in Start(). 212 Release(); // Balanced in Start().
212 } 213 }
213 214
214 void WebstoreInstaller::ReportSuccess() { 215 void WebstoreInstaller::ReportSuccess() {
215 if (delegate_) 216 if (delegate_)
216 delegate_->OnExtensionInstallSuccess(id_); 217 delegate_->OnExtensionInstallSuccess(id_);
217 218
218 Release(); // Balanced in Start(). 219 Release(); // Balanced in Start().
219 } 220 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/isolated_app_browsertest.cc ('k') | chrome/browser/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698