OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/first_run/first_run_import_observer.h" | |
6 | |
7 #include "base/message_loop.h" | |
8 #include "content/public/common/result_codes.h" | |
9 | |
10 FirstRunImportObserver::FirstRunImportObserver() | |
11 : loop_running_(false), import_result_(content::RESULT_CODE_NORMAL_EXIT) { | |
12 } | |
13 | |
14 FirstRunImportObserver::~FirstRunImportObserver() { | |
15 } | |
16 | |
17 void FirstRunImportObserver::RunLoop() { | |
18 loop_running_ = true; | |
19 MessageLoop::current()->Run(); | |
20 } | |
21 | |
22 void FirstRunImportObserver::Finish() { | |
23 if (loop_running_) | |
24 MessageLoop::current()->Quit(); | |
25 } | |
26 | |
27 void FirstRunImportObserver::ImportCompleted() { | |
28 import_result_ = content::RESULT_CODE_NORMAL_EXIT; | |
29 Finish(); | |
30 } | |
OLD | NEW |