Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: chrome/browser/chromeos/customization_document.cc

Issue 15907017: Convert CustomizationDocument class to use NetworkStateHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/customization_document.cc
diff --git a/chrome/browser/chromeos/customization_document.cc b/chrome/browser/chromeos/customization_document.cc
index ad0447d1fe2cbff7d45eb03ac2e69966eb80a037..f87de755ae82166410cd97a9caa38e82f0166fde 100644
--- a/chrome/browser/chromeos/customization_document.cc
+++ b/chrome/browser/chromeos/customization_document.cc
@@ -16,11 +16,11 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chromeos/cros/cros_library.h"
-#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/system/statistics_provider.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chromeos/network/network_state.h"
+#include "chromeos/network/network_state_handler.h"
#include "content/public/browser/browser_thread.h"
#include "net/url_request/url_fetcher.h"
@@ -310,8 +310,10 @@ void ServicesCustomizationDocument::OnURLFetchComplete(
source->GetResponseAsString(&data);
LoadManifestFromString(data);
} else {
- NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary();
- if (!network->Connected() && num_retries_ < kMaxFetchRetries) {
+ const NetworkState* default_network =
+ NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
+ if (default_network && default_network->IsConnectedState() &&
+ num_retries_ < kMaxFetchRetries) {
num_retries_++;
retry_timer_.Start(FROM_HERE,
base::TimeDelta::FromSeconds(kRetriesDelayInSec),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698