master_preferences_dummy.cc revision 5821806d5e7f356e8fa4b058a389a808ea183019
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 3// found in the LICENSE file. 4// 5// This file defines dummy implementation of several functions from the 6// master_preferences namespace for Google Chrome. These functions allow 64-bit 7// Windows Chrome binary to build successfully. Since this binary is only used 8// for Native Client support which uses the 32 bit installer, most of the 9// master preferences functionality is not actually needed. 10 11#include "chrome/installer/util/master_preferences.h" 12 13#include <windows.h> 14 15#include "base/logging.h" 16#include "base/values.h" 17#include "googleurl/src/gurl.h" 18 19namespace installer { 20 21MasterPreferences::MasterPreferences(const CommandLine& cmd_line) 22 : distribution_(NULL), preferences_read_from_file_(false) { 23} 24 25MasterPreferences::MasterPreferences(const FilePath& prefs_path) 26 : distribution_(NULL), preferences_read_from_file_(false) { 27} 28 29MasterPreferences::~MasterPreferences() { 30} 31 32bool MasterPreferences::GetBool(const std::string& name, bool* value) const { 33 NOTREACHED(); 34 return false; 35} 36 37bool MasterPreferences::GetInt(const std::string& name, int* value) const { 38 NOTREACHED(); 39 return false; 40} 41 42bool MasterPreferences::GetString(const std::string& name, 43 std::string* value) const { 44 NOTREACHED(); 45 return false; 46} 47 48std::vector<GURL> MasterPreferences::GetFirstRunTabs() const { 49 NOTREACHED(); 50 return std::vector<GURL>(); 51} 52 53// static 54const MasterPreferences& MasterPreferences::ForCurrentProcess() { 55 static MasterPreferences prefs(*CommandLine::ForCurrentProcess()); 56 return prefs; 57} 58} 59 60// The use of std::vector<GURL>() above requires us to have destructors for 61// GURL and its contained types. GURL contains a member of type 62// url_parse::Parsed. Both Parsed and GURL declare (but do not implement) 63// explicit destructors in their header files. We're missing the real 64// implementations by not depending on the googleurl library. However, we don't 65// really need them, so we just replace them here rather than building a 64-bit 66// version of the googleurl library with all its dependencies. 67 68GURL::~GURL() { 69 NOTREACHED(); 70} 71 72namespace url_parse { 73 74Parsed::~Parsed() { 75 NOTREACHED(); 76} 77 78} 79