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

Side by Side Diff: chrome/browser/chromeos/login/apply_services_customization.cc

Issue 6056007: net: Add namespace net to the remaining files under url_request directory. (Closed)
Patch Set: chromeos fixes Created 9 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 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/login/apply_services_customization.h" 5 #include "chrome/browser/chromeos/login/apply_services_customization.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void ApplyServicesCustomization::StartFileFetch() { 97 void ApplyServicesCustomization::StartFileFetch() {
98 url_fetcher_.reset(new URLFetcher(url_, URLFetcher::GET, this)); 98 url_fetcher_.reset(new URLFetcher(url_, URLFetcher::GET, this));
99 url_fetcher_->set_request_context( 99 url_fetcher_->set_request_context(
100 ProfileManager::GetDefaultProfile()->GetRequestContext()); 100 ProfileManager::GetDefaultProfile()->GetRequestContext());
101 url_fetcher_->Start(); 101 url_fetcher_->Start();
102 } 102 }
103 103
104 void ApplyServicesCustomization::OnURLFetchComplete( 104 void ApplyServicesCustomization::OnURLFetchComplete(
105 const URLFetcher* source, 105 const URLFetcher* source,
106 const GURL& url, 106 const GURL& url,
107 const URLRequestStatus& status, 107 const net::URLRequestStatus& status,
108 int response_code, 108 int response_code,
109 const ResponseCookies& cookies, 109 const ResponseCookies& cookies,
110 const std::string& data) { 110 const std::string& data) {
111 if (response_code == 200) { 111 if (response_code == 200) {
112 Apply(data); 112 Apply(data);
113 } else { 113 } else {
114 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary(); 114 NetworkLibrary* network = CrosLibrary::Get()->GetNetworkLibrary();
115 if (!network->Connected() && num_retries_ < kMaxFetchRetries) { 115 if (!network->Connected() && num_retries_ < kMaxFetchRetries) {
116 num_retries_++; 116 num_retries_++;
117 retry_timer_.Start(base::TimeDelta::FromSeconds(kRetriesDelayInSec), 117 retry_timer_.Start(base::TimeDelta::FromSeconds(kRetriesDelayInSec),
(...skipping 22 matching lines...) Expand all
140 customization.initial_start_page_url()); 140 customization.initial_start_page_url());
141 VLOG(1) << "initial_start_page_url: " 141 VLOG(1) << "initial_start_page_url: "
142 << customization.initial_start_page_url(); 142 << customization.initial_start_page_url();
143 } 143 }
144 // TODO(dpolukhin): apply customized apps, exts and support page. 144 // TODO(dpolukhin): apply customized apps, exts and support page.
145 145
146 SetApplied(true); 146 SetApplied(true);
147 } 147 }
148 148
149 } 149 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/apply_services_customization.h ('k') | chrome/browser/chromeos/login/cookie_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698