OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/google/google_util.h" | 5 #include "chrome/browser/google/google_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "base/string_split.h" | 13 #include "base/string_split.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/google/google_url_tracker.h" | 17 #include "chrome/browser/google/google_url_tracker.h" |
18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/common/net/url_util.h" | 19 #include "chrome/common/net/url_util.h" |
20 #include "chrome/installer/util/google_update_settings.h" | 20 #include "chrome/installer/util/google_update_settings.h" |
21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
22 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 22 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
23 | 23 |
24 #if defined(OS_MACOSX) | 24 #if defined(OS_MACOSX) |
25 #include "chrome/browser/mac/keystone_glue.h" | 25 #include "chrome/browser/mac/keystone_glue.h" |
| 26 #elif defined(OS_CHROMEOS) |
| 27 #include "chrome/browser/google/google_util_chromeos.h" |
26 #endif | 28 #endif |
27 | 29 |
28 #if defined(GOOGLE_CHROME_BUILD) | 30 #if defined(GOOGLE_CHROME_BUILD) |
29 #include "chrome/browser/google/linkdoctor_internal/linkdoctor_internal.h" | 31 #include "chrome/browser/google/linkdoctor_internal/linkdoctor_internal.h" |
30 #endif | 32 #endif |
31 | 33 |
32 #ifndef LINKDOCTOR_SERVER_REQUEST_URL | 34 #ifndef LINKDOCTOR_SERVER_REQUEST_URL |
33 #define LINKDOCTOR_SERVER_REQUEST_URL "" | 35 #define LINKDOCTOR_SERVER_REQUEST_URL "" |
34 #endif | 36 #endif |
35 | 37 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 #else | 135 #else |
134 | 136 |
135 bool GetBrand(std::string* brand) { | 137 bool GetBrand(std::string* brand) { |
136 if (brand_for_testing) { | 138 if (brand_for_testing) { |
137 brand->assign(brand_for_testing); | 139 brand->assign(brand_for_testing); |
138 return true; | 140 return true; |
139 } | 141 } |
140 | 142 |
141 #if defined(OS_MACOSX) | 143 #if defined(OS_MACOSX) |
142 brand->assign(keystone_glue::BrandCode()); | 144 brand->assign(keystone_glue::BrandCode()); |
| 145 #elif defined(OS_CHROMEOS) |
| 146 brand->assign(google_util::chromeos::GetBrand()); |
143 #else | 147 #else |
144 brand->clear(); | 148 brand->clear(); |
145 #endif | 149 #endif |
146 return true; | 150 return true; |
147 } | 151 } |
148 | 152 |
149 bool GetReactivationBrand(std::string* brand) { | 153 bool GetReactivationBrand(std::string* brand) { |
150 brand->clear(); | 154 brand->clear(); |
151 return true; | 155 return true; |
152 } | 156 } |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 const char* const kBrands[] = { | 320 const char* const kBrands[] = { |
317 "CHIQ", "CHSG", "HLJY", "NTMO", "OOBA", "OOBB", "OOBC", "OOBD", "OOBE", | 321 "CHIQ", "CHSG", "HLJY", "NTMO", "OOBA", "OOBB", "OOBC", "OOBD", "OOBE", |
318 "OOBF", "OOBG", "OOBH", "OOBI", "OOBJ", "IDCM", | 322 "OOBF", "OOBG", "OOBH", "OOBI", "OOBJ", "IDCM", |
319 }; | 323 }; |
320 const char* const* end = &kBrands[arraysize(kBrands)]; | 324 const char* const* end = &kBrands[arraysize(kBrands)]; |
321 const char* const* found = std::find(&kBrands[0], end, brand); | 325 const char* const* found = std::find(&kBrands[0], end, brand); |
322 return found != end; | 326 return found != end; |
323 } | 327 } |
324 | 328 |
325 } // namespace google_util | 329 } // namespace google_util |
OLD | NEW |