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

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

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and remove unncessary forward declares Created 9 years, 1 month 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_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/browser/browser_thread.h" 12 #include "content/browser/browser_thread.h"
13 #include "content/common/net/url_fetcher.h"
13 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
14 #include "net/url_request/url_request_status.h" 15 #include "net/url_request/url_request_status.h"
15 16
16 namespace { 17 namespace {
17 18
18 const char kImageDecodeError[] = "Image decode failed"; 19 const char kImageDecodeError[] = "Image decode failed";
19 20
20 } // namespace 21 } // namespace
21 22
22 WebstoreInstallHelper::WebstoreInstallHelper( 23 WebstoreInstallHelper::WebstoreInstallHelper(
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this)); 174 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this));
174 } 175 }
175 176
176 void WebstoreInstallHelper::ReportResultFromUIThread() { 177 void WebstoreInstallHelper::ReportResultFromUIThread() {
177 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 178 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
178 if (error_.empty() && parsed_manifest_.get()) 179 if (error_.empty() && parsed_manifest_.get())
179 delegate_->OnWebstoreParseSuccess(icon_, parsed_manifest_.release()); 180 delegate_->OnWebstoreParseSuccess(icon_, parsed_manifest_.release());
180 else 181 else
181 delegate_->OnWebstoreParseFailure(parse_error_, error_); 182 delegate_->OnWebstoreParseFailure(parse_error_, error_);
182 } 183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698