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

Side by Side Diff: chrome/browser/ui/browser_init.cc

Issue 6602010: Added "--login-user=" option for the Guest session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: merge Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_init.h" 5 #include "chrome/browser/ui/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/event_recorder.h" 10 #include "base/event_recorder.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void RecordCmdLineAppHistogram() { 478 void RecordCmdLineAppHistogram() {
479 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, 479 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram,
480 extension_misc::APP_LAUNCH_CMD_LINE_APP, 480 extension_misc::APP_LAUNCH_CMD_LINE_APP,
481 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); 481 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
482 } 482 }
483 483
484 void RecordAppLaunches( 484 void RecordAppLaunches(
485 Profile* profile, 485 Profile* profile,
486 const std::vector<GURL>& cmd_line_urls, 486 const std::vector<GURL>& cmd_line_urls,
487 const std::vector<BrowserInit::LaunchWithProfile::Tab>& autolaunch_tabs) { 487 const std::vector<BrowserInit::LaunchWithProfile::Tab>& autolaunch_tabs) {
488 // TODO: the ExtensionService should never be NULL, but in some cases it is,
489 // see bug 73768. After it is resolved, the explicit test can go away.
490 ExtensionService* extension_service = profile->GetExtensionService(); 488 ExtensionService* extension_service = profile->GetExtensionService();
491 if (!extension_service) 489 DCHECK(extension_service);
492 return;
493
494 for (size_t i = 0; i < cmd_line_urls.size(); ++i) { 490 for (size_t i = 0; i < cmd_line_urls.size(); ++i) {
495 if (extension_service->IsInstalledApp(cmd_line_urls.at(i))) { 491 if (extension_service->IsInstalledApp(cmd_line_urls.at(i))) {
496 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, 492 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram,
497 extension_misc::APP_LAUNCH_CMD_LINE_URL, 493 extension_misc::APP_LAUNCH_CMD_LINE_URL,
498 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); 494 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
499 } 495 }
500 } 496 }
501
502 for (size_t i = 0; i < autolaunch_tabs.size(); ++i) { 497 for (size_t i = 0; i < autolaunch_tabs.size(); ++i) {
503 if (extension_service->IsInstalledApp(autolaunch_tabs.at(i).url)) { 498 if (extension_service->IsInstalledApp(autolaunch_tabs.at(i).url)) {
504 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, 499 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram,
505 extension_misc::APP_LAUNCH_AUTOLAUNCH, 500 extension_misc::APP_LAUNCH_AUTOLAUNCH,
506 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); 501 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
507 } 502 }
508 } 503 }
509 } 504 }
510 505
511 } // namespace 506 } // namespace
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 return false; 1332 return false;
1338 automation->SetExpectedTabCount(expected_tabs); 1333 automation->SetExpectedTabCount(expected_tabs);
1339 1334
1340 AutomationProviderList* list = 1335 AutomationProviderList* list =
1341 g_browser_process->InitAutomationProviderList(); 1336 g_browser_process->InitAutomationProviderList();
1342 DCHECK(list); 1337 DCHECK(list);
1343 list->AddProvider(automation); 1338 list->AddProvider(automation);
1344 1339
1345 return true; 1340 return true;
1346 } 1341 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_navigator_browsertest_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698