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

Side by Side Diff: chrome/browser/chromeos/boot_times_loader.cc

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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) 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/chromeos/boot_times_loader.h" 5 #include "chrome/browser/chromeos/boot_times_loader.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/json/json_reader.h" 13 #include "base/json/json_reader.h"
14 #include "base/json/json_writer.h" 14 #include "base/json/json_writer.h"
15 #include "base/lazy_instance.h" 15 #include "base/lazy_instance.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
18 #include "base/message_loop/message_loop_proxy.h" 18 #include "base/message_loop/message_loop_proxy.h"
19 #include "base/metrics/histogram.h" 19 #include "base/metrics/histogram.h"
20 #include "base/prefs/pref_service.h" 20 #include "base/prefs/pref_service.h"
21 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/string_util.h" 22 #include "base/strings/string_util.h"
23 #include "base/strings/stringprintf.h" 23 #include "base/strings/stringprintf.h"
24 #include "base/threading/thread.h" 24 #include "base/threading/thread.h"
25 #include "base/threading/thread_restrictions.h" 25 #include "base/threading/thread_restrictions.h"
26 #include "base/time/time.h" 26 #include "base/time/time.h"
27 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
28 #include "chrome/browser/chrome_notification_types.h" 28 #include "chrome/browser/chrome_notification_types.h"
29 #include "chrome/browser/chromeos/login/auth/authentication_notification_details .h" 29 #include "chrome/browser/chromeos/login/auth/authentication_notification_details .h"
30 #include "chrome/browser/chromeos/login/users/user_manager.h"
31 #include "chrome/browser/ui/browser.h" 30 #include "chrome/browser/ui/browser.h"
32 #include "chrome/browser/ui/browser_iterator.h" 31 #include "chrome/browser/ui/browser_iterator.h"
33 #include "chrome/browser/ui/tabs/tab_strip_model.h" 32 #include "chrome/browser/ui/tabs/tab_strip_model.h"
34 #include "chrome/common/chrome_switches.h" 33 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/pref_names.h" 34 #include "chrome/common/pref_names.h"
35 #include "components/user_manager/user_manager.h"
36 #include "content/public/browser/browser_thread.h" 36 #include "content/public/browser/browser_thread.h"
37 #include "content/public/browser/navigation_controller.h" 37 #include "content/public/browser/navigation_controller.h"
38 #include "content/public/browser/notification_service.h" 38 #include "content/public/browser/notification_service.h"
39 #include "content/public/browser/render_widget_host_view.h" 39 #include "content/public/browser/render_widget_host_view.h"
40 #include "content/public/browser/web_contents.h" 40 #include "content/public/browser/web_contents.h"
41 41
42 using content::BrowserThread; 42 using content::BrowserThread;
43 using content::NavigationController; 43 using content::NavigationController;
44 using content::RenderWidgetHost; 44 using content::RenderWidgetHost;
45 using content::RenderWidgetHostView; 45 using content::RenderWidgetHostView;
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 render_widget_hosts_loading_.end()) { 507 render_widget_hosts_loading_.end()) {
508 AddLoginTimeMarker("TabLoad-End: " + GetTabUrl(rwh), false); 508 AddLoginTimeMarker("TabLoad-End: " + GetTabUrl(rwh), false);
509 } 509 }
510 break; 510 break;
511 } 511 }
512 case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_UPDATE_BACKING_STORE: { 512 case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_UPDATE_BACKING_STORE: {
513 RenderWidgetHost* rwh = content::Source<RenderWidgetHost>(source).ptr(); 513 RenderWidgetHost* rwh = content::Source<RenderWidgetHost>(source).ptr();
514 if (render_widget_hosts_loading_.find(rwh) != 514 if (render_widget_hosts_loading_.find(rwh) !=
515 render_widget_hosts_loading_.end()) { 515 render_widget_hosts_loading_.end()) {
516 AddLoginTimeMarker("TabPaint: " + GetTabUrl(rwh), false); 516 AddLoginTimeMarker("TabPaint: " + GetTabUrl(rwh), false);
517 LoginDone(UserManager::Get()->IsCurrentUserNew()); 517 LoginDone(user_manager::UserManager::Get()->IsCurrentUserNew());
518 } 518 }
519 break; 519 break;
520 } 520 }
521 case content::NOTIFICATION_WEB_CONTENTS_DESTROYED: { 521 case content::NOTIFICATION_WEB_CONTENTS_DESTROYED: {
522 WebContents* web_contents = content::Source<WebContents>(source).ptr(); 522 WebContents* web_contents = content::Source<WebContents>(source).ptr();
523 RenderWidgetHost* render_widget_host = 523 RenderWidgetHost* render_widget_host =
524 GetRenderWidgetHost(&web_contents->GetController()); 524 GetRenderWidgetHost(&web_contents->GetController());
525 render_widget_hosts_loading_.erase(render_widget_host); 525 render_widget_hosts_loading_.erase(render_widget_host);
526 break; 526 break;
527 } 527 }
528 default: 528 default:
529 break; 529 break;
530 } 530 }
531 } 531 }
532 532
533 } // namespace chromeos 533 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698