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

Side by Side Diff: ios/chrome/browser/google/google_brand.mm

Issue 2516633002: [ObjC ARC] Converts ios/chrome/browser/google:google to ARC.Automatically generated ARCMigrate co… (Closed)
Patch Set: Created 4 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
« no previous file with comments | « ios/chrome/browser/google/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/google/google_brand.h" 5 #include "ios/chrome/browser/google/google_brand.h"
6 6
7 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 7 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 namespace ios { 13 namespace ios {
10 namespace google_brand { 14 namespace google_brand {
11 15
12 bool GetBrand(std::string* brand) { 16 bool GetBrand(std::string* brand) {
13 if (!ios::GetChromeBrowserProvider()) 17 if (!ios::GetChromeBrowserProvider())
14 return false; 18 return false;
15 19
16 brand->assign(ios::GetChromeBrowserProvider()->GetDistributionBrandCode()); 20 brand->assign(ios::GetChromeBrowserProvider()->GetDistributionBrandCode());
17 return true; 21 return true;
18 } 22 }
19 23
20 bool IsOrganic(const std::string& brand) { 24 bool IsOrganic(const std::string& brand) {
21 // An empty brand string on iOS is used for organic installation. All other 25 // An empty brand string on iOS is used for organic installation. All other
22 // iOS brand string are non-organic. 26 // iOS brand string are non-organic.
23 return brand.empty(); 27 return brand.empty();
24 } 28 }
25 29
26 } // namespace google_brand 30 } // namespace google_brand
27 } // namespace ios 31 } // namespace ios
OLDNEW
« no previous file with comments | « ios/chrome/browser/google/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698