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

Side by Side Diff: chrome/browser/ui/cocoa/first_run_dialog.mm

Issue 20743002: Do not CreateSentinel until after the process singleton has been grabbed by the current process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge latest version of https://codereview.chromium.org/20483002/ Created 7 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/first_run_dialog.h" 5 #import "chrome/browser/ui/cocoa/first_run_dialog.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 BOOL make_default_browser = [dialog.get() makeDefaultBrowser]; 114 BOOL make_default_browser = [dialog.get() makeDefaultBrowser];
115 if (make_default_browser) { 115 if (make_default_browser) {
116 bool success = ShellIntegration::SetAsDefaultBrowser(); 116 bool success = ShellIntegration::SetAsDefaultBrowser();
117 DCHECK(success); 117 DCHECK(success);
118 } 118 }
119 } 119 }
120 #else // GOOGLE_CHROME_BUILD 120 #else // GOOGLE_CHROME_BUILD
121 // We don't show the dialog in Chromium. 121 // We don't show the dialog in Chromium.
122 #endif // GOOGLE_CHROME_BUILD 122 #endif // GOOGLE_CHROME_BUILD
123 123
124 first_run::CreateSentinel();
125
126 // Set preference to show first run bubble and welcome page. 124 // Set preference to show first run bubble and welcome page.
127 // Only display the bubble if there is a default search provider. 125 // Only display the bubble if there is a default search provider.
128 TemplateURLService* search_engines_model = 126 TemplateURLService* search_engines_model =
129 TemplateURLServiceFactory::GetForProfile(profile); 127 TemplateURLServiceFactory::GetForProfile(profile);
130 if (search_engines_model && 128 if (search_engines_model &&
131 search_engines_model->GetDefaultSearchProvider()) { 129 search_engines_model->GetDefaultSearchProvider()) {
132 first_run::SetShowFirstRunBubblePref(first_run::FIRST_RUN_BUBBLE_SHOW); 130 first_run::SetShowFirstRunBubblePref(first_run::FIRST_RUN_BUBBLE_SHOW);
133 } 131 }
134 first_run::SetShouldShowWelcomePage(); 132 first_run::SetShouldShowWelcomePage();
135 133
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 [NSApp stopModal]; 289 [NSApp stopModal];
292 } 290 }
293 291
294 - (IBAction)learnMore:(id)sender { 292 - (IBAction)learnMore:(id)sender {
295 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); 293 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL);
296 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; 294 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr];
297 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; 295 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl];
298 } 296 }
299 297
300 @end 298 @end
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/ui/gtk/first_run_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698