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

Side by Side Diff: chrome/browser/chromeos/first_run/drive_first_run_controller.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/first_run/drive_first_run_controller.h" 5 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 if (!started_) { 357 if (!started_) {
358 started_ = true; 358 started_ = true;
359 initial_delay_timer_.Start( 359 initial_delay_timer_.Start(
360 FROM_HERE, 360 FROM_HERE,
361 base::TimeDelta::FromSeconds(initial_delay_secs_), 361 base::TimeDelta::FromSeconds(initial_delay_secs_),
362 this, 362 this,
363 &DriveFirstRunController::EnableOfflineMode); 363 &DriveFirstRunController::EnableOfflineMode);
364 return; 364 return;
365 } 365 }
366 366
367 if (!UserManager::Get()->IsLoggedInAsRegularUser()) { 367 if (!GetUserManager()->IsLoggedInAsRegularUser()) {
368 LOG(ERROR) << "Attempting to enable offline access " 368 LOG(ERROR) << "Attempting to enable offline access "
369 "but not logged in a regular user."; 369 "but not logged in a regular user.";
370 OnOfflineInit(false, OUTCOME_WRONG_USER_TYPE); 370 OnOfflineInit(false, OUTCOME_WRONG_USER_TYPE);
371 return; 371 return;
372 } 372 }
373 373
374 ExtensionService* extension_service = 374 ExtensionService* extension_service =
375 extensions::ExtensionSystem::Get(profile_)->extension_service(); 375 extensions::ExtensionSystem::Get(profile_)->extension_service();
376 if (!extension_service->GetExtensionById(drive_hosted_app_id_, false)) { 376 if (!extension_service->GetExtensionById(drive_hosted_app_id_, false)) {
377 LOG(WARNING) << "Drive app is not installed."; 377 LOG(WARNING) << "Drive app is not installed.";
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 base::UTF8ToUTF16(extension->name()), 470 base::UTF8ToUTF16(extension->name()),
471 message_center::NotifierId(message_center::NotifierId::APPLICATION, 471 message_center::NotifierId(message_center::NotifierId::APPLICATION,
472 kDriveHostedAppId), 472 kDriveHostedAppId),
473 data, 473 data,
474 new DriveOfflineNotificationDelegate(profile_))); 474 new DriveOfflineNotificationDelegate(profile_)));
475 notification->set_priority(message_center::LOW_PRIORITY); 475 notification->set_priority(message_center::LOW_PRIORITY);
476 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 476 message_center::MessageCenter::Get()->AddNotification(notification.Pass());
477 } 477 }
478 478
479 } // namespace chromeos 479 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/path_util.cc ('k') | chrome/browser/chromeos/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698