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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan 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
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/ui/webui/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 172 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
173 const bool is_running_test = command_line->HasSwitch(::switches::kTestName) || 173 const bool is_running_test = command_line->HasSwitch(::switches::kTestName) ||
174 command_line->HasSwitch(::switches::kTestType); 174 command_line->HasSwitch(::switches::kTestType);
175 if (is_running_test) 175 if (is_running_test)
176 source->SetRequestFilter(::test::GetTestFilesRequestFilter()); 176 source->SetRequestFilter(::test::GetTestFilesRequestFilter());
177 177
178 return source; 178 return source;
179 } 179 }
180 180
181 std::string GetDisplayType(const GURL& url) { 181 std::string GetDisplayType(const GURL& url) {
182 std::string path = url.path().size() ? url.path().substr(1) : ""; 182 std::string path = url.path().size() ? url.path().substr(1).as_string() : "";
183 if (std::find(kKnownDisplayTypes, 183 if (std::find(kKnownDisplayTypes,
184 kKnownDisplayTypes + arraysize(kKnownDisplayTypes), 184 kKnownDisplayTypes + arraysize(kKnownDisplayTypes),
185 path) == kKnownDisplayTypes + arraysize(kKnownDisplayTypes)) { 185 path) == kKnownDisplayTypes + arraysize(kKnownDisplayTypes)) {
186 LOG(ERROR) << "Unknown display type '" << path << "'. Setting default."; 186 LOG(ERROR) << "Unknown display type '" << path << "'. Setting default.";
187 return OobeUI::kLoginDisplay; 187 return OobeUI::kLoginDisplay;
188 } 188 }
189 return path; 189 return path;
190 } 190 }
191 191
192 } // namespace 192 } // namespace
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // http://crbug.com/646034. 599 // http://crbug.com/646034.
600 NOTIMPLEMENTED(); 600 NOTIMPLEMENTED();
601 } 601 }
602 602
603 current_screen_ = new_screen; 603 current_screen_ = new_screen;
604 for (Observer& observer : observer_list_) 604 for (Observer& observer : observer_list_)
605 observer.OnCurrentScreenChanged(current_screen_, new_screen); 605 observer.OnCurrentScreenChanged(current_screen_, new_screen);
606 } 606 }
607 607
608 } // namespace chromeos 608 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698