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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 566763002: Use a std::string to store return value from FieldTrialList::FindFullName() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move back to StringPiece and prefix checking. Created 6 years, 3 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
« no previous file with comments | « no previous file | 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 (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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 1377
1378 if (parsed_command_line().HasSwitch(switches::kEnableSdchOverHttps)) { 1378 if (parsed_command_line().HasSwitch(switches::kEnableSdchOverHttps)) {
1379 net::SdchManager::EnableSecureSchemeSupport(true); 1379 net::SdchManager::EnableSecureSchemeSupport(true);
1380 } else { 1380 } else {
1381 // Check SDCH field trial. 1381 // Check SDCH field trial.
1382 const char kSdchFieldTrialName[] = "SDCH"; 1382 const char kSdchFieldTrialName[] = "SDCH";
1383 const char kEnabledAllGroupName[] = "EnabledAll"; 1383 const char kEnabledAllGroupName[] = "EnabledAll";
1384 const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly"; 1384 const char kEnabledHttpOnlyGroupName[] = "EnabledHttpOnly";
1385 const char kDisabledAllGroupName[] = "DisabledAll"; 1385 const char kDisabledAllGroupName[] = "DisabledAll";
1386 1386
1387 base::StringPiece sdch_trial_group = 1387 std::string sdch_trial_group_string =
sky 2014/09/12 18:14:49 How about a comment so this doesn't happen again.
Randy Smith (Not in Mondays) 2014/09/12 19:35:55 Done.
1388 base::FieldTrialList::FindFullName(kSdchFieldTrialName); 1388 base::FieldTrialList::FindFullName(kSdchFieldTrialName);
1389 base::StringPiece sdch_trial_group(sdch_trial_group_string);
1389 if (sdch_trial_group.starts_with(kEnabledAllGroupName)) { 1390 if (sdch_trial_group.starts_with(kEnabledAllGroupName)) {
1390 net::SdchManager::EnableSecureSchemeSupport(true); 1391 net::SdchManager::EnableSecureSchemeSupport(true);
1391 net::SdchManager::EnableSdchSupport(true); 1392 net::SdchManager::EnableSdchSupport(true);
1392 } else if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) { 1393 } else if (sdch_trial_group.starts_with(kEnabledHttpOnlyGroupName)) {
1393 net::SdchManager::EnableSdchSupport(true); 1394 net::SdchManager::EnableSdchSupport(true);
1394 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) { 1395 } else if (sdch_trial_group.starts_with(kDisabledAllGroupName)) {
1395 net::SdchManager::EnableSdchSupport(false); 1396 net::SdchManager::EnableSdchSupport(false);
1396 } 1397 }
1397 } 1398 }
1398 1399
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 chromeos::CrosSettings::Shutdown(); 1679 chromeos::CrosSettings::Shutdown();
1679 #endif 1680 #endif
1680 #endif 1681 #endif
1681 } 1682 }
1682 1683
1683 // Public members: 1684 // Public members:
1684 1685
1685 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1686 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1686 chrome_extra_parts_.push_back(parts); 1687 chrome_extra_parts_.push_back(parts);
1687 } 1688 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698