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

Side by Side Diff: monitor_utils.h

Issue 652187: Added ConnectToNetwork (Closed)
Patch Set: merge in new changes Created 10 years, 9 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
« no previous file with comments | « monitor_network.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS 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 <string> 5 #include <string>
6 6
7 #include "chromeos_cros_api.h" // NOLINT 7 #include "chromeos_cros_api.h" // NOLINT
8 8
9 // Construct a path for the shared library. This example uses a local path 9 // Construct a path for the shared library. This example uses a local path
10 // but on chromeos the library is installed in: 10 // but on chromeos the library is installed in:
11 // "/opt/google/chrome/chromeos/libcros.so" 11 // "/opt/google/chrome/chromeos/libcros.so"
12 bool LoadCrosLibrary(const char** argv) { 12 bool LoadCrosLibrary(const char** argv) {
13 std::string app_path = argv[0]; 13 std::string app_path = argv[0];
14 app_path.erase(app_path.begin() + app_path.find_last_of("/"), app_path.end()); 14 app_path.erase(app_path.begin() + app_path.find_last_of("/"), app_path.end());
15 app_path += "/libcros.so"; 15 app_path += "/libcros.so";
16 16
17 bool success = chromeos::LoadCros(app_path.c_str()); 17 std::string error_string = std::string();
18 DCHECK(success) << "LoadCros('" << app_path.c_str() << "') failed."; 18 bool success = chromeos::LoadLibcros(app_path.c_str(), error_string);
19 DCHECK(success) << "LoadLibcros('" << app_path.c_str() << "') failed: "
20 << error_string;
19 return true; 21 return true;
20 } 22 }
OLDNEW
« no previous file with comments | « monitor_network.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698