ephemeral_profile.h revision b9c00597eb1f6d2560f7e88cb0d1f627228840d4
1// Copyright (c) 2011 The Chromium OS 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#ifndef SHILL_EPHEMERAL_PROFILE_ 6#define SHILL_EPHEMERAL_PROFILE_ 7 8#include <string> 9#include <vector> 10 11#include <base/memory/scoped_ptr.h> 12 13#include "shill/profile.h" 14#include "shill/property_store.h" 15#include "shill/refptr_types.h" 16#include "shill/shill_event.h" 17 18namespace shill { 19 20class ControlInterface; 21class Manager; 22class StoreInterface; 23 24// An in-memory profile that is not persisted to disk, but allows the 25// promotion of entries contained herein to the currently active profile. 26class EphemeralProfile : public Profile { 27 public: 28 EphemeralProfile(ControlInterface *control_interface, Manager *manager); 29 virtual ~EphemeralProfile(); 30 31 // Merely stop managing service persistence; flush nothing to disk. 32 virtual void Finalize(); 33 34 // Should not be called. 35 virtual bool Save(); 36 37 // Leaves |path| untouched and returns false. 38 virtual bool GetStoragePath(FilePath */*path*/) { return false; } 39 40 private: 41 DISALLOW_COPY_AND_ASSIGN(EphemeralProfile); 42}; 43 44} // namespace shill 45 46#endif // SHILL_EPHEMERAL_PROFILE_ 47