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

Side by Side Diff: components/translate/core/common/translate_util.cc

Issue 818103002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/translate/core/common/translate_util.h" 5 #include "components/translate/core/common/translate_util.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 main_part = std::string(kLanguageCodeSynonyms[i].chrome_language); 130 main_part = std::string(kLanguageCodeSynonyms[i].chrome_language);
131 break; 131 break;
132 } 132 }
133 } 133 }
134 134
135 *language = main_part + tail_part; 135 *language = main_part + tail_part;
136 } 136 }
137 137
138 GURL GetTranslateSecurityOrigin() { 138 GURL GetTranslateSecurityOrigin() {
139 std::string security_origin(kSecurityOrigin); 139 std::string security_origin(kSecurityOrigin);
140 CommandLine* command_line = CommandLine::ForCurrentProcess(); 140 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
141 if (command_line->HasSwitch(switches::kTranslateSecurityOrigin)) { 141 if (command_line->HasSwitch(switches::kTranslateSecurityOrigin)) {
142 security_origin = 142 security_origin =
143 command_line->GetSwitchValueASCII(switches::kTranslateSecurityOrigin); 143 command_line->GetSwitchValueASCII(switches::kTranslateSecurityOrigin);
144 } 144 }
145 return GURL(security_origin); 145 return GURL(security_origin);
146 } 146 }
147 147
148 } // namespace translate 148 } // namespace translate
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698