OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/sync/sync_setup_wizard.h" | 5 #include "chrome/browser/sync/sync_setup_wizard.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
10 #include "chrome/browser/browser_thread.h" | 10 #include "chrome/browser/browser_thread.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 208 } |
209 | 209 |
210 SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service) | 210 SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service) |
211 : service_(service), | 211 : service_(service), |
212 flow_container_(new SyncSetupFlowContainer()), | 212 flow_container_(new SyncSetupFlowContainer()), |
213 parent_window_(NULL) { | 213 parent_window_(NULL) { |
214 // Add our network layer data source for 'cloudy' URLs. | 214 // Add our network layer data source for 'cloudy' URLs. |
215 SyncResourcesSource* sync_source = new SyncResourcesSource(); | 215 SyncResourcesSource* sync_source = new SyncResourcesSource(); |
216 BrowserThread::PostTask( | 216 BrowserThread::PostTask( |
217 BrowserThread::IO, FROM_HERE, | 217 BrowserThread::IO, FROM_HERE, |
218 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), | 218 NewRunnableMethod(ChromeURLDataManager::GetInstance(), |
219 &ChromeURLDataManager::AddDataSource, | 219 &ChromeURLDataManager::AddDataSource, |
220 make_scoped_refptr(sync_source))); | 220 make_scoped_refptr(sync_source))); |
221 } | 221 } |
222 | 222 |
223 SyncSetupWizard::~SyncSetupWizard() { | 223 SyncSetupWizard::~SyncSetupWizard() { |
224 delete flow_container_; | 224 delete flow_container_; |
225 } | 225 } |
226 | 226 |
227 void SyncSetupWizard::Step(State advance_state) { | 227 void SyncSetupWizard::Step(State advance_state) { |
228 SyncSetupFlow* flow = flow_container_->get_flow(); | 228 SyncSetupFlow* flow = flow_container_->get_flow(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 result = GAIA_SUCCESS; | 281 result = GAIA_SUCCESS; |
282 } else if (start_state == ENTER_PASSPHRASE) { | 282 } else if (start_state == ENTER_PASSPHRASE) { |
283 result = DONE; | 283 result = DONE; |
284 } else if (start_state == CONFIGURE) { | 284 } else if (start_state == CONFIGURE) { |
285 result = DONE; | 285 result = DONE; |
286 } | 286 } |
287 DCHECK_NE(FATAL_ERROR, result) << | 287 DCHECK_NE(FATAL_ERROR, result) << |
288 "Invalid start state for discrete run: " << start_state; | 288 "Invalid start state for discrete run: " << start_state; |
289 return result; | 289 return result; |
290 } | 290 } |
OLD | NEW |