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

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

Issue 10703142: Move WebstoreInstaller, WebstoreInlineInstaller, related in extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest merge with master for cq Created 8 years, 5 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
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 #include "chrome/browser/extensions/webstore_install_helper.h" 5 #include "chrome/browser/extensions/webstore_install_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/common/chrome_utility_messages.h" 11 #include "chrome/common/chrome_utility_messages.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "content/public/browser/utility_process_host.h" 13 #include "content/public/browser/utility_process_host.h"
14 #include "net/base/load_flags.h" 14 #include "net/base/load_flags.h"
15 #include "net/url_request/url_fetcher.h" 15 #include "net/url_request/url_fetcher.h"
16 #include "net/url_request/url_request_context_getter.h" 16 #include "net/url_request/url_request_context_getter.h"
17 #include "net/url_request/url_request_status.h" 17 #include "net/url_request/url_request_status.h"
18 18
19 using content::BrowserThread; 19 using content::BrowserThread;
20 using content::UtilityProcessHost; 20 using content::UtilityProcessHost;
21 21
22 namespace { 22 namespace {
23 23
24 const char kImageDecodeError[] = "Image decode failed"; 24 const char kImageDecodeError[] = "Image decode failed";
25 25
26 } // namespace 26 } // namespace
27 27
28 namespace extensions {
29
28 WebstoreInstallHelper::WebstoreInstallHelper( 30 WebstoreInstallHelper::WebstoreInstallHelper(
29 Delegate* delegate, 31 Delegate* delegate,
30 const std::string& id, 32 const std::string& id,
31 const std::string& manifest, 33 const std::string& manifest,
32 const std::string& icon_data, 34 const std::string& icon_data,
33 const GURL& icon_url, 35 const GURL& icon_url,
34 net::URLRequestContextGetter* context_getter) 36 net::URLRequestContextGetter* context_getter)
35 : delegate_(delegate), 37 : delegate_(delegate),
36 id_(id), 38 id_(id),
37 manifest_(manifest), 39 manifest_(manifest),
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this)); 190 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this));
189 } 191 }
190 192
191 void WebstoreInstallHelper::ReportResultFromUIThread() { 193 void WebstoreInstallHelper::ReportResultFromUIThread() {
192 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 194 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
193 if (error_.empty() && parsed_manifest_.get()) 195 if (error_.empty() && parsed_manifest_.get())
194 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); 196 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release());
195 else 197 else
196 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); 198 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_);
197 } 199 }
200
201 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_install_helper.h ('k') | chrome/browser/extensions/webstore_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698