OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 !content::BrowserThread::IsWellKnownThread(content::BrowserThread::UI) || | 57 !content::BrowserThread::IsWellKnownThread(content::BrowserThread::UI) || |
58 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 58 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
59 if (g_brand_empty) | 59 if (g_brand_empty) |
60 return std::string(); | 60 return std::string(); |
61 DCHECK(g_browser_process->local_state()); | 61 DCHECK(g_browser_process->local_state()); |
62 return g_browser_process->local_state()->GetString(prefs::kRLZBrand); | 62 return g_browser_process->local_state()->GetString(prefs::kRLZBrand); |
63 } | 63 } |
64 | 64 |
65 void SetBrandFromFile(const base::Closure& callback) { | 65 void SetBrandFromFile(const base::Closure& callback) { |
66 base::PostTaskAndReplyWithResult( | 66 base::PostTaskAndReplyWithResult( |
67 base::WorkerPool::GetTaskRunner(false /* task_is_slow */), | 67 base::WorkerPool::GetTaskRunner(false /* task_is_slow */).get(), |
68 FROM_HERE, | 68 FROM_HERE, |
69 base::Bind(&ReadBrandFromFile), | 69 base::Bind(&ReadBrandFromFile), |
70 base::Bind(&SetBrand, callback)); | 70 base::Bind(&SetBrand, callback)); |
71 } | 71 } |
72 | 72 |
73 } // namespace chromeos | 73 } // namespace chromeos |
74 } // namespace google_util | 74 } // namespace google_util |
OLD | NEW |