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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. 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/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "content/public/common/url_fetcher.h" 13 #include "content/public/common/url_fetcher.h"
14 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
15 #include "net/url_request/url_request_status.h" 15 #include "net/url_request/url_request_status.h"
16 16
17 using content::BrowserThread;
18
17 namespace { 19 namespace {
18 20
19 const char kImageDecodeError[] = "Image decode failed"; 21 const char kImageDecodeError[] = "Image decode failed";
20 22
21 } // namespace 23 } // namespace
22 24
23 WebstoreInstallHelper::WebstoreInstallHelper( 25 WebstoreInstallHelper::WebstoreInstallHelper(
24 Delegate* delegate, 26 Delegate* delegate,
25 const std::string& id, 27 const std::string& id,
26 const std::string& manifest, 28 const std::string& manifest,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this)); 180 base::Bind(&WebstoreInstallHelper::ReportResultFromUIThread, this));
179 } 181 }
180 182
181 void WebstoreInstallHelper::ReportResultFromUIThread() { 183 void WebstoreInstallHelper::ReportResultFromUIThread() {
182 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 184 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
183 if (error_.empty() && parsed_manifest_.get()) 185 if (error_.empty() && parsed_manifest_.get())
184 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); 186 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release());
185 else 187 else
186 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); 188 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_);
187 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698