History log of /system/connectivity/shill/ephemeral_profile.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e48186532acb04b9e11efc9b9334dd555ffcae29 29-Aug-2015 mukesh agrawal <quiche@chromium.org> shill: use 'json' extension for JsonStore profiles

To avoid any confusion between files using different formats,
we want KeyFileStore profiles and JsonStore profiles to have
different names. So add '.json' to the file name when using
JsonStore as the backend.

Note: initially, I wanted to isolate the ENABLE_JSON_STORE
dependent code to just StoreFactory. But I've come to change
my mind on that.

The reason for my change of mind is that {Default}ProfileTest
checks the actual path that will be used when writing the file.
And that seems like an appropriate thing to test. But, to do
that, {Default}ProfileTest needs to know when backend we're
using.

So we need ENABLE_JSON_STORE checks in {Default}ProfileTest.
And once we've done that, it seems silly, and unnatural, to
hide this information from Profile.

Along the way:
- Move path computation from InitStorage() and RemoveStorage(),
into the {Default}Profile constructor. This makes the code
slightly simpler (removing a virtual method) and shorter.
- Provide a method for tests to query the path that Profile
would use, so that we don't duplicate path computation logic.
- Remove |storage_path_| field, since it was only needed to
compute the path of the persistent file.

While there:
- Rename |store_path| argument to DefaultProfile ctor. It's
unclear whether such a "path" should refer to a directory
or a file.
- Rename |user_storage_directory| argument to Profile ctor.
This name makes no sense when the Profile ctor is being
called from the DefaultProfile ctor.

Bug: 23561491
TEST="USE=json_store FEATURES=test emerge-samus shill"

Change-Id: I9b7e9b04dc80c89c20ea43158ed293b8a50fadbf
/system/connectivity/shill/ephemeral_profile.h
c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 03-Sep-2015 Peter Qiu <zqiu@google.com> License shill to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi, the NOTICE was added with a copy
of the Apache2 license and MODULE_LICENSE_* file was added.

BUG=23587594
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/ephemeral_profile.h
a794cd60a7339d576ea2eed263a4f0a20fb255af 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: Top-level files a-e: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: Idb7252202e142098999fe0672712aded7d369259
Reviewed-on: https://chromium-review.googlesource.com/278038
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
d419b6dc297755e8f0546b2f780851b49aab1fc7 17-Oct-2014 Ben Chan <benchan@chromium.org> shill: profile: Replace scoped_ptr with std::unique_ptr.

BUG=None
TEST=`FEATURES=test emerge-$BOARD shill`

Change-Id: I6fa5ec6fb2dbb6c0f4aa39a1d62ed2070697d89f
Reviewed-on: https://chromium-review.googlesource.com/224158
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
5ea763b83299b5fad76a87183fb39a74c2d3c61d 13-Aug-2014 Ben Chan <benchan@chromium.org> shill: Add C++11 override specifier to destructors of derived classes.

BUG=None
TEST=`USE=wimax FEATURES=test emerge-$BOARD platform2`

Change-Id: I88d4e29165869b26924cccb94ac940dc8961c312
Reviewed-on: https://chromium-review.googlesource.com/212267
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
016fa0e9c8f47630c8e6c440ace42ba99f8498df 12-Aug-2014 Alex Vakulenko <avakulenko@chromium.org> platform2: sweep the lint errors identified by the updated linter

cpplint.py has been updated and identified new issues in existing
code. Stuff like overridden functions that specify 'override' should
not be marked as 'virtual', and constructors with no parameters
should not be marked as 'explicit'.

BUG=None
TEST=cpplint.py `find ./platform2 -name *.cc -or -name *.h`

Change-Id: Ibb9de43286d874d076ffd5ebb1b13c36ec794f01
Reviewed-on: https://chromium-review.googlesource.com/211950
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
86a22598bac564b2030aed6f862f684a96471836 25-Jul-2014 mukesh agrawal <quiche@chromium.org> shill: logging: give EphemeralProfile a friendly name

In some cases, we'd see log messages of the form "Moving service 1 to
profile from profile". This is confusing, to say the least.

Fix this, by having EphmeralProfile override GetFriendlyName.

BUG=None
TEST=unit tests

