OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions/extension_rlz_module.h" | 5 #include "chrome/browser/extensions/extension_rlz_module.h" |
6 | 6 |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 #include "base/values.h" |
8 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
9 #include "rlz/win/lib/lib_values.h" | 10 #include "rlz/win/lib/lib_values.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 bool GetProductFromName(const std::string& product_name, | 14 bool GetProductFromName(const std::string& product_name, |
14 rlz_lib::Product* product) { | 15 rlz_lib::Product* product) { |
15 bool success = true; | 16 bool success = true; |
16 switch (product_name[0]) { | 17 switch (product_name[0]) { |
17 case 'B': | 18 case 'B': |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 std::string ap_name; | 173 std::string ap_name; |
173 EXTENSION_FUNCTION_VALIDATE(access_points_list->GetString(i, &ap_name)); | 174 EXTENSION_FUNCTION_VALIDATE(access_points_list->GetString(i, &ap_name)); |
174 EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName( | 175 EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName( |
175 ap_name.c_str(), &access_points[i])); | 176 ap_name.c_str(), &access_points[i])); |
176 } | 177 } |
177 access_points[i] = rlz_lib::NO_ACCESS_POINT; | 178 access_points[i] = rlz_lib::NO_ACCESS_POINT; |
178 | 179 |
179 rlz_lib::ClearProductState(product, access_points.get()); | 180 rlz_lib::ClearProductState(product, access_points.get()); |
180 return true; | 181 return true; |
181 } | 182 } |
OLD | NEW |