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

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

Issue 718673002: New user type introduced. Combines regular and supervised features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Logical expression fixed. Created 6 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 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 if (!started_) { 353 if (!started_) {
354 started_ = true; 354 started_ = true;
355 initial_delay_timer_.Start( 355 initial_delay_timer_.Start(
356 FROM_HERE, 356 FROM_HERE,
357 base::TimeDelta::FromSeconds(initial_delay_secs_), 357 base::TimeDelta::FromSeconds(initial_delay_secs_),
358 this, 358 this,
359 &DriveFirstRunController::EnableOfflineMode); 359 &DriveFirstRunController::EnableOfflineMode);
360 return; 360 return;
361 } 361 }
362 362
363 if (!user_manager::UserManager::Get()->IsLoggedInAsRegularUser()) { 363 if (!user_manager::UserManager::Get()->IsLoggedInAsUserWithGaiaAccount()) {
364 LOG(ERROR) << "Attempting to enable offline access " 364 LOG(ERROR) << "Attempting to enable offline access "
365 "but not logged in a regular user."; 365 "but not logged in a regular user.";
bartfab (slow) 2014/11/27 12:51:50 Nit: s/a regular/as a gaia/
366 OnOfflineInit(false, OUTCOME_WRONG_USER_TYPE); 366 OnOfflineInit(false, OUTCOME_WRONG_USER_TYPE);
367 return; 367 return;
368 } 368 }
369 369
370 ExtensionService* extension_service = 370 ExtensionService* extension_service =
371 extensions::ExtensionSystem::Get(profile_)->extension_service(); 371 extensions::ExtensionSystem::Get(profile_)->extension_service();
372 if (!extension_service->GetExtensionById(drive_hosted_app_id_, false)) { 372 if (!extension_service->GetExtensionById(drive_hosted_app_id_, false)) {
373 LOG(WARNING) << "Drive app is not installed."; 373 LOG(WARNING) << "Drive app is not installed.";
374 OnOfflineInit(false, OUTCOME_APP_NOT_INSTALLED); 374 OnOfflineInit(false, OUTCOME_APP_NOT_INSTALLED);
375 return; 375 return;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 base::UTF8ToUTF16(extension->name()), 466 base::UTF8ToUTF16(extension->name()),
467 message_center::NotifierId(message_center::NotifierId::APPLICATION, 467 message_center::NotifierId(message_center::NotifierId::APPLICATION,
468 kDriveHostedAppId), 468 kDriveHostedAppId),
469 data, 469 data,
470 new DriveOfflineNotificationDelegate(profile_))); 470 new DriveOfflineNotificationDelegate(profile_)));
471 notification->set_priority(message_center::LOW_PRIORITY); 471 notification->set_priority(message_center::LOW_PRIORITY);
472 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 472 message_center::MessageCenter::Get()->AddNotification(notification.Pass());
473 } 473 }
474 474
475 } // namespace chromeos 475 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698