Change-Id: Ia7cf6ff28301bf3b991c606cbac3a2145a856587
Reviewed-on: https://chromium-review.googlesource.com/210048
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
c45688bb3881f0c2216e6ec0e19ebda0be33e871 03-Jul-2014 Ben Chan <benchan@chromium.org> shill: Fix header guards to conform to coding style.

BUG=chromium:385849
TEST=Tested the following:
1. `USE='cellular wimax' FEATURES=test emerge-$BOARD platform2`
2. `cpplint.py --filter=-build/include_order shill/*.h` reports no
'build/header_guard' issue.

Change-Id: I1a3972a1f88e5001550eccd561633bd4e5c5faba
Reviewed-on: https://chromium-review.googlesource.com/206680
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
5133b71eaa00535739ebbddd8a8f31cd8fcf33a8 19-Feb-2013 Thieu Le <thieule@chromium.org> shill: Add metric to track corrupted profiles

New metric Network.Shill.CorruptedProfile.

BUG=chromium-os:38669
TEST=1. Unit tests
2. Stop shill
Corrupt /var/cache/shill/default.profile by adding junk
Start shill
Verify new metric appears in chrome://histograms

Change-Id: I629ed00884ecd2d2fe90744583bd72bf2e9e6af4
Reviewed-on: https://gerrit.chromium.org/gerrit/43556
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Thieu Le <thieule@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
5ad1606ad8b3f74b2b7960a3003a2d1ca75d52b8 22-Feb-2013 Paul Stewart <pstew@chromium.org> shill: Compile against libchrome-180609

Made the following fixes to allow compile against a new libchrome:

- ScopedVector::reset() was renamed to "clear".
- Hack in base to add "using base::FilePath;" has been removed.
- Convert MessageLoop::current()->RunAllPending() to
base::RunLoop().RunUntilIdle().
- MessageLoopProxy::PostDelayedTask() now takes a base::TimeDelta().
- scoped_refptr::release() no longer exists.
- base/eintr_wrapper.h -> base/posix/eintr_wrapper.h
- base/scoped_temp_dir.h -> base/files/scoped_temp_dir.h
- base/string_tokenizer.h -> base/strings/string_tokenizer.h
- New scoped_ptr does compile check for naughty people making scoped_ptrs
of refcounted objects.
- base::SplitString() now returns an empty vector when given an empty
string (instead of a single-element vector with an empty string).

CQ-DEPEND=CL:43774
BUG=chromium-os:38931
TEST=Unit tests, run on real hardware

Change-Id: I6f1f5807e81fb2d52f197871d32ccbccc3038a7c
Reviewed-on: https://gerrit.chromium.org/gerrit/43775
Commit-Queue: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
6515aabcd1fbbb9ff2090c9675c17eeef64e7474 13-Oct-2011 Chris Masone <cmasone@chromium.org> [shill] Make profiles backed with StoreInterfaces

Rely on persistence of data in StoreInterface to maintain
Service/Device/IPConfig info for entities that are not
currently active, instead of maintaining lists in Profile
objects themselves.

BUG=chromium-os:17253
TEST=unit, run on device

Change-Id: I206f44ddf16c584354f8fcadb57032f047f33d0a
Reviewed-on: http://gerrit.chromium.org/gerrit/10024
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
26b327e559583d5a84b7e1605c29a4dcbc87d2a9 19-Oct-2011 Paul Stewart <pstew@chromium.org> shill: A couple of naming cleanups

Rename shill_event.* -> event_dispatcher.*. This is more
consistent with correct style. Also rename IOInputHandler ->
InputHandler.

BUG=None
TEST=Rerun unit tests

Change-Id: I13d56b857c85b32ba1418e894de68afc5a23f00d
Reviewed-on: http://gerrit.chromium.org/gerrit/10326
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
b9c00597eb1f6d2560f7e88cb0d1f627228840d4 06-Oct-2011 Chris Masone <cmasone@chromium.org> [shill] Profiles need to own their own storage

We're moving to a model where we rely on the StoreInterface
implementation to maintain profile state, instead of managing
a list of Service objects manually. Thus, we need to allow
Profile to own its own StoreInterface.

BUG=chromium-os:17253
TEST=unit

