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

Side by Side Diff: drive_login.cc

Issue 3166035: add more ownership API methods to libcros (Closed) Base URL: http://git.chromium.org/git/cros.git
Patch Set: Forgot to INIT_FUNC some new stuff Created 10 years, 4 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 | « chromeos_login.cc ('k') | load.cc » ('j') | 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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 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 <dlfcn.h> 5 #include <dlfcn.h>
6 #include <glib-object.h> 6 #include <glib-object.h>
7 7
8 #include <iostream> // NOLINT 8 #include <iostream> // NOLINT
9 #include <vector> 9 #include <vector>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (connection = chromeos::MonitorSession(&monitor, loop)) 94 if (connection = chromeos::MonitorSession(&monitor, loop))
95 LOG(INFO) << "Started monitoring!"; 95 LOG(INFO) << "Started monitoring!";
96 else 96 else
97 LOG(FATAL) << "Starting monitoring failed."; 97 LOG(FATAL) << "Starting monitoring failed.";
98 98
99 std::vector<uint8> key(public_key_info, 99 std::vector<uint8> key(public_key_info,
100 public_key_info + sizeof(public_key_info)); 100 public_key_info + sizeof(public_key_info));
101 if (chromeos::SetOwnerKey(key)) 101 if (chromeos::SetOwnerKey(key))
102 LOG(INFO) << "Sent key!"; 102 LOG(INFO) << "Sent key!";
103 else 103 else
104 LOG(FATAL) << "Setting key failed."; 104 LOG(ERROR) << "Setting key failed.";
105
106 if (chromeos::Whitelist("cmasone@gmail.com", key))
107 LOG(INFO) << "Attempted to whitelist";
108 else
109 LOG(INFO) << "Could not attempt to whitelist.";
110
111 if (chromeos::CheckWhitelist("cmasone@gmail.com", &key))
112 LOG(INFO) << "On the whitelist";
113 else
114 LOG(INFO) << "Not on the whitelist.";
105 115
106 ::g_main_loop_run(loop); 116 ::g_main_loop_run(loop);
107 117
108 chromeos::DisconnectSession(connection); 118 chromeos::DisconnectSession(connection);
109 119
110 return 0; 120 return 0;
111 } 121 }
OLDNEW
« no previous file with comments | « chromeos_login.cc ('k') | load.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698