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

Side by Side Diff: chrome/browser/chromeos/cros_library.cc

Issue 251099: Refactor cros library code into central location and have the UI elements obs... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/cros_library.h ('k') | chrome/browser/chromeos/cros_network_library.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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/chromeos/cros_library.h"
6
7 #include <dlfcn.h>
8
9 #include "base/file_path.h"
10 #include "base/logging.h"
11 #include "base/path_service.h"
12 #include "chrome/common/chrome_paths.h"
13 #include "third_party/cros/chromeos_cros_api.h"
14
15 // static
16 bool CrosLibrary::loaded_ = false;
17
18 // static
19 bool CrosLibrary::loaded() {
20 static bool initialized = false;
21 if (!initialized) {
22 FilePath path;
23 if (PathService::Get(chrome::FILE_CHROMEOS_API, &path))
24 loaded_ = chromeos::LoadCros(path.value().c_str());
25
26 if (!loaded_) {
27 char* error = dlerror();
28 if (error)
29 LOG(ERROR) << "Problem loading chromeos shared object: " << error;
30 }
31 initialized = true;
32 }
33 return loaded_;
34 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros_library.h ('k') | chrome/browser/chromeos/cros_network_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698