OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work | 5 // This code glues the RLZ library DLL with Chrome. It allows Chrome to work |
6 // with or without the DLL being present. If the DLL is not present the | 6 // with or without the DLL being present. If the DLL is not present the |
7 // functions do nothing and just return false. | 7 // functions do nothing and just return false. |
8 | 8 |
9 #include "chrome/browser/rlz/rlz.h" | 9 #include "chrome/browser/rlz/rlz.h" |
10 | 10 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 static const wchar_t* kBrands[] = { | 296 static const wchar_t* kBrands[] = { |
297 L"CHFO", L"CHFT", L"CHMA", L"CHMB", L"CHME", L"CHMF", L"CHMG", L"CHMH", | 297 L"CHFO", L"CHFT", L"CHMA", L"CHMB", L"CHME", L"CHMF", L"CHMG", L"CHMH", |
298 L"CHMI", L"CHMQ", L"CHMV", L"CHNB", L"CHNC", L"CHNG", L"CHNH", L"CHNI", | 298 L"CHMI", L"CHMQ", L"CHMV", L"CHNB", L"CHNC", L"CHNG", L"CHNH", L"CHNI", |
299 L"CHOA", L"CHOB", L"CHOC", L"CHON", L"CHOO", L"CHOP", L"CHOQ", L"CHOR", | 299 L"CHOA", L"CHOB", L"CHOC", L"CHON", L"CHOO", L"CHOP", L"CHOQ", L"CHOR", |
300 L"CHOS", L"CHOT", L"CHOU", L"CHOX", L"CHOY", L"CHOZ", L"CHPD", L"CHPE", | 300 L"CHOS", L"CHOT", L"CHOU", L"CHOX", L"CHOY", L"CHOZ", L"CHPD", L"CHPE", |
301 L"CHPF", L"CHPG", L"EUBB", L"EUBC", L"GGLA", L"GGLS" }; | 301 L"CHPF", L"CHPG", L"EUBB", L"EUBC", L"GGLA", L"GGLS" }; |
302 const wchar_t** end = &kBrands[arraysize(kBrands)]; | 302 const wchar_t** end = &kBrands[arraysize(kBrands)]; |
303 const wchar_t** found = std::find(&kBrands[0], end, brand); | 303 const wchar_t** found = std::find(&kBrands[0], end, brand); |
304 if (found != end) | 304 if (found != end) |
305 return true; | 305 return true; |
306 if (StartsWith(brand, L"EUB", true) || StartsWith(brand, L"EUC", true)) | 306 if (StartsWith(brand, L"EUB", true) || StartsWith(brand, L"EUC", true) || |
| 307 StartsWith(brand, L"GGR", true)) |
307 return true; | 308 return true; |
308 return false; | 309 return false; |
309 } | 310 } |
310 | 311 |
311 int directory_key_; | 312 int directory_key_; |
312 bool first_run_; | 313 bool first_run_; |
313 DISALLOW_IMPLICIT_CONSTRUCTORS(DelayedInitTask); | 314 DISALLOW_IMPLICIT_CONSTRUCTORS(DelayedInitTask); |
314 }; | 315 }; |
315 | 316 |
316 } // namespace | 317 } // namespace |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 cached_ommibox_rlz.assign(str_rlz); | 369 cached_ommibox_rlz.assign(str_rlz); |
369 } | 370 } |
370 *rlz = str_rlz; | 371 *rlz = str_rlz; |
371 return true; | 372 return true; |
372 } | 373 } |
373 | 374 |
374 // static | 375 // static |
375 void RLZTracker::CleanupRlz() { | 376 void RLZTracker::CleanupRlz() { |
376 OmniBoxUsageObserver::DeleteInstance(); | 377 OmniBoxUsageObserver::DeleteInstance(); |
377 } | 378 } |
OLD | NEW |