OLD | NEW |
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/ui/sync/profile_signin_confirmation_helper.h" | 5 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 } // namespace | 43 } // namespace |
44 | 44 |
45 namespace ui { | 45 namespace ui { |
46 | 46 |
47 SkColor GetSigninConfirmationPromptBarColor(ui::NativeTheme* theme, | 47 SkColor GetSigninConfirmationPromptBarColor(ui::NativeTheme* theme, |
48 SkAlpha alpha) { | 48 SkAlpha alpha) { |
49 static const SkColor kBackgroundColor = | 49 static const SkColor kBackgroundColor = |
50 theme->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground); | 50 theme->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground); |
51 return color_utils::BlendTowardOppositeLuminance(kBackgroundColor, alpha); | 51 return color_utils::BlendTowardOppositeLuma(kBackgroundColor, alpha); |
52 } | 52 } |
53 | 53 |
54 bool HasBeenShutdown(Profile* profile) { | 54 bool HasBeenShutdown(Profile* profile) { |
55 bool has_been_shutdown = !profile->IsNewProfile(); | 55 bool has_been_shutdown = !profile->IsNewProfile(); |
56 if (has_been_shutdown) | 56 if (has_been_shutdown) |
57 DVLOG(1) << "ProfileSigninConfirmationHelper: profile is not new"; | 57 DVLOG(1) << "ProfileSigninConfirmationHelper: profile is not new"; |
58 return has_been_shutdown; | 58 return has_been_shutdown; |
59 } | 59 } |
60 | 60 |
61 bool HasSyncedExtensions(Profile* profile) { | 61 bool HasSyncedExtensions(Profile* profile) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 history::HistoryService* service = | 95 history::HistoryService* service = |
96 HistoryServiceFactory::GetForProfileWithoutCreating(profile); | 96 HistoryServiceFactory::GetForProfileWithoutCreating(profile); |
97 // Fire asynchronous queries for profile data. | 97 // Fire asynchronous queries for profile data. |
98 sync_driver::SigninConfirmationHelper* helper = | 98 sync_driver::SigninConfirmationHelper* helper = |
99 new sync_driver::SigninConfirmationHelper(service, return_result); | 99 new sync_driver::SigninConfirmationHelper(service, return_result); |
100 helper->CheckHasHistory(kHistoryEntriesBeforeNewProfilePrompt); | 100 helper->CheckHasHistory(kHistoryEntriesBeforeNewProfilePrompt); |
101 helper->CheckHasTypedURLs(); | 101 helper->CheckHasTypedURLs(); |
102 } | 102 } |
103 | 103 |
104 } // namespace ui | 104 } // namespace ui |
OLD | NEW |