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

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

Issue 8499009: Remove unused MountLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased on ToT Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/chromeos/cros/cros_library.h" 5 #include "chrome/browser/chromeos/cros/cros_library.h"
6 6
7 #include "chrome/browser/chromeos/cros/burn_library.h" 7 #include "chrome/browser/chromeos/cros/burn_library.h"
8 #include "chrome/browser/chromeos/cros/cert_library.h" 8 #include "chrome/browser/chromeos/cros/cert_library.h"
9 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 9 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
10 #include "chrome/browser/chromeos/cros/library_loader.h" 10 #include "chrome/browser/chromeos/cros/library_loader.h"
11 #include "chrome/browser/chromeos/cros/mount_library.h"
12 #include "chrome/browser/chromeos/cros/network_library.h" 11 #include "chrome/browser/chromeos/cros/network_library.h"
13 #include "chrome/browser/chromeos/cros/power_library.h" 12 #include "chrome/browser/chromeos/cros/power_library.h"
14 #include "chrome/browser/chromeos/cros/screen_lock_library.h" 13 #include "chrome/browser/chromeos/cros/screen_lock_library.h"
15 #include "chrome/browser/chromeos/cros/update_library.h" 14 #include "chrome/browser/chromeos/cros/update_library.h"
16 #include "third_party/cros/chromeos_cros_api.h" 15 #include "third_party/cros/chromeos_cros_api.h"
17 16
18 // Pass !libcros_loaded_ to GetDefaultImpl instead of use_stub_impl_ so that 17 // Pass !libcros_loaded_ to GetDefaultImpl instead of use_stub_impl_ so that
19 // we load the stub impl regardless of whether use_stub was specified or the 18 // we load the stub impl regardless of whether use_stub was specified or the
20 // library failed to load. 19 // library failed to load.
21 #define DEFINE_GET_LIBRARY_METHOD(class_prefix, var_prefix) \ 20 #define DEFINE_GET_LIBRARY_METHOD(class_prefix, var_prefix) \
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 74 }
76 75
77 // static 76 // static
78 CrosLibrary* CrosLibrary::Get() { 77 CrosLibrary* CrosLibrary::Get() {
79 return g_cros_library; 78 return g_cros_library;
80 } 79 }
81 80
82 DEFINE_GET_LIBRARY_METHOD(Burn, burn); 81 DEFINE_GET_LIBRARY_METHOD(Burn, burn);
83 DEFINE_GET_LIBRARY_METHOD(Cert, cert); 82 DEFINE_GET_LIBRARY_METHOD(Cert, cert);
84 DEFINE_GET_LIBRARY_METHOD(Cryptohome, crypto); 83 DEFINE_GET_LIBRARY_METHOD(Cryptohome, crypto);
85 DEFINE_GET_LIBRARY_METHOD(Mount, mount);
86 DEFINE_GET_LIBRARY_METHOD(Network, network); 84 DEFINE_GET_LIBRARY_METHOD(Network, network);
87 DEFINE_GET_LIBRARY_METHOD(Power, power); 85 DEFINE_GET_LIBRARY_METHOD(Power, power);
88 DEFINE_GET_LIBRARY_METHOD(ScreenLock, screen_lock); 86 DEFINE_GET_LIBRARY_METHOD(ScreenLock, screen_lock);
89 DEFINE_GET_LIBRARY_METHOD(Update, update); 87 DEFINE_GET_LIBRARY_METHOD(Update, update);
90 88
91 bool CrosLibrary::LoadLibcros() { 89 bool CrosLibrary::LoadLibcros() {
92 if (!libcros_loaded_ && !load_error_) { 90 if (!libcros_loaded_ && !load_error_) {
93 if (!library_loader_) { 91 if (!library_loader_) {
94 library_loader_ = LibraryLoader::GetImpl(); 92 library_loader_ = LibraryLoader::GetImpl();
95 own_library_loader_ = true; 93 own_library_loader_ = true;
(...skipping 25 matching lines...) Expand all
121 library_->library_loader_ = loader; 119 library_->library_loader_ = loader;
122 // Reset load flags when loader changes. Otherwise some tests are really not 120 // Reset load flags when loader changes. Otherwise some tests are really not
123 // going to be happy. 121 // going to be happy.
124 library_->libcros_loaded_ = false; 122 library_->libcros_loaded_ = false;
125 library_->load_error_ = false; 123 library_->load_error_ = false;
126 } 124 }
127 125
128 DEFINE_SET_LIBRARY_METHOD(Cert, cert); 126 DEFINE_SET_LIBRARY_METHOD(Cert, cert);
129 DEFINE_SET_LIBRARY_METHOD(Burn, burn); 127 DEFINE_SET_LIBRARY_METHOD(Burn, burn);
130 DEFINE_SET_LIBRARY_METHOD(Cryptohome, crypto); 128 DEFINE_SET_LIBRARY_METHOD(Cryptohome, crypto);
131 DEFINE_SET_LIBRARY_METHOD(Mount, mount);
132 DEFINE_SET_LIBRARY_METHOD(Network, network); 129 DEFINE_SET_LIBRARY_METHOD(Network, network);
133 DEFINE_SET_LIBRARY_METHOD(Power, power); 130 DEFINE_SET_LIBRARY_METHOD(Power, power);
134 DEFINE_SET_LIBRARY_METHOD(ScreenLock, screen_lock); 131 DEFINE_SET_LIBRARY_METHOD(ScreenLock, screen_lock);
135 DEFINE_SET_LIBRARY_METHOD(Update, update); 132 DEFINE_SET_LIBRARY_METHOD(Update, update);
136 133
137 } // namespace chromeos 134 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/cros_library.h ('k') | chrome/browser/chromeos/cros/mock_mount_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698