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

Side by Side Diff: chrome/browser/ui/startup/default_browser_prompt.cc

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes mistake in previous patch set. Created 4 years, 11 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
« no previous file with comments | « chrome/browser/ui/pdf/adobe_reader_info_win.cc ('k') | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/startup/default_browser_prompt.h" 5 #include "chrome/browser/ui/startup/default_browser_prompt.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // - The user said "don't ask me again" on the infobar earlier. 307 // - The user said "don't ask me again" on the infobar earlier.
308 // - The "suppress_default_browser_prompt_for_version" master preference is 308 // - The "suppress_default_browser_prompt_for_version" master preference is
309 // set to the current version. 309 // set to the current version.
310 bool show_prompt = prefs->GetBoolean(prefs::kCheckDefaultBrowser); 310 bool show_prompt = prefs->GetBoolean(prefs::kCheckDefaultBrowser);
311 if (show_prompt) { 311 if (show_prompt) {
312 const std::string disable_version_string = 312 const std::string disable_version_string =
313 g_browser_process->local_state()->GetString( 313 g_browser_process->local_state()->GetString(
314 prefs::kBrowserSuppressDefaultBrowserPrompt); 314 prefs::kBrowserSuppressDefaultBrowserPrompt);
315 const Version disable_version(disable_version_string); 315 const Version disable_version(disable_version_string);
316 DCHECK(disable_version_string.empty() || disable_version.IsValid()); 316 DCHECK(disable_version_string.empty() || disable_version.IsValid());
317 if (disable_version.IsValid()) { 317 if (disable_version.IsValid() &&
318 if (disable_version.Equals(Version(version_info::GetVersionNumber()))) 318 disable_version == Version(version_info::GetVersionNumber())) {
319 show_prompt = false; 319 show_prompt = false;
320 } 320 }
321 } 321 }
322 322
323 scoped_refptr<ShellIntegration::DefaultBrowserWorker>( 323 scoped_refptr<ShellIntegration::DefaultBrowserWorker>(
324 new ShellIntegration::DefaultBrowserWorker( 324 new ShellIntegration::DefaultBrowserWorker(
325 new CheckDefaultBrowserObserver(profile->GetPath(), show_prompt, 325 new CheckDefaultBrowserObserver(profile->GetPath(), show_prompt,
326 desktop_type))) 326 desktop_type)))
327 ->StartCheckIsDefault(); 327 ->StartCheckIsDefault();
328 } 328 }
329 329
330 #if !defined(OS_WIN) 330 #if !defined(OS_WIN)
331 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 331 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
332 return false; 332 return false;
333 } 333 }
334 #endif 334 #endif
335 335
336 } // namespace chrome 336 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/pdf/adobe_reader_info_win.cc ('k') | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698