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

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 397853002: Refactor safe-browsing build-config definitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to satiate trybots Created 6 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 #include "chrome/browser/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 11 matching lines...) Expand all
22 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
23 #include "content/public/browser/web_ui.h" 23 #include "content/public/browser/web_ui.h"
24 #include "extensions/browser/pref_names.h" 24 #include "extensions/browser/pref_names.h"
25 25
26 #if defined(OS_CHROMEOS) 26 #if defined(OS_CHROMEOS)
27 #include "base/command_line.h" 27 #include "base/command_line.h"
28 #include "chrome/common/chrome_switches.h" 28 #include "chrome/common/chrome_switches.h"
29 #include "chromeos/chromeos_switches.h" 29 #include "chromeos/chromeos_switches.h"
30 #endif 30 #endif
31 31
32 // TODO(shess): Should possibly be SAFE_BROWSING_SERVICE.
32 #if defined(OS_ANDROID) && defined(FULL_SAFE_BROWSING) 33 #if defined(OS_ANDROID) && defined(FULL_SAFE_BROWSING)
33 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 34 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
34 #endif 35 #endif
35 36
36 Profile::Profile() 37 Profile::Profile()
37 : restored_last_session_(false), 38 : restored_last_session_(false),
38 sent_destroyed_notification_(false), 39 sent_destroyed_notification_(false),
39 accessibility_pause_level_(0) { 40 accessibility_pause_level_(0) {
40 } 41 }
41 42
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 77 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
77 #endif 78 #endif
78 registry->RegisterBooleanPref( 79 registry->RegisterBooleanPref(
79 prefs::kSessionExitedCleanly, 80 prefs::kSessionExitedCleanly,
80 true, 81 true,
81 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 82 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
82 registry->RegisterStringPref( 83 registry->RegisterStringPref(
83 prefs::kSessionExitType, 84 prefs::kSessionExitType,
84 std::string(), 85 std::string(),
85 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 86 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
87 // TODO(shess): This seems wrongish. Perhaps the API should be in the
88 // service, with the #if OS_ANDROID inside that implementation.
86 #if defined(OS_ANDROID) && defined(FULL_SAFE_BROWSING) 89 #if defined(OS_ANDROID) && defined(FULL_SAFE_BROWSING)
87 // During Finch trail, safe browsing should be turned off 90 // During Finch trail, safe browsing should be turned off
88 // by default, and not sync'ed with desktop. 91 // by default, and not sync'ed with desktop.
89 // If we want to enable safe browsing on Android, we will 92 // If we want to enable safe browsing on Android, we will
90 // need to remove this Android-specific code. 93 // need to remove this Android-specific code.
91 registry->RegisterBooleanPref( 94 registry->RegisterBooleanPref(
92 prefs::kSafeBrowsingEnabled, 95 prefs::kSafeBrowsingEnabled,
93 SafeBrowsingService::IsEnabledByFieldTrial(), 96 SafeBrowsingService::IsEnabledByFieldTrial(),
94 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 97 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
95 #else 98 #else
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 content::NotificationService::NoDetails()); 253 content::NotificationService::NoDetails());
251 } 254 }
252 } 255 }
253 256
254 bool ProfileCompare::operator()(Profile* a, Profile* b) const { 257 bool ProfileCompare::operator()(Profile* a, Profile* b) const {
255 DCHECK(a && b); 258 DCHECK(a && b);
256 if (a->IsSameProfile(b)) 259 if (a->IsSameProfile(b))
257 return false; 260 return false;
258 return a->GetOriginalProfile() < b->GetOriginalProfile(); 261 return a->GetOriginalProfile() < b->GetOriginalProfile();
259 } 262 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698