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

Side by Side Diff: chrome/browser/remoting/setup_flow.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) 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, Profile* profile, 118 SetupFlow::SetupFlow(const std::string& args,
119 Profile* profile,
119 SetupFlowStep* first_step) 120 SetupFlowStep* first_step)
120 : dom_ui_(NULL), 121 : dom_ui_(NULL),
121 dialog_start_args_(args), 122 dialog_start_args_(args),
122 profile_(profile), 123 profile_(profile),
123 current_step_(first_step) { 124 current_step_(first_step) {
124 // TODO(hclam): The data source should be added once. 125 // TODO(hclam): The data source should be added once.
125 BrowserThread::PostTask( 126 profile->GetChromeURLDataManager()->AddDataSource(
126 BrowserThread::IO, FROM_HERE, 127 new RemotingResourcesSource());
127 NewRunnableMethod(ChromeURLDataManager::GetInstance(),
128 &ChromeURLDataManager::AddDataSource,
129 make_scoped_refptr(new RemotingResourcesSource())));
130 } 128 }
131 129
132 SetupFlow::~SetupFlow() { } 130 SetupFlow::~SetupFlow() { }
133 131
134 // static 132 // static
135 SetupFlow* SetupFlow::OpenSetupDialog(Profile* profile) { 133 SetupFlow* SetupFlow::OpenSetupDialog(Profile* profile) {
136 // Set the arguments for showing the gaia login page. 134 // Set the arguments for showing the gaia login page.
137 DictionaryValue args; 135 DictionaryValue args;
138 args.SetString("iframeToShow", "login"); 136 args.SetString("iframeToShow", "login");
139 args.SetString("user", ""); 137 args.SetString("user", "");
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 BrowserThread::PostTask( 257 BrowserThread::PostTask(
260 BrowserThread::UI, FROM_HERE, 258 BrowserThread::UI, FROM_HERE,
261 new DeleteTask<SetupFlowStep>(current_step_.release())); 259 new DeleteTask<SetupFlowStep>(current_step_.release()));
262 } 260 }
263 261
264 current_step_.reset(next_step); 262 current_step_.reset(next_step);
265 StartCurrentStep(); 263 StartCurrentStep();
266 } 264 }
267 265
268 } // namespace remoting 266 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698