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

Side by Side Diff: chrome/browser/sync/sync_setup_wizard.cc

Issue 6286131: Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
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 "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/singleton.h" 8 #include "base/singleton.h"
9 #include "chrome/browser/browser_thread.h" 9 #include "chrome/browser/browser_thread.h"
10 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 10 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); 255 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url);
256 return localized_url.spec(); 256 return localized_url.spec();
257 } 257 }
258 258
259 SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service) 259 SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service)
260 : service_(service), 260 : service_(service),
261 flow_container_(new SyncSetupFlowContainer()), 261 flow_container_(new SyncSetupFlowContainer()),
262 parent_window_(NULL) { 262 parent_window_(NULL) {
263 // Add our network layer data source for 'cloudy' URLs. 263 // Add our network layer data source for 'cloudy' URLs.
264 SyncResourcesSource* sync_source = new SyncResourcesSource(); 264 SyncResourcesSource* sync_source = new SyncResourcesSource();
265 BrowserThread::PostTask( 265 if (service_->profile()) // NULL during tests.
266 BrowserThread::IO, FROM_HERE, 266 service_->profile()->GetChromeURLDataManager()->AddDataSource(sync_source);
267 NewRunnableMethod(ChromeURLDataManager::GetInstance(),
268 &ChromeURLDataManager::AddDataSource,
269 make_scoped_refptr(sync_source)));
270 } 267 }
271 268
272 SyncSetupWizard::~SyncSetupWizard() { 269 SyncSetupWizard::~SyncSetupWizard() {
273 delete flow_container_; 270 delete flow_container_;
274 } 271 }
275 272
276 void SyncSetupWizard::Step(State advance_state) { 273 void SyncSetupWizard::Step(State advance_state) {
277 SyncSetupFlow* flow = flow_container_->get_flow(); 274 SyncSetupFlow* flow = flow_container_->get_flow();
278 if (flow) { 275 if (flow) {
279 // A setup flow is in progress and dialog is currently showing. 276 // A setup flow is in progress and dialog is currently showing.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 result = GAIA_SUCCESS; 327 result = GAIA_SUCCESS;
331 } else if (start_state == ENTER_PASSPHRASE || 328 } else if (start_state == ENTER_PASSPHRASE ||
332 start_state == CONFIGURE || 329 start_state == CONFIGURE ||
333 start_state == PASSPHRASE_MIGRATION) { 330 start_state == PASSPHRASE_MIGRATION) {
334 result = DONE; 331 result = DONE;
335 } 332 }
336 DCHECK_NE(FATAL_ERROR, result) << 333 DCHECK_NE(FATAL_ERROR, result) <<
337 "Invalid start state for discrete run: " << start_state; 334 "Invalid start state for discrete run: " << start_state;
338 return result; 335 return result;
339 } 336 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698