| OLD | NEW |
| 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/chromeos/customization_document.h" | 5 #include "chrome/browser/chromeos/customization_document.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 return; | 508 return; |
| 509 | 509 |
| 510 if (!url_.is_valid()) { | 510 if (!url_.is_valid()) { |
| 511 std::string customization_id; | 511 std::string customization_id; |
| 512 chromeos::system::StatisticsProvider* provider = | 512 chromeos::system::StatisticsProvider* provider = |
| 513 chromeos::system::StatisticsProvider::GetInstance(); | 513 chromeos::system::StatisticsProvider::GetInstance(); |
| 514 if (provider->GetMachineStatistic(system::kCustomizationIdKey, | 514 if (provider->GetMachineStatistic(system::kCustomizationIdKey, |
| 515 &customization_id) && | 515 &customization_id) && |
| 516 !customization_id.empty()) { | 516 !customization_id.empty()) { |
| 517 url_ = GURL(base::StringPrintf( | 517 url_ = GURL(base::StringPrintf( |
| 518 kManifestUrl, StringToLowerASCII(customization_id).c_str())); | 518 kManifestUrl, base::StringToLowerASCII(customization_id).c_str())); |
| 519 } else { | 519 } else { |
| 520 // Remember that there is no customization ID in VPD. | 520 // Remember that there is no customization ID in VPD. |
| 521 OnCustomizationNotFound(); | 521 OnCustomizationNotFound(); |
| 522 return; | 522 return; |
| 523 } | 523 } |
| 524 } | 524 } |
| 525 | 525 |
| 526 if (url_.is_valid()) { | 526 if (url_.is_valid()) { |
| 527 fetch_started_ = true; | 527 fetch_started_ = true; |
| 528 if (url_.SchemeIsFile()) { | 528 if (url_.SchemeIsFile()) { |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 apply_tasks_success_ += success; | 958 apply_tasks_success_ += success; |
| 959 | 959 |
| 960 if (apply_tasks_started_ != apply_tasks_finished_) | 960 if (apply_tasks_started_ != apply_tasks_finished_) |
| 961 return; | 961 return; |
| 962 | 962 |
| 963 if (apply_tasks_success_ == apply_tasks_finished_) | 963 if (apply_tasks_success_ == apply_tasks_finished_) |
| 964 SetApplied(true); | 964 SetApplied(true); |
| 965 } | 965 } |
| 966 | 966 |
| 967 } // namespace chromeos | 967 } // namespace chromeos |
| OLD | NEW |