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

Side by Side Diff: chrome/browser/remoting/setup_flow.cc

Issue 6461024: Revert 74292 - Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://svn.chromium.org/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) 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/remoting/setup_flow.h" 5 #include "chrome/browser/remoting/setup_flow.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ExecuteJavascriptInIFrame(kDoneIframeXPath, javascript); 108 ExecuteJavascriptInIFrame(kDoneIframeXPath, javascript);
109 109
110 flow()->dom_ui()->CallJavascriptFunction(L"showSetupDone"); 110 flow()->dom_ui()->CallJavascriptFunction(L"showSetupDone");
111 111
112 ExecuteJavascriptInIFrame(kDoneIframeXPath, L"onPageShown();"); 112 ExecuteJavascriptInIFrame(kDoneIframeXPath, L"onPageShown();");
113 } 113 }
114 114
115 SetupFlowContext::SetupFlowContext() { } 115 SetupFlowContext::SetupFlowContext() { }
116 SetupFlowContext::~SetupFlowContext() { } 116 SetupFlowContext::~SetupFlowContext() { }
117 117
118 SetupFlow::SetupFlow(const std::string& args, 118 SetupFlow::SetupFlow(const std::string& args, Profile* profile,
119 Profile* profile,
120 SetupFlowStep* first_step) 119 SetupFlowStep* first_step)
121 : dom_ui_(NULL), 120 : dom_ui_(NULL),
122 dialog_start_args_(args), 121 dialog_start_args_(args),
123 profile_(profile), 122 profile_(profile),
124 current_step_(first_step) { 123 current_step_(first_step) {
125 // TODO(hclam): The data source should be added once. 124 // TODO(hclam): The data source should be added once.
126 profile->GetChromeURLDataManager()->AddDataSource( 125 BrowserThread::PostTask(
127 new RemotingResourcesSource()); 126 BrowserThread::IO, FROM_HERE,
127 NewRunnableMethod(ChromeURLDataManager::GetInstance(),
128 &ChromeURLDataManager::AddDataSource,
129 make_scoped_refptr(new RemotingResourcesSource())));
128 } 130 }
129 131
130 SetupFlow::~SetupFlow() { } 132 SetupFlow::~SetupFlow() { }
131 133
132 // static 134 // static
133 SetupFlow* SetupFlow::OpenSetupDialog(Profile* profile) { 135 SetupFlow* SetupFlow::OpenSetupDialog(Profile* profile) {
134 // Set the arguments for showing the gaia login page. 136 // Set the arguments for showing the gaia login page.
135 DictionaryValue args; 137 DictionaryValue args;
136 args.SetString("iframeToShow", "login"); 138 args.SetString("iframeToShow", "login");
137 args.SetString("user", ""); 139 args.SetString("user", "");
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 BrowserThread::PostTask( 259 BrowserThread::PostTask(
258 BrowserThread::UI, FROM_HERE, 260 BrowserThread::UI, FROM_HERE,
259 new DeleteTask<SetupFlowStep>(current_step_.release())); 261 new DeleteTask<SetupFlowStep>(current_step_.release()));
260 } 262 }
261 263
262 current_step_.reset(next_step); 264 current_step_.reset(next_step);
263 StartCurrentStep(); 265 StartCurrentStep();
264 } 266 }
265 267
266 } // namespace remoting 268 } // namespace remoting
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/sync/profile_sync_service_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698