Change-Id: Ie62462686ecf598efeac08a2d3180cd372430bb9
Reviewed-on: http://gerrit.chromium.org/gerrit/9916
Commit-Ready: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
1830fa1f2e8691073f4d07b0883f059a290a9cc2 26-Sep-2011 mukesh agrawal <quiche@chromium.org> shill: enable (don't disable) -Wunused

having fixed an unused parameter in the dbus-c++ headers, those
headers no longer have unused parameters. so, if we fix up unused
parameters in shill code, we can compile with -Wunused. (this is
implied by -Wall, as long as we don't override with -Wno-unused.)

BUG=chromium-os:20779
TEST=unittests

- comment out unused parameters in function definitions
- remove some unused local variables
- also: fix an old-style cast

Change-Id: Ie654a7b34d622cecb0f26bd47c17813fe8423001
Reviewed-on: http://gerrit.chromium.org/gerrit/8365
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
9d779936d8f8c2d74b30883e2a2622c4207fe797 26-Aug-2011 Chris Masone <cmasone@chromium.org> [shill] Add code for persisting profiles and services to disk.

BUG=chromium-os:17253
TEST=unit

Change-Id: Ic6dbbcb10543da3f4615cb305a77f6b9b301e8bc
Reviewed-on: http://gerrit.chromium.org/gerrit/7633
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
6791a43add38926966bd420e89541717fb2cb2b5 12-Jul-2011 Chris Masone <cmasone@chromium.org> [shill] Enable Profile objects to manage a list of Services to persist.

The Manager will hang on to a list of active services. They will be sorted,
someday, in an order that makes sense. Every service will be associated with
a Profile, though it may the an ephemeral profile that won't persist state to
disk. Profiles will maintain a map of service name to service references to
track the services whose state they persist to disk. Services may move between
Profiles, and will certainly need to be bound to one after they are registered
with the Manager, so support for this is provided as well.

BUG=chromium-os:17436
TEST=unit tests

Change-Id: Id43a0e1d97302b6f574bd2213d4f3d176bb5223f
Reviewed-on: http://gerrit.chromium.org/gerrit/4033
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
b2e326bf37654683cdc8c0cbbab29d1af7910af8 12-Jul-2011 Chris Masone <cmasone@chromium.org> Re-land "[shill] Get rid of Entry as a first-class citizen""

This reverts commit 7c1ab1cb74bf6397c67e1cdc825043a93c4bce33.

Also, fixes some compile problems that only repro with debug flags
and that cause runtime dbus errors with the new version of libdbus

BUG=chromium-os:17436
TEST=unit tests

Change-Id: I479308e684b802f167788daeaf4ec39d0b63ee17
Reviewed-on: http://gerrit.chromium.org/gerrit/3961
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
7c1ab1cb74bf6397c67e1cdc825043a93c4bce33 12-Jul-2011 Chris Masone <cmasone@chromium.org> Revert "[shill] Get rid of Entry as a first-class citizen"

This reverts commit 7c982eade99f01cb6b8719ed4d385c0ec6b50f75

Change-Id: I554c12003c18f09ac7f736e98b9ecd63829100e9
Reviewed-on: http://gerrit.chromium.org/gerrit/3957
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
9c9e8fb31c9b39fb2832e0804d5c71b3ef685427 12-Jul-2011 Chris Masone <cmasone@chromium.org> [shill] Get rid of Entry as a first-class citizen

Entry was a bad idea. Instead, merge that stuff back into Service and
make Profile objects just have a list of Services. Live Services will
be registered with Manager; ones that exist only within a Profile will
have to be accessed by querying the Profile over DBus, just like
today.

BUG=chromium-os:17436
TEST=unit tests

Change-Id: Id07d762925b252219aa79340931e34b87f10007e
Reviewed-on: http://gerrit.chromium.org/gerrit/3951
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
/system/connectivity/shill/ephemeral_profile.h
7aa5f90848b530999d8b6788ecb40aa30871c7ae 11-Jul-2011 Chris Masone <cmasone@chromium.org> [shill] Back property storage in Service objects with Entry objects

Much of Shill Service state is persisted to disk, by creating an Entry
in a Profile. We should store this info just once, so that we don't
have to worry about keeping multiple data stores in sync. This is a
first step in that direction.

BUG=chromium-os:17436
TEST=unit tests

Change-Id: If94db2a38a7d79c56e2c746b2f069cfd7ab4bf65
Reviewed-on: http://gerrit.chromium.org/gerrit/3876
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
/system/connectivity/shill/ephemeral_profile.h