| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/extension_assets_manager_chromeos.h" | 5 #include "chrome/browser/extensions/extension_assets_manager_chromeos.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } | 447 } |
| 448 | 448 |
| 449 std::vector<std::string> versions; | 449 std::vector<std::string> versions; |
| 450 versions.reserve(extension_info->size()); | 450 versions.reserve(extension_info->size()); |
| 451 for (base::DictionaryValue::Iterator it(*extension_info); | 451 for (base::DictionaryValue::Iterator it(*extension_info); |
| 452 !it.IsAtEnd(); | 452 !it.IsAtEnd(); |
| 453 it.Advance()) { | 453 it.Advance()) { |
| 454 versions.push_back(it.key()); | 454 versions.push_back(it.key()); |
| 455 } | 455 } |
| 456 | 456 |
| 457 base::StringValue user_name(profile->GetProfileUserName()); | 457 base::Value user_name(profile->GetProfileUserName()); |
| 458 for (std::vector<std::string>::const_iterator it = versions.begin(); | 458 for (std::vector<std::string>::const_iterator it = versions.begin(); |
| 459 it != versions.end(); it++) { | 459 it != versions.end(); it++) { |
| 460 base::DictionaryValue* version_info = NULL; | 460 base::DictionaryValue* version_info = NULL; |
| 461 if (!extension_info->GetDictionaryWithoutPathExpansion(*it, | 461 if (!extension_info->GetDictionaryWithoutPathExpansion(*it, |
| 462 &version_info)) { | 462 &version_info)) { |
| 463 NOTREACHED(); | 463 NOTREACHED(); |
| 464 continue; | 464 continue; |
| 465 } | 465 } |
| 466 base::ListValue* users = NULL; | 466 base::ListValue* users = NULL; |
| 467 if (!version_info->GetList(kSharedExtensionUsers, &users)) { | 467 if (!version_info->GetList(kSharedExtensionUsers, &users)) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 std::make_pair(id, base::FilePath(shared_path))); | 571 std::make_pair(id, base::FilePath(shared_path))); |
| 572 } else { | 572 } else { |
| 573 extension_info->RemoveWithoutPathExpansion(*it, NULL); | 573 extension_info->RemoveWithoutPathExpansion(*it, NULL); |
| 574 } | 574 } |
| 575 } | 575 } |
| 576 | 576 |
| 577 return true; | 577 return true; |
| 578 } | 578 } |
| 579 | 579 |
| 580 } // namespace extensions | 580 } // namespace extensions |
| OLD | NEW |