Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / profile_resetter / brandcoded_default_settings.h
blob2de40412b483203a50ceb32ec6b017da46df1d8c
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PROFILE_RESETTER_BRANDCODED_DEFAULT_SETTINGS_H_
6 #define CHROME_BROWSER_PROFILE_RESETTER_BRANDCODED_DEFAULT_SETTINGS_H_
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h"
15 // BrandcodedDefaultSettings provides a set of default settings
16 // for ProfileResetter. They are specific to Chrome distribution channels.
17 class BrandcodedDefaultSettings {
18 public:
19 BrandcodedDefaultSettings();
20 // Constructs BrandcodedDefaultSettings directly from preferences.
21 explicit BrandcodedDefaultSettings(const std::string& prefs);
22 ~BrandcodedDefaultSettings();
24 // The following methods return non-zero value if the default value was
25 // provided for given setting.
26 // After the call return_value contains a list of default engines.
27 // |return_value[0]| is default one.
28 scoped_ptr<base::ListValue> GetSearchProviderOverrides() const;
30 bool GetHomepage(std::string* homepage) const;
31 bool GetHomepageIsNewTab(bool* homepage_is_ntp) const;
32 bool GetShowHomeButton(bool* show_home_button) const;
34 // |extension_ids| is a list of extension ids.
35 bool GetExtensions(std::vector<std::string>* extension_ids) const;
37 bool GetRestoreOnStartup(int* restore_on_startup) const;
38 scoped_ptr<base::ListValue> GetUrlsToRestoreOnStartup() const;
40 private:
41 scoped_ptr<base::ListValue> ExtractList(const char* pref_name) const;
43 scoped_ptr<base::DictionaryValue> master_dictionary_;
45 DISALLOW_COPY_AND_ASSIGN(BrandcodedDefaultSettings);
48 #endif // CHROME_BROWSER_PROFILE_RESETTER_BRANDCODED_DEFAULT_SETTINGS_H_