| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/app_mode/kiosk_app_data.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 if (client_) | 215 if (client_) |
| 216 client_->OnWebstoreParseFailure(); | 216 client_->OnWebstoreParseFailure(); |
| 217 | 217 |
| 218 delete this; | 218 delete this; |
| 219 } | 219 } |
| 220 | 220 |
| 221 // WebstoreInstallHelper::Delegate overrides: | 221 // WebstoreInstallHelper::Delegate overrides: |
| 222 virtual void OnWebstoreParseSuccess( | 222 virtual void OnWebstoreParseSuccess( |
| 223 const std::string& id, | 223 const std::string& id, |
| 224 const SkBitmap& icon, | 224 const SkBitmap& icon, |
| 225 base::DictionaryValue* parsed_manifest) OVERRIDE { | 225 scoped_ptr<base::DictionaryValue> parsed_manifest) OVERRIDE { |
| 226 // Takes ownership of |parsed_manifest|. | 226 // Takes ownership of |parsed_manifest|. |
| 227 extensions::Manifest manifest( | 227 extensions::Manifest manifest( |
| 228 extensions::Manifest::INVALID_LOCATION, | 228 extensions::Manifest::INVALID_LOCATION, |
| 229 scoped_ptr<base::DictionaryValue>(parsed_manifest)); | 229 parsed_manifest.Pass()); |
| 230 | 230 |
| 231 if (!IsValidKioskAppManifest(manifest)) { | 231 if (!IsValidKioskAppManifest(manifest)) { |
| 232 ReportFailure(); | 232 ReportFailure(); |
| 233 return; | 233 return; |
| 234 } | 234 } |
| 235 | 235 |
| 236 if (client_) | 236 if (client_) |
| 237 client_->OnWebstoreParseSuccess(icon); | 237 client_->OnWebstoreParseSuccess(icon); |
| 238 delete this; | 238 delete this; |
| 239 } | 239 } |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 if (!response->GetString(key, value)) { | 455 if (!response->GetString(key, value)) { |
| 456 LOG(ERROR) << "Webstore response error (" << key | 456 LOG(ERROR) << "Webstore response error (" << key |
| 457 << "): " << ValueToString(response); | 457 << "): " << ValueToString(response); |
| 458 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError); | 458 OnWebstoreResponseParseFailure(kInvalidWebstoreResponseError); |
| 459 return false; | 459 return false; |
| 460 } | 460 } |
| 461 return true; | 461 return true; |
| 462 } | 462 } |
| 463 | 463 |
| 464 } // namespace chromeos | 464 } // namespace chromeos |
| OLD | NEW |