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

Side by Side Diff: chrome/browser/rlz/rlz_extension_api.cc

Issue 9699054: rlz: Hook up on mac, switch to chrome's network stack on win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | 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/rlz/rlz_extension_api.h" 5 #include "chrome/browser/rlz/rlz_extension_api.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
11 #include "rlz/lib/lib_values.h" 11 #include "rlz/lib/lib_values.h"
Roger Tawa OOO till Jul 10th 2012/03/24 01:10:42 does the code still need to include lib_values.h?
Nico 2012/03/24 01:29:47 Yes, it calls GetAccessPointFromName(), which is n
12 #include "rlz/lib/rlz_lib.h"
12 13
13 namespace { 14 namespace {
14 15
15 bool GetProductFromName(const std::string& product_name, 16 bool GetProductFromName(const std::string& product_name,
16 rlz_lib::Product* product) { 17 rlz_lib::Product* product) {
17 bool success = true; 18 bool success = true;
18 switch (product_name[0]) { 19 switch (product_name[0]) {
19 case 'B': 20 case 'B':
20 *product = rlz_lib::FF_TOOLBAR; 21 *product = rlz_lib::FF_TOOLBAR;
21 break; 22 break;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 std::string ap_name; 203 std::string ap_name;
203 EXTENSION_FUNCTION_VALIDATE(access_points_list->GetString(i, &ap_name)); 204 EXTENSION_FUNCTION_VALIDATE(access_points_list->GetString(i, &ap_name));
204 EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName( 205 EXTENSION_FUNCTION_VALIDATE(rlz_lib::GetAccessPointFromName(
205 ap_name.c_str(), &access_points[i])); 206 ap_name.c_str(), &access_points[i]));
206 } 207 }
207 access_points[i] = rlz_lib::NO_ACCESS_POINT; 208 access_points[i] = rlz_lib::NO_ACCESS_POINT;
208 209
209 rlz_lib::ClearProductState(product, access_points.get()); 210 rlz_lib::ClearProductState(product, access_points.get());
210 return true; 211 return true;
211 } 212 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698