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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 DictionaryPrefUpdate dict_update(local_state, | 271 DictionaryPrefUpdate dict_update(local_state, |
272 KioskAppManager::kKioskDictionaryName); | 272 KioskAppManager::kKioskDictionaryName); |
273 | 273 |
274 std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + app_id_; | 274 std::string app_key = std::string(KioskAppManager::kKeyApps) + '.' + app_id_; |
275 dict_update->Remove(app_key, NULL); | 275 dict_update->Remove(app_key, NULL); |
276 | 276 |
277 if (!icon_path_.empty()) { | 277 if (!icon_path_.empty()) { |
278 BrowserThread::PostBlockingPoolTask( | 278 BrowserThread::PostBlockingPoolTask( |
279 FROM_HERE, | 279 FROM_HERE, |
280 base::Bind(base::IgnoreResult(&file_util::Delete), icon_path_, false)); | 280 base::Bind(base::IgnoreResult(&base::Delete), icon_path_, false)); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 bool KioskAppData::IsLoading() const { | 284 bool KioskAppData::IsLoading() const { |
285 return status_ == STATUS_LOADING; | 285 return status_ == STATUS_LOADING; |
286 } | 286 } |
287 | 287 |
288 void KioskAppData::SetStatus(Status status) { | 288 void KioskAppData::SetStatus(Status status) { |
289 if (status_ == status) | 289 if (status_ == status) |
290 return; | 290 return; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 icon_url, | 437 icon_url, |
438 GetRequestContextGetter()); | 438 GetRequestContextGetter()); |
439 } | 439 } |
440 | 440 |
441 void KioskAppData::OnWebstoreResponseParseFailure(const std::string& error) { | 441 void KioskAppData::OnWebstoreResponseParseFailure(const std::string& error) { |
442 webstore_fetcher_.reset(); | 442 webstore_fetcher_.reset(); |
443 SetStatus(STATUS_ERROR); | 443 SetStatus(STATUS_ERROR); |
444 } | 444 } |
445 | 445 |
446 } // namespace chromeos | 446 } // namespace chromeos |
OLD | NEW |