Chromium Code Reviews| Index: chrome/browser/chromeos/oobe/oobe.cc |
| diff --git a/chrome/browser/chromeos/oobe/oobe.cc b/chrome/browser/chromeos/oobe/oobe.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5f898a30a138a61f43478717ddc53db51cd3e445 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/oobe/oobe.cc |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/prefs/pref_service.h" |
| +#include "chrome/browser/browser_process.h" |
| +#include "chrome/browser/chromeos/oobe/oobe.h" |
| +#include "chrome/browser/lifetime/application_lifetime.h" |
| +#include "chrome/browser/profiles/profile.h" |
| +#include "chrome/common/pref_names.h" |
| + |
| +void Oobe::Register() { |
|
Nikita (slow)
2015/02/24 15:32:41
nit: Add // static
comment
Ivan Podogov
2015/02/24 16:33:20
Done.
|
| + gen::OobeViewModel::SetFactory( |
| + [](content::BrowserContext* context) -> gen::OobeViewModel* { |
| + return new Oobe(Profile::FromBrowserContext(context)); |
| + }); |
| +} |
| + |
| +Oobe::Oobe(Profile* profile) : profile_(profile) { |
| +} |
| + |
| +Oobe::~Oobe() { |
| +} |
| + |
| +void Oobe::Initialize() { |
| +} |
| + |
| +void Oobe::OnButtonClicked() { |
| + g_browser_process->local_state()->SetBoolean(prefs::kNewOobe, false); |
| + chrome::AttemptRestart(); |
| +} |