OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); | 313 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); |
314 if (!network->Connected() && num_retries_ < kMaxFetchRetries) { | 314 if (!network->Connected() && num_retries_ < kMaxFetchRetries) { |
315 num_retries_++; | 315 num_retries_++; |
316 retry_timer_.Start(FROM_HERE, | 316 retry_timer_.Start(FROM_HERE, |
317 base::TimeDelta::FromSeconds(kRetriesDelayInSec), | 317 base::TimeDelta::FromSeconds(kRetriesDelayInSec), |
318 this, &ServicesCustomizationDocument::StartFileFetch); | 318 this, &ServicesCustomizationDocument::StartFileFetch); |
319 return; | 319 return; |
320 } | 320 } |
321 LOG(ERROR) << "URL fetch for services customization failed:" | 321 LOG(ERROR) << "URL fetch for services customization failed:" |
322 << " response code = " << source->GetResponseCode() | 322 << " response code = " << source->GetResponseCode() |
323 << " URL = " << source->GetUrl().spec(); | 323 << " URL = " << source->GetURL().spec(); |
324 } | 324 } |
325 } | 325 } |
326 | 326 |
327 bool ServicesCustomizationDocument::ApplyCustomization() { | 327 bool ServicesCustomizationDocument::ApplyCustomization() { |
328 // TODO(dpolukhin): apply customized apps, exts and support page. | 328 // TODO(dpolukhin): apply customized apps, exts and support page. |
329 SetApplied(true); | 329 SetApplied(true); |
330 return true; | 330 return true; |
331 } | 331 } |
332 | 332 |
333 std::string ServicesCustomizationDocument::GetInitialStartPage( | 333 std::string ServicesCustomizationDocument::GetInitialStartPage( |
334 const std::string& locale) const { | 334 const std::string& locale) const { |
335 return GetLocaleSpecificString( | 335 return GetLocaleSpecificString( |
336 locale, kAppContentAttr, kInitialStartPageAttr); | 336 locale, kAppContentAttr, kInitialStartPageAttr); |
337 } | 337 } |
338 | 338 |
339 std::string ServicesCustomizationDocument::GetSupportPage( | 339 std::string ServicesCustomizationDocument::GetSupportPage( |
340 const std::string& locale) const { | 340 const std::string& locale) const { |
341 return GetLocaleSpecificString( | 341 return GetLocaleSpecificString( |
342 locale, kAppContentAttr, kSupportPageAttr); | 342 locale, kAppContentAttr, kSupportPageAttr); |
343 } | 343 } |
344 | 344 |
345 } // namespace chromeos | 345 } // namespace chromeos |
OLD | NEW |