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

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

Issue 104493005: Update some uses of Value in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years 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) 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"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 icon_decode_complete_ = true; 145 icon_decode_complete_ = true;
146 error_ = kImageDecodeError; 146 error_ = kImageDecodeError;
147 parse_error_ = Delegate::ICON_ERROR; 147 parse_error_ = Delegate::ICON_ERROR;
148 ReportResultsIfComplete(); 148 ReportResultsIfComplete();
149 } 149 }
150 150
151 void WebstoreInstallHelper::OnJSONParseSucceeded( 151 void WebstoreInstallHelper::OnJSONParseSucceeded(
152 const base::ListValue& wrapper) { 152 const base::ListValue& wrapper) {
153 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 153 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
154 manifest_parse_complete_ = true; 154 manifest_parse_complete_ = true;
155 const Value* value = NULL; 155 const base::Value* value = NULL;
156 CHECK(wrapper.Get(0, &value)); 156 CHECK(wrapper.Get(0, &value));
157 if (value->IsType(Value::TYPE_DICTIONARY)) { 157 if (value->IsType(base::Value::TYPE_DICTIONARY)) {
158 parsed_manifest_.reset( 158 parsed_manifest_.reset(
159 static_cast<const DictionaryValue*>(value)->DeepCopy()); 159 static_cast<const base::DictionaryValue*>(value)->DeepCopy());
160 } else { 160 } else {
161 parse_error_ = Delegate::MANIFEST_ERROR; 161 parse_error_ = Delegate::MANIFEST_ERROR;
162 } 162 }
163 ReportResultsIfComplete(); 163 ReportResultsIfComplete();
164 } 164 }
165 165
166 void WebstoreInstallHelper::OnJSONParseFailed( 166 void WebstoreInstallHelper::OnJSONParseFailed(
167 const std::string& error_message) { 167 const std::string& error_message) {
168 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 168 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
169 manifest_parse_complete_ = true; 169 manifest_parse_complete_ = true;
(...skipping 22 matching lines...) Expand all
192 192
193 void WebstoreInstallHelper::ReportResultFromUIThread() { 193 void WebstoreInstallHelper::ReportResultFromUIThread() {
194 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 194 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
195 if (error_.empty() && parsed_manifest_) 195 if (error_.empty() && parsed_manifest_)
196 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release()); 196 delegate_->OnWebstoreParseSuccess(id_, icon_, parsed_manifest_.release());
197 else 197 else
198 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_); 198 delegate_->OnWebstoreParseFailure(id_, parse_error_, error_);
199 } 199 }
200 200
201 } // namespace extensions 201 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_listener_unittest.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698