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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_regular.cc

Issue 1545223002: Switch to standard integer types in chrome/browser/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/signin/easy_unlock_service_regular.h" 5 #include "chrome/browser/signin/easy_unlock_service_regular.h"
6 6
7 #include <stdint.h>
8
7 #include "base/base64url.h" 9 #include "base/base64url.h"
8 #include "base/bind.h" 10 #include "base/bind.h"
9 #include "base/command_line.h" 11 #include "base/command_line.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
12 #include "base/prefs/scoped_user_pref_update.h" 14 #include "base/prefs/scoped_user_pref_update.h"
13 #include "base/sys_info.h" 15 #include "base/sys_info.h"
14 #include "base/time/default_clock.h" 16 #include "base/time/default_clock.h"
15 #include "base/values.h" 17 #include "base/values.h"
18 #include "build/build_config.h"
16 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 21 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
19 #include "chrome/browser/signin/chrome_proximity_auth_client.h" 22 #include "chrome/browser/signin/chrome_proximity_auth_client.h"
20 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
21 #include "chrome/browser/signin/signin_manager_factory.h" 24 #include "chrome/browser/signin/signin_manager_factory.h"
22 #include "chrome/common/extensions/api/easy_unlock_private.h" 25 #include "chrome/common/extensions/api/easy_unlock_private.h"
23 #include "chrome/common/extensions/extension_constants.h" 26 #include "chrome/common/extensions/extension_constants.h"
24 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
25 #include "chromeos/login/user_names.h" 28 #include "chromeos/login/user_names.h"
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 // The Chrome OS version tracks the Chrome version, so fill in the same value 615 // The Chrome OS version tracks the Chrome version, so fill in the same value
613 // as |device_software_version_code|. 616 // as |device_software_version_code|.
614 device_info.set_device_os_version_code(software_version_code); 617 device_info.set_device_os_version_code(software_version_code);
615 618
616 // There may not be a Shell instance in tests. 619 // There may not be a Shell instance in tests.
617 if (!ash::Shell::HasInstance()) 620 if (!ash::Shell::HasInstance())
618 return device_info; 621 return device_info;
619 622
620 ash::DisplayManager* display_manager = 623 ash::DisplayManager* display_manager =
621 ash::Shell::GetInstance()->display_manager(); 624 ash::Shell::GetInstance()->display_manager();
622 int64 primary_display_id = display_manager->GetPrimaryDisplayCandidate().id(); 625 int64_t primary_display_id =
626 display_manager->GetPrimaryDisplayCandidate().id();
623 ash::DisplayInfo display_info = 627 ash::DisplayInfo display_info =
624 display_manager->GetDisplayInfo(primary_display_id); 628 display_manager->GetDisplayInfo(primary_display_id);
625 gfx::Rect bounds = display_info.bounds_in_native(); 629 gfx::Rect bounds = display_info.bounds_in_native();
626 630
627 // TODO(tengs): This is a heuristic to deterimine the DPI of the display, as 631 // TODO(tengs): This is a heuristic to deterimine the DPI of the display, as
628 // there is no convenient way of getting this information right now. 632 // there is no convenient way of getting this information right now.
629 const double dpi = display_info.device_scale_factor() > 1.0f ? 239.0f : 96.0f; 633 const double dpi = display_info.device_scale_factor() > 1.0f ? 239.0f : 96.0f;
630 double width_in_inches = (bounds.width() - bounds.x()) / dpi; 634 double width_in_inches = (bounds.width() - bounds.x()) / dpi;
631 double height_in_inches = (bounds.height() - bounds.y()) / dpi; 635 double height_in_inches = (bounds.height() - bounds.y()) / dpi;
632 double diagonal_in_inches = sqrt(width_in_inches * width_in_inches + 636 double diagonal_in_inches = sqrt(width_in_inches * width_in_inches +
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 PA_LOG(INFO) << "Refresh token not yet available, " 676 PA_LOG(INFO) << "Refresh token not yet available, "
673 << "waiting before starting CryptAuth managers"; 677 << "waiting before starting CryptAuth managers";
674 token_service->AddObserver(this); 678 token_service->AddObserver(this);
675 } 679 }
676 680
677 device_manager_->AddObserver(this); 681 device_manager_->AddObserver(this);
678 enrollment_manager_->Start(); 682 enrollment_manager_->Start();
679 device_manager_->Start(); 683 device_manager_->Start();
680 } 684 }
681 #endif 685 #endif
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_service_regular.h ('k') | chrome/browser/signin/easy_unlock_service_signin_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698