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

Side by Side Diff: chrome/browser/ui/sync/profile_signin_confirmation_helper.cc

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NATIVE_THEME_EXPORT for mac Created 5 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/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 "chrome/browser/bookmarks/bookmark_model_factory.h" 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 25 matching lines...) Expand all
36 bool has_bookmarks = bookmarks && bookmarks->HasBookmarks(); 36 bool has_bookmarks = bookmarks && bookmarks->HasBookmarks();
37 if (has_bookmarks) 37 if (has_bookmarks)
38 DVLOG(1) << "SigninConfirmationHelper: profile contains bookmarks"; 38 DVLOG(1) << "SigninConfirmationHelper: profile contains bookmarks";
39 return has_bookmarks; 39 return has_bookmarks;
40 } 40 }
41 41
42 } // namespace 42 } // namespace
43 43
44 namespace ui { 44 namespace ui {
45 45
46 SkColor GetSigninConfirmationPromptBarColor(SkAlpha alpha) { 46 SkColor GetSigninConfirmationPromptBarColor(ui::NativeTheme* theme,
47 SkAlpha alpha) {
47 static const SkColor kBackgroundColor = 48 static const SkColor kBackgroundColor =
48 ui::NativeTheme::instance()->GetSystemColor( 49 theme->GetSystemColor(ui::NativeTheme::kColorId_DialogBackground);
49 ui::NativeTheme::kColorId_DialogBackground);
50 return color_utils::BlendTowardOppositeLuminance(kBackgroundColor, alpha); 50 return color_utils::BlendTowardOppositeLuminance(kBackgroundColor, alpha);
51 } 51 }
52 52
53 bool HasBeenShutdown(Profile* profile) { 53 bool HasBeenShutdown(Profile* profile) {
54 #if defined(OS_IOS) 54 #if defined(OS_IOS)
55 // This check is not useful on iOS: the browser can be shut down without 55 // This check is not useful on iOS: the browser can be shut down without
56 // explicit user action (for example, in response to memory pressure), and 56 // explicit user action (for example, in response to memory pressure), and
57 // this should be invisible to the user. The desktop assumption that the 57 // this should be invisible to the user. The desktop assumption that the
58 // profile going through a restart indicates something about user intention 58 // profile going through a restart indicates something about user intention
59 // does not hold. We rely on the other profile dirtiness checks. 59 // does not hold. We rely on the other profile dirtiness checks.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 history::HistoryService* service = 103 history::HistoryService* service =
104 HistoryServiceFactory::GetForProfileWithoutCreating(profile); 104 HistoryServiceFactory::GetForProfileWithoutCreating(profile);
105 // Fire asynchronous queries for profile data. 105 // Fire asynchronous queries for profile data.
106 sync_driver::SigninConfirmationHelper* helper = 106 sync_driver::SigninConfirmationHelper* helper =
107 new sync_driver::SigninConfirmationHelper(service, return_result); 107 new sync_driver::SigninConfirmationHelper(service, return_result);
108 helper->CheckHasHistory(kHistoryEntriesBeforeNewProfilePrompt); 108 helper->CheckHasHistory(kHistoryEntriesBeforeNewProfilePrompt);
109 helper->CheckHasTypedURLs(); 109 helper->CheckHasTypedURLs();
110 } 110 }
111 111
112 } // namespace ui 112 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/profile_signin_confirmation_helper.h ('k') | chrome/browser/ui/views/exclusive_access_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698