#include "base/bind.h"
#include "base/values.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
#include "net/base/load_flags.h"
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
utility_host_ = UtilityProcessHost::Create(
this, base::MessageLoopProxy::current().get())->AsWeakPtr();
- utility_host_->EnableZygote();
utility_host_->StartBatchMode();
if (!icon_base64_data_.empty())
const net::URLFetcher* source) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CHECK(source == url_fetcher_.get());
- if (source->GetStatus().status() != net::URLRequestStatus::SUCCESS ||
- source->GetResponseCode() != 200) {
+ int response_code =
+ source->GetStatus().is_success() ? source->GetResponseCode() : 0;
+ if (!source->GetStatus().is_success() ||
+ response_code / 100 == 4 || response_code / 100 == 5) {
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
void WebstoreInstallHelper::StartFetchedImageDecode() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
CHECK(utility_host_.get());
- utility_host_->Send(new ChromeUtilityMsg_DecodeImage(fetched_icon_data_));
+ utility_host_->Send(new ChromeUtilityMsg_DecodeImage(fetched_icon_data_,
+ false));
}
const base::ListValue& wrapper) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
manifest_parse_complete_ = true;
- const Value* value = NULL;
+ const base::Value* value = NULL;
CHECK(wrapper.Get(0, &value));
- if (value->IsType(Value::TYPE_DICTIONARY)) {
+ if (value->IsType(base::Value::TYPE_DICTIONARY)) {
parsed_manifest_.reset(
- static_cast<const DictionaryValue*>(value)->DeepCopy());
+ static_cast<const base::DictionaryValue*>(value)->DeepCopy());
} else {
parse_error_ = Delegate::MANIFEST_ERROR;